Skip to content

Commit

Permalink
bugfix group names in FIT window
Browse files Browse the repository at this point in the history
  • Loading branch information
Quicksaver committed Apr 18, 2016
1 parent 7cd8e55 commit 66760c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resource/modules/findInTabs.jsm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// VERSION 2.3.19
// VERSION 2.3.20

this.__defineGetter__('FITdeferred', function() { return window.FITdeferred; });
this.__defineGetter__('FITinitialized', function() { return FITdeferred.promise; });
Expand Down Expand Up @@ -616,7 +616,7 @@ this.FIT = {

for(let win of FITSandbox.navigators) {
if(win.TabView) {
for(let groupItem of win.TabView._window.GroupItems.groupItems) {
for(let groupItem of win.TabView._window.GroupItems) {
if(groupItem.hidden) { continue; }

groupItem.linkedWindow = win;
Expand Down Expand Up @@ -774,13 +774,13 @@ this.FIT = {
},

getTabGroupName: function(aGroup) {
if(aGroup.linkedWindow.TabView) {
if(aGroup.isAGroupItem && aGroup.linkedWindow.TabView) {
// Tab Groups add-on provides an easy way to get the group title
return aGroup.linkedWindow.TabView.getGroupTitle(aGroup);
}

// Tab Groups are gone, so we make up our own "group" name, which represents the full window
let name = aGroup.linkedWindow.gBrowser.selectedTab.getAttribute('visibleLabel');
let name = aGroup.linkedWindow.gBrowser.selectedTab.label;
let num = aGroup.linkedWindow.gBrowser.tabs.length;
if(num > 1) {
name += ' +'+(num -1);
Expand Down

0 comments on commit 66760c1

Please sign in to comment.