don't show "replace current tab" item for bookmark groups on Firefox 8 or later (fix for https://bugzilla.mozilla.org/show_bug.cgi?id=440093 )
This commit is contained in:
parent
85ef4d852f
commit
68e156bd12
@ -277,10 +277,14 @@ var TreeStyleTabBookmarksService = {
|
||||
else {
|
||||
sv.readyToOpenNewTabGroup(null, treeStructure, TSTOpenGroupBookmarkBehavior & sv.kGROUP_BOOKMARK_EXPAND_ALL_TREE);
|
||||
}
|
||||
replaceCurrentTab = false;
|
||||
// replaceCurrentTab works only on Firefox 7 or earlier
|
||||
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=440093
|
||||
if (typeof replaceCurrentTab !== 'undefined')
|
||||
replaceCurrentTab = false;
|
||||
}
|
||||
else {
|
||||
replaceCurrentTab = !!(TSTOpenGroupBookmarkBehavior & sv.kGROUP_BOOKMARK_REPLACE);
|
||||
if (typeof replaceCurrentTab !== 'undefined')
|
||||
replaceCurrentTab = !!(TSTOpenGroupBookmarkBehavior & sv.kGROUP_BOOKMARK_REPLACE);
|
||||
}
|
||||
}
|
||||
$1
|
||||
|
@ -168,6 +168,16 @@ function initTabPane()
|
||||
newTabPref.removeAttribute('hidden');
|
||||
else
|
||||
newTabPref.setAttribute('hidden', true);
|
||||
|
||||
var bookmarkGroupReplacePref = document.getElementById('openGroupBookmark.replace');
|
||||
if (comparator.compare(XULAppInfo.version, '7.0') > 0) {
|
||||
if (bookmarkGroupReplacePref.selected)
|
||||
document.getElementById('openGroupBookmark.subtree').selected = true;
|
||||
bookmarkGroupReplacePref.setAttribute('hidden', true);
|
||||
}
|
||||
else {
|
||||
bookmarkGroupReplacePref.removeAttribute('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function onSyncGroupBookmarkUIToPref()
|
||||
|
@ -446,7 +446,7 @@
|
||||
onsyncfrompreference="return onSyncGroupBookmarkPrefToUI();"
|
||||
preference="extensions.treestyletab.openGroupBookmark.behavior">
|
||||
<radio value="0" collapsed="true"/>
|
||||
<radio value="1" label="&config.openGroupBookmark.subtree;"/>
|
||||
<radio id="openGroupBookmark.subtree" value="1" label="&config.openGroupBookmark.subtree;"/>
|
||||
<hbox>
|
||||
<spacer style="width:1em;"/>
|
||||
<vbox>
|
||||
@ -471,7 +471,8 @@
|
||||
</vbox>
|
||||
</hbox>
|
||||
<radio value="2" label="&config.openGroupBookmark.flat;"/>
|
||||
<radio value="4" label="&config.openGroupBookmark.replace;"/>
|
||||
<radio id="openGroupBookmark.replace"
|
||||
value="4" label="&config.openGroupBookmark.replace;"/>
|
||||
</radiogroup>
|
||||
</vbox>
|
||||
</deck>
|
||||
|
Loading…
x
Reference in New Issue
Block a user