mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-10 11:05:07 -05:00
add 'remember_desktop' option
This commit is contained in:
parent
1b7aef50ce
commit
3d89441747
@ -24,6 +24,7 @@
|
|||||||
<preference id="pref_hides_single_window" name="extensions.firetray.hides_single_window" type="bool"/>
|
<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_start_hidden" name="extensions.firetray.start_hidden" type="bool"/>
|
||||||
<preference id="pref_show_activates" name="extensions.firetray.show_activates" 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_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_hides" name="extensions.firetray.scroll_hides" type="bool" />
|
||||||
<preference id="pref_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
|
<preference id="pref_scroll_mode" name="extensions.firetray.scroll_mode" type="string" />
|
||||||
@ -66,6 +67,9 @@
|
|||||||
label="&bool_show_activates.label;"
|
label="&bool_show_activates.label;"
|
||||||
accesskey="&bool_show_activates.accesskey;"
|
accesskey="&bool_show_activates.accesskey;"
|
||||||
tooltiptext="&bool_show_activates.tooltip;"/>
|
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>
|
||||||
|
|
||||||
<groupbox>
|
<groupbox>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<!ENTITY bool_show_activates.label "Activate restored windows">
|
<!ENTITY bool_show_activates.label "Activate restored windows">
|
||||||
<!ENTITY bool_show_activates.accesskey "e">
|
<!ENTITY bool_show_activates.accesskey "e">
|
||||||
<!ENTITY bool_show_activates.tooltip "restored windows raise on top and get focus">
|
<!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 icon_settings "Icon settings">
|
||||||
<!ENTITY bool_show_icon_on_hide.label "Show tray icon only if a window is hidden">
|
<!ENTITY bool_show_icon_on_hide.label "Show tray icon only if a window is hidden">
|
||||||
|
@ -12,6 +12,7 @@ pref("extensions.firetray.hides_on_minimize", true);
|
|||||||
pref("extensions.firetray.hides_single_window", false);
|
pref("extensions.firetray.hides_single_window", false);
|
||||||
pref("extensions.firetray.start_hidden", false);
|
pref("extensions.firetray.start_hidden", false);
|
||||||
pref("extensions.firetray.show_activates", false);
|
pref("extensions.firetray.show_activates", false);
|
||||||
|
pref("extensions.firetray.remember_desktop", true);
|
||||||
|
|
||||||
pref("extensions.firetray.show_icon_on_hide", false);
|
pref("extensions.firetray.show_icon_on_hide", false);
|
||||||
pref("extensions.firetray.scroll_hides", true);
|
pref("extensions.firetray.scroll_hides", true);
|
||||||
|
@ -294,12 +294,18 @@ firetray.Window = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveDesktop: function(xid) {
|
saveDesktop: function(xid) {
|
||||||
|
if (!firetray.Utils.prefService.getBoolPref('remember_desktop'))
|
||||||
|
return;
|
||||||
|
|
||||||
let winDesktop = firetray.Window.getXWindowDesktop(x11.Window(xid));
|
let winDesktop = firetray.Window.getXWindowDesktop(x11.Window(xid));
|
||||||
firetray.Handler.windows[xid].savedDesktop = winDesktop;
|
firetray.Handler.windows[xid].savedDesktop = winDesktop;
|
||||||
LOG("save: windowDesktop="+winDesktop);
|
LOG("save: windowDesktop="+winDesktop);
|
||||||
},
|
},
|
||||||
|
|
||||||
restoreDesktop: function(xid) {
|
restoreDesktop: function(xid) {
|
||||||
|
if (!firetray.Utils.prefService.getBoolPref('remember_desktop'))
|
||||||
|
return;
|
||||||
|
|
||||||
let desktopDest = firetray.Handler.windows[xid].savedDesktop;
|
let desktopDest = firetray.Handler.windows[xid].savedDesktop;
|
||||||
if (desktopDest === null || "undefined" === typeof(desktopDest)) return;
|
if (desktopDest === null || "undefined" === typeof(desktopDest)) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user