Skip to content

Commit d0458ef

Browse files
committed
stantdardize updateTitlebar
1 parent 48367cb commit d0458ef

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

common/content/configbase.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ const ConfigBase = Class(ModuleBase, {
105105
* @property {string} The leaf name of any temp files created by
106106
* {@link io.createTempFile}.
107107
*/
108-
get tempFile() this.name.toLowerCase() + ".tmp"
108+
get tempFile() this.name.toLowerCase() + ".tmp",
109109

110+
updateTitlebar: function () {},
110111
});
111112

112113
// vim: set fdm=marker sw=4 ts=4 et:

common/content/liberator.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,15 +1165,7 @@ const Liberator = Module("liberator", {
11651165
else
11661166
win.setAttribute("titlemodifier", value);
11671167

1168-
switch (config.hostApplication) {
1169-
case "Firefox":
1170-
config.tabbrowser.updateTitlebar();
1171-
break;
1172-
case "Thunderbird":
1173-
config.tabbrowser.setDocumentTitle(config.tabbrowser.currentTabInfo);
1174-
break;
1175-
}
1176-
1168+
config.updateTitlebar();
11771169
return value;
11781170
}
11791171
});

muttator/content/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ const Config = Module("config", ConfigBase, {
135135
}
136136
},
137137

138+
updateTitlebar: function () {
139+
if (!this.isComposeWindow)
140+
this.tabbrowser.setDocumentTitle(this.tabbrowser.currentTabInfo);
141+
},
142+
138143
modes: [
139144
["MESSAGE", { char: "m" }],
140145
["COMPOSE"]

vimperator/content/config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ const Config = Module("config", ConfigBase, {
135135
tabs: [["TabsToolbar"], "Tab bar"]
136136
},
137137

138-
get visualbellWindow() getBrowser().mPanelContainer
138+
get visualbellWindow() getBrowser().mPanelContainer,
139+
140+
updateTitlebar: function () {
141+
config.tabbrowser.updateTitlebar();
142+
},
139143
}, {
140144
}, {
141145
commands: function () {

0 commit comments

Comments
 (0)