1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 08:17:59 +01:00

use lambda notation for setter and getter definitions where appropriate

This commit is contained in:
Doug Kearns
2008-09-24 06:03:42 +00:00
parent 804b1fd62f
commit f478f57c57
6 changed files with 16 additions and 21 deletions

View File

@@ -560,8 +560,8 @@ const liberator = (function () //{{{
return {
get mode() { return liberator.modes.main; },
set mode(value) { liberator.modes.main = value; },
get mode() liberator.modes.main,
set mode(value) liberator.modes.main = value,
// Global constants
CURRENT_TAB: 1,

View File

@@ -747,7 +747,7 @@ liberator.Mail = function () //{{{
return {
get currentAccount() { return this.currentFolder.rootFolder; },
get currentAccount() this.currentFolder.rootFolder,
get currentFolder() {
var tree = GetFolderTree();

View File

@@ -191,9 +191,9 @@ liberator.modes = (function () //{{{
yield modes[i];
},
get all() { return [this.NONE, this.NORMAL, this.INSERT, this.VISUAL,
get all() [this.NONE, this.NORMAL, this.INSERT, this.VISUAL,
this.HINTS, this.COMMAND_LINE, this.CARET,
this.TEXTAREA, this.MESSAGE, this.COMPOSE, this.CUSTOM]; },
this.TEXTAREA, this.MESSAGE, this.COMPOSE, this.CUSTOM],
// show the current mode string in the command line
show: function ()
@@ -301,9 +301,7 @@ liberator.modes = (function () //{{{
},
get extended() extended,
set extended(value) {
extended = value; this.show();
}
set extended(value) { extended = value; this.show(); }
};
//}}}

View File

@@ -36,15 +36,12 @@ liberator.config = { //{{{
defaults: { guioptions: "f" },
guioptions: { m: ["mail-toolbar-menubar2"], T: ["mail-bar2"], f: ["folderPaneBox", "folderpane_splitter"], F: ["folderPaneHeader"] },
get isComposeWindow() { return window.wintype == "msgcompose"; },
get browserModes() { return [liberator.modes.MESSAGE]; },
get mainWidget() { // focusContent() focuses this widget
return this.isComposeWindow ?
document.getElementById("content-frame") :
GetThreadTree();
},
get mainWindowID() { return this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow"; },
get visualbellWindow() { return document.getElementById(this.mainWindowID); },
get isComposeWindow() window.wintype == "msgcompose",
get browserModes() [liberator.modes.MESSAGE],
// focusContent() focuses this widget
get mainWidget() this.isComposeWindow ? document.getElementById("content-frame") : GetThreadTree(),
get mainWindowID() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
get visualbellWindow() document.getElementById(this.mainWindowID),
autocommands: [["FolderLoaded", "Triggered after switching folders in Thunderbird"],
["PageLoadPre", "Triggered after a page load is initiated"],

View File

@@ -643,9 +643,9 @@ liberator.Tabs = function () //{{{
return {
get alternate() { return alternates[1]; },
get alternate() alternates[1],
get count() { return getBrowser().mTabs.length; },
get count() getBrowser().mTabs.length,
// used for :setlocal
get options()

View File

@@ -36,7 +36,7 @@ liberator.config = { //{{{
defaults: { guioptions: "" },
guioptions: { m: ["toolbar-menubar"], T: ["nav-bar"], b: ["PersonalToolbar"] },
get visualbellWindow() { return getBrowser().mPanelContainer; },
get visualbellWindow() getBrowser().mPanelContainer,
autocommands: [["BookmarkAdd", "Triggered after a page is bookmarked"],
["LocationChange", "Triggered when changing tabs or when naviagtion to a new location"],