Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | var gTabsPane = { |
michael@0 | 7 | |
michael@0 | 8 | /* |
michael@0 | 9 | * Preferences: |
michael@0 | 10 | * |
michael@0 | 11 | * browser.link.open_newwindow |
michael@0 | 12 | * - determines where pages which would open in a new window are opened: |
michael@0 | 13 | * 1 opens such links in the most recent window or tab, |
michael@0 | 14 | * 2 opens such links in a new window, |
michael@0 | 15 | * 3 opens such links in a new tab |
michael@0 | 16 | * browser.tabs.loadInBackground |
michael@0 | 17 | * - true if display should switch to a new tab which has been opened from a |
michael@0 | 18 | * link, false if display shouldn't switch |
michael@0 | 19 | * browser.tabs.warnOnClose |
michael@0 | 20 | * - true if when closing a window with multiple tabs the user is warned and |
michael@0 | 21 | * allowed to cancel the action, false to just close the window |
michael@0 | 22 | * browser.tabs.warnOnOpen |
michael@0 | 23 | * - true if the user should be warned if he attempts to open a lot of tabs at |
michael@0 | 24 | * once (e.g. a large folder of bookmarks), false otherwise |
michael@0 | 25 | * browser.taskbar.previews.enable |
michael@0 | 26 | * - true if tabs are to be shown in the Windows 7 taskbar |
michael@0 | 27 | */ |
michael@0 | 28 | |
michael@0 | 29 | #ifdef XP_WIN |
michael@0 | 30 | /** |
michael@0 | 31 | * Initialize any platform-specific UI. |
michael@0 | 32 | */ |
michael@0 | 33 | init: function () { |
michael@0 | 34 | const Cc = Components.classes; |
michael@0 | 35 | const Ci = Components.interfaces; |
michael@0 | 36 | try { |
michael@0 | 37 | let sysInfo = Cc["@mozilla.org/system-info;1"]. |
michael@0 | 38 | getService(Ci.nsIPropertyBag2); |
michael@0 | 39 | let ver = parseFloat(sysInfo.getProperty("version")); |
michael@0 | 40 | let showTabsInTaskbar = document.getElementById("showTabsInTaskbar"); |
michael@0 | 41 | showTabsInTaskbar.hidden = ver < 6.1; |
michael@0 | 42 | } catch (ex) {} |
michael@0 | 43 | }, |
michael@0 | 44 | #endif |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * Determines where a link which opens a new window will open. |
michael@0 | 48 | * |
michael@0 | 49 | * @returns |true| if such links should be opened in new tabs |
michael@0 | 50 | */ |
michael@0 | 51 | readLinkTarget: function() { |
michael@0 | 52 | var openNewWindow = document.getElementById("browser.link.open_newwindow"); |
michael@0 | 53 | return openNewWindow.value != 2; |
michael@0 | 54 | }, |
michael@0 | 55 | |
michael@0 | 56 | /** |
michael@0 | 57 | * Determines where a link which opens a new window will open. |
michael@0 | 58 | * |
michael@0 | 59 | * @returns 2 if such links should be opened in new windows, |
michael@0 | 60 | * 3 if such links should be opened in new tabs |
michael@0 | 61 | */ |
michael@0 | 62 | writeLinkTarget: function() { |
michael@0 | 63 | var linkTargeting = document.getElementById("linkTargeting"); |
michael@0 | 64 | return linkTargeting.checked ? 3 : 2; |
michael@0 | 65 | } |
michael@0 | 66 | }; |