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

Add tab numbering

This commit is contained in:
Kris Maglione
2008-10-12 05:32:38 +00:00
parent db3cc5433e
commit 7a61111e35
8 changed files with 80 additions and 27 deletions

View File

@@ -603,13 +603,6 @@ liberator.CommandLine = function () //{{{
// liberator.echo uses different order of flags as it omits the hightlight group, change v.commandline.echo argument order? --mst
echo: function (str, highlightGroup, flags)
{
// if we are modifing the GUI while we are not in the main thread
// Firefox will hang up
var threadManager = Components.classes["@mozilla.org/thread-manager;1"]
.getService(Components.interfaces.nsIThreadManager);
if (!threadManager.isMainThread)
return false;
var focused = document.commandDispatcher.focusedElement;
if (focused && focused == commandWidget.inputField || focused == multilineInputWidget.inputField)
return false;
@@ -619,6 +612,13 @@ liberator.CommandLine = function () //{{{
if (flags & this.APPEND_TO_MESSAGES)
messageHistory.add({ str: str, highlight: highlightGroup });
// if we are modifing the GUI while we are not in the main thread
// Firefox will hang up
var threadManager = Components.classes["@mozilla.org/thread-manager;1"]
.getService(Components.interfaces.nsIThreadManager);
if (!threadManager.isMainThread)
return false;
var where = setLine;
if (flags & this.FORCE_MULTILINE)
where = setMultiline;
@@ -1593,6 +1593,10 @@ liberator.StatusLine = function () //{{{
return;
}
let tabs = getBrowser().mTabs;
for (let i = 0; i < tabs.length; i++)
tabs[i].setAttribute("ordinal", i + 1);
if (!currentIndex || typeof currentIndex != "number")
currentIndex = liberator.tabs.index() + 1;
if (!totalTabs || typeof currentIndex != "number")