Nightingale Forums

Full Version: Ubuntu: compiling MinimizeToTray Plus addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know how I can compile the MinimizeToTray Plus addon on Ubuntu from the source code provided here? ->
I was trying to figure out how to add the source to Nightingale's extensions source folder in such a way that it will be compiled with the other extensions. It creates an XPI file but that doesn't contain the actual plugin file which should be compiled from the provided c++ code.
I recomment looking at other native add-on's Makefile/ files, for example the MPRIS, Unity or libnotify extensions. You also need to tell the Makefile in the extensions/ folder that there is a new folder with the minimizetotray extension in it.
I couldn't really get it to work. However, I figured that the "systray" extension does actually build and work on Linux, at least on Ubuntu 13.10/Mint 16 with MATE 1.6.1. It shows up in the systray and I can restore it with right click -> restore. However, when I left click, it won't restore and remain opened in background. But I'm sure this can be fixed somehow.


This patch makes systray on Linux somewhat useable:

--- a/extensions/
+++ b/extensions/
@@ -70,7 +70,9 @@

ifeq (linux,$(SB_PLATFORM))
+    DEFAULT_EXTENSIONS += mpris \
+                          systray \
+                          $(NULL)

SUBDIRS = $(sort $(subst $(COMMA),$(SPACE), \
--- a/extensions/systray/
+++ b/extensions/systray/
@@ -30,6 +30,7 @@
include $(DEPTH)/build/


SUBDIRS = chrome components

--- a/extensions/systray/chrome/content/prefwindow.xul
+++ b/extensions/systray/chrome/content/prefwindow.xul
@@ -16,8 +16,9 @@
       <preference id="prefNotify" name="" type="bool"/>
-    <checkbox id="checkNotify" preference="prefNotify"
-              label="&prefs.notify.label;" accesskey="&prefs.notify.key;"/>
+    <!-- Hiding it because it's broken. We can use the libnotify plugin for this. -->    
+    <!-- checkbox id="checkNotify" preference="prefNotify"
+              label="&prefs.notify.label;" accesskey="&prefs.notify.key;"/ -->
--- a/extensions/systray/components/src/nsSystemTrayServiceGTK.cpp
+++ b/extensions/systray/components/src/nsSystemTrayServiceGTK.cpp
@@ -117,7 +117,7 @@
   // destructing the icon removes it for us
-  mIconDataMap.Remove(aIconId);
+  /* mIconDataMap.Remove(aIconId); */  // << This made it impossible to restore NG
   return NS_OK;

--- a/extensions/systray/
+++ b/extensions/systray/
@@ -24,8 +24,8 @@
         <em:id></em:id> <!-- nightingale -->
-        <em:minVersion>@EXTENSION_MIN_VER@</em:minVersion>
-        <em:maxVersion>@EXTENSION_MAX_VER@</em:maxVersion>
+        <em:minVersion>1.11.0a</em:minVersion>
+        <em:maxVersion>2.1.0a</em:maxVersion>
My goodness, after countless attempts I was finally able to build this plugin from source.
Here's the modified source code: