[Pkg-mozext-commits] [firetray] 190/399: add 'remember_desktop' option

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:41 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit 3d89441747e10a88d918ac927d10858b1f0c4976
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Sun Mar 4 23:41:01 2012 +0100

    add 'remember_desktop' option
---
 src/chrome/content/options.xul       |    4 ++++
 src/chrome/locale/en-US/options.dtd  |    2 ++
 src/defaults/preferences/prefs.js    |    1 +
 src/modules/linux/FiretrayWindow.jsm |    8 +++++++-
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/chrome/content/options.xul b/src/chrome/content/options.xul
index 5725e46..15a2c2b 100644
--- a/src/chrome/content/options.xul
+++ b/src/chrome/content/options.xul
@@ -24,6 +24,7 @@
       <preference id="pref_hides_single_window" name="extensions.firetray.hides_single_window" type="bool"/>
       <preference id="pref_start_hidden" name="extensions.firetray.start_hidden" type="bool"/>
       <preference id="pref_show_activates" name="extensions.firetray.show_activates" type="bool"/>
+      <preference id="pref_remember_desktop" name="extensions.firetray.remember_desktop" type="bool"/>
       <preference id="pref_show_icon_on_hide" name="extensions.firetray.show_icon_on_hide" type="bool"/>
       <preference id="pref_scroll_hides" name="extensions.firetray.scroll_hides" type="bool" />
       <preference id="pref_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
@@ -66,6 +67,9 @@
                       label="&bool_show_activates.label;"
                       accesskey="&bool_show_activates.accesskey;"
                       tooltiptext="&bool_show_activates.tooltip;"/>
+            <checkbox id="ui_remember_desktop" preference="pref_remember_desktop"
+                      label="&bool_remember_desktop.label;"
+                      accesskey="&bool_remember_desktop.accesskey;"/>
           </groupbox>
 
           <groupbox>
diff --git a/src/chrome/locale/en-US/options.dtd b/src/chrome/locale/en-US/options.dtd
index 02cb828..5d617af 100644
--- a/src/chrome/locale/en-US/options.dtd
+++ b/src/chrome/locale/en-US/options.dtd
@@ -20,6 +20,8 @@
 <!ENTITY bool_show_activates.label "Activate restored windows">
 <!ENTITY bool_show_activates.accesskey "e">
 <!ENTITY bool_show_activates.tooltip "restored windows raise on top and get focus">
+<!ENTITY bool_remember_desktop.label "Remember desktop">
+<!ENTITY bool_remember_desktop.accesskey "e">
 
 <!ENTITY icon_settings "Icon settings">
 <!ENTITY bool_show_icon_on_hide.label "Show tray icon only if a window is hidden">
diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js
index 2a5ea2f..abaad71 100644
--- a/src/defaults/preferences/prefs.js
+++ b/src/defaults/preferences/prefs.js
@@ -12,6 +12,7 @@ pref("extensions.firetray.hides_on_minimize", true);
 pref("extensions.firetray.hides_single_window", false);
 pref("extensions.firetray.start_hidden", false);
 pref("extensions.firetray.show_activates", false);
+pref("extensions.firetray.remember_desktop", true);
 
 pref("extensions.firetray.show_icon_on_hide", false);
 pref("extensions.firetray.scroll_hides", true);
diff --git a/src/modules/linux/FiretrayWindow.jsm b/src/modules/linux/FiretrayWindow.jsm
index 61d676a..9c21a68 100644
--- a/src/modules/linux/FiretrayWindow.jsm
+++ b/src/modules/linux/FiretrayWindow.jsm
@@ -198,7 +198,7 @@ firetray.Window = {
     // better visual effect if visibility set here instead of before
     firetray.Window.setVisibility(xid, true);
 
-    firetray.Window.restoreDesktop(xid);               // after show
+    firetray.Window.restoreDesktop(xid); // after show
     firetray.Window.activate(xid);
 
     firetray.PopupMenu.hideSingleWindowItemAndSeparatorMaybe(xid);
@@ -294,12 +294,18 @@ firetray.Window = {
   },
 
   saveDesktop: function(xid) {
+    if (!firetray.Utils.prefService.getBoolPref('remember_desktop'))
+      return;
+
     let winDesktop = firetray.Window.getXWindowDesktop(x11.Window(xid));
     firetray.Handler.windows[xid].savedDesktop = winDesktop;
     LOG("save: windowDesktop="+winDesktop);
   },
 
   restoreDesktop: function(xid) {
+    if (!firetray.Utils.prefService.getBoolPref('remember_desktop'))
+      return;
+
     let desktopDest = firetray.Handler.windows[xid].savedDesktop;
     if (desktopDest === null || "undefined" === typeof(desktopDest)) return;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list