Add secret preferences to control feedback cases

This commit is contained in:
Piro / YUKI Hiroshi 2016-02-13 23:28:22 +09:00
parent 8cc2bbe224
commit 799504b8bf
2 changed files with 17 additions and 3 deletions

View File

@ -136,6 +136,11 @@ pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown", true);
pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown.delay", 800); pref("extensions.treestyletab.tabbar.autoShow.accelKeyDown.delay", 800);
pref("extensions.treestyletab.tabbar.autoShow.tabSwitch", true); pref("extensions.treestyletab.tabbar.autoShow.tabSwitch", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback", false); pref("extensions.treestyletab.tabbar.autoShow.feedback", false);
pref("extensions.treestyletab.tabbar.autoShow.feedback.opened", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.closed", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.moved", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.selected", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.titleChanged", true);
pref("extensions.treestyletab.tabbar.autoShow.feedback.delay", 3000); pref("extensions.treestyletab.tabbar.autoShow.feedback.delay", 3000);
/** /**
* Size of the placeholder for "hidden tab bar". * Size of the placeholder for "hidden tab bar".

View File

@ -1241,17 +1241,25 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
return this.notifyStatusToAllTabs(aEvent.target); return this.notifyStatusToAllTabs(aEvent.target);
case 'TabOpen': case 'TabOpen':
if (utils.getTreePref('tabbar.autoShow.feedback.opened'))
this.showForFeedback(aEvent.originalTarget);
return;
case 'TabClose': case 'TabClose':
return this.showForFeedback(aEvent.originalTarget); if (utils.getTreePref('tabbar.autoShow.feedback.closed'))
this.showForFeedback(aEvent.originalTarget);
return;
case 'TabMove': case 'TabMove':
if (!this.treeStyleTab.subTreeMovingCount && if (utils.getTreePref('tabbar.autoShow.feedback.moved')
!this.treeStyleTab.subTreeMovingCount &&
!this.treeStyleTab.isTabInternallyMoving(aEvent.originalTarget)) !this.treeStyleTab.isTabInternallyMoving(aEvent.originalTarget))
this.showForFeedback(aEvent.originalTarget); this.showForFeedback(aEvent.originalTarget);
return; return;
case 'select': case 'select':
if (!this.window.TreeStyleTabService.accelKeyPressed) if (utils.getTreePref('tabbar.autoShow.feedback.selected') &&
!this.window.TreeStyleTabService.accelKeyPressed)
this.showForFeedback(aEvent.originalTarget); this.showForFeedback(aEvent.originalTarget);
return; return;
@ -1465,6 +1473,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
onTabTitleChanged : function AHB_onTabTitleChanged(aTab) onTabTitleChanged : function AHB_onTabTitleChanged(aTab)
{ {
if (utils.getTreePref('tabbar.autoShow.feedback.titleChanged'))
this.showForFeedback(aTab); this.showForFeedback(aTab);
}, },