Skip to content

Commit

Permalink
#239 Add 'Reload' for 'Double click on tab:' option
Browse files Browse the repository at this point in the history
  • Loading branch information
traxium committed Jun 25, 2020
1 parent 1c2f21d commit dd8a104
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function startup(data, reason)

Services.prefs.getDefaultBranch(null).setBoolPref('extensions.tabtree.treelines', true); // setting default pref
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.highlight-unloaded-tabs', 0); // setting default pref
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.dblclick', 0); // setting default pref // 0 - No action, 1 - Close tab, 2 - Pin tab
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.dblclick', 0); // setting default pref // 0 - No action, 1 - Close tab, 2 - Pin tab, 3 - Reload
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.middle-click-tabbar', false); // #36 (Middle click on empty space to open a new tab)
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.delay', 0); // setting default pref
Services.prefs.getDefaultBranch(null).setIntPref('extensions.tabtree.position', 1); // setting default pref // 0 - Left, 1 - Right
Expand Down Expand Up @@ -2846,6 +2846,8 @@ var windowListener = {
} else {
g.pinTab(tab);
}
} else if (pref === 3) {
g.reloadTab(tab);
}
};

Expand Down
3 changes: 2 additions & 1 deletion locale/en-US/options.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
<!ENTITY tab-numbers.title "Show tab numbers in tab titles:">
<!ENTITY tab-numbers.desc "Useful for Vim-style add-ons (unchecked by default)">
<!ENTITY dblclick.title "Double click on a tab:">
<!ENTITY dblclick.desc "Only recommended if you don't have a mouse with a wheel (unchecked by default)">
<!ENTITY dblclick.desc "Only recommended if you don't have a mouse with a wheel (&quot;No action&quot; by default)">
<!ENTITY dblclick.none "No action">
<!ENTITY dblclick.close "Close tab">
<!ENTITY dblclick.pin "Pin/unpin tab">
<!ENTITY dblclick.reload "Reload tab">
<!ENTITY middle-click-tabbar.title "Middle-click on the tabbar:">
<!ENTITY middle-click-tabbar.desc "(&#171;Firefox default&#187; by default)">
<!ENTITY middle-click-tabbar.0 "Firefox default (open a new tab)">
Expand Down
1 change: 1 addition & 0 deletions locale/fr-FR/options.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!ENTITY dblclick.none "Aucune action">
<!ENTITY dblclick.close "Fermer l'onglet">
<!ENTITY dblclick.pin "Épingler/relâcher l’onglet'">
<!ENTITY dblclick.reload "Reload tab">
<!ENTITY middle-click-tabbar.title "Clic milieu sur la barre d'onglets:">
<!ENTITY middle-click-tabbar.desc "(&#171;Action standard de Firefox&#187; par défaut)">
<!ENTITY middle-click-tabbar.0 "Action standard de Firefox (ouvrir un nouvel onglet)">
Expand Down
1 change: 1 addition & 0 deletions locale/pl-PL/options.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!ENTITY dblclick.none "No action">
<!ENTITY dblclick.close "Close tab">
<!ENTITY dblclick.pin "Pin/unpin tab">
<!ENTITY dblclick.reload "Reload tab">
<!ENTITY middle-click-tabbar.title "Middle-click on the tabbar:">
<!ENTITY middle-click-tabbar.desc "(&#171;Firefox default&#187; by default)">
<!ENTITY middle-click-tabbar.0 "Firefox default (open a new tab)">
Expand Down
3 changes: 2 additions & 1 deletion locale/ru-RU/options.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
<!ENTITY tab-numbers.title "Показывать номер вкладки:">
<!ENTITY tab-numbers.desc "Предназначено для использования с расширениями эмулирующими Vim (не отмечено по умочанию)">
<!ENTITY dblclick.title "Двойной клик по вкладке:">
<!ENTITY dblclick.desc "Рекомендуется включать эту настройку, только если у вас нет мышки (не отмечено по умочанию)">
<!ENTITY dblclick.desc "Рекомендуется включать эту настройку, только если у вас нет мышки (&quot;—&quot; по умочанию)">
<!ENTITY dblclick.none "—">
<!ENTITY dblclick.close "Закрыть вкладку">
<!ENTITY dblclick.pin "Закрепить/открепить вкладку">
<!ENTITY dblclick.pin "Обновить вкладку">
<!ENTITY middle-click-tabbar.title "Щелчёк средней кнопкой мыши по панели вкладок:">
<!ENTITY middle-click-tabbar.desc "(&#171;стандартное действие Firefox&#187; по умолчанию)">
<!ENTITY middle-click-tabbar.0 "Стандартное действие Firefox (Открыть новую вкладку)">
Expand Down
1 change: 1 addition & 0 deletions options.xul
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<radio value="0" label="&dblclick.none;"/>
<radio value="1" label="&dblclick.close;"/>
<radio value="2" label="&dblclick.pin;"/>
<radio value="3" label="&dblclick.reload;"/>
</radiogroup>
</setting>
<setting type="menulist" pref="extensions.tabtree.middle-click-tab" title="&middle-click-tab.title;" desc="&middle-click-tab.desc;">
Expand Down

0 comments on commit dd8a104

Please sign in to comment.