1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-05 23:34:10 +01:00

Add an 'online' option to Muttator.

Also changed Vimperator's 'offline' to make use of Firefox's
BrowserOffline.
This commit is contained in:
Doug Kearns
2009-06-14 02:14:03 +10:00
parent c3ef4d18da
commit dbe348687e
4 changed files with 34 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
2009-XX-XX
* version 0.6a1pre
* add 'online' option
2008-03-29 2008-03-29
* version 0.5 * version 0.5
* fixes for recent TB nightly changes * fixes for recent TB nightly changes

View File

@@ -263,10 +263,33 @@ const config = { //{{{
liberator.loadModule("hints", Hints); liberator.loadModule("hints", Hints);
} }
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// COMMANDS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
commands.add(["pref[erences]", "prefs"], commands.add(["pref[erences]", "prefs"],
"Show " + config.hostApplication + " preferences", "Show " + config.hostApplication + " preferences",
function () { window.openOptionsDialog(); }, function () { window.openOptionsDialog(); },
{ argCount: "0" }); { argCount: "0" });
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
options.add(["online"],
"Set the 'work offline' option",
"boolean", true,
{
setter: function (value)
{
if (MailOfflineMgr.isOnline() != value)
MailOfflineMgr.toggleOfflineStatus();
return value;
},
getter: function () MailOfflineMgr.isOnline()
});
//}}}
} }
}; //}}} }; //}}}

View File

@@ -197,7 +197,7 @@ const config = { //{{{
delete img; delete img;
}; };
//////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// MAPPINGS //////////////////////////////////////////////// ////////////////////// MAPPINGS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
@@ -470,8 +470,8 @@ const config = { //{{{
setter: function (value) setter: function (value)
{ {
const ioService = services.get("io"); const ioService = services.get("io");
ioService.offline = !value; if (ioService.offline == value)
gPrefService.setBoolPref("browser.offline", ioService.offline); BrowserOffline.toggleOfflineStatus();
return value; return value;
}, },
getter: function () !services.get("io").offline getter: function () !services.get("io").offline
@@ -504,8 +504,9 @@ const config = { //{{{
options.add(["urlseparator"], options.add(["urlseparator"],
"Set the separator regexp used to separate multiple URL args", "Set the separator regexp used to separate multiple URL args",
"string", ",\\s"); "string", ",\\s");
//}}}
} }
//}}}
}; //}}} }; //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -515,6 +515,7 @@ const config = { //{{{
////////////////////// OPTIONS ///////////////////////////////////////////////// ////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
// TODO: SB doesn't explicitly support an offline mode. Should we? --djk
options.add(["online"], options.add(["online"],
"Set the 'work offline' option", "Set the 'work offline' option",
"boolean", true, "boolean", true,
@@ -523,8 +524,7 @@ const config = { //{{{
{ {
const ioService = services.get("io"); const ioService = services.get("io");
ioService.offline = !value; ioService.offline = !value;
//gPrefService.setBoolPref("browser.offline", ioService.offline); options.setPref("browser.offline", ioService.offline);
gPrefs.setBoolPref("browser.offline", ioService.offline);
return value; return value;
}, },
getter: function () !services.get("io").offline getter: function () !services.get("io").offline