1 /* See license.txt for terms of usage */ 2 3 define([ 4 "firebug/lib/object", 5 "firebug/lib/options", 6 "firebug/firebug", 7 "firebug/lib/dom", 8 "firebug/chrome/firefox", 9 ], 10 function(Obj, Options, Firebug, Dom, Firefox) { 11 12 // ********************************************************************************************* // 13 // Constants 14 15 const Cc = Components.classes; 16 const Ci = Components.interfaces; 17 18 const versionChecker = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator); 19 const appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); 20 21 // ********************************************************************************************* // 22 23 /** 24 * This module is responsible for varisous hacky solutions related to known issues. 25 */ 26 Firebug.KnownIssues = Obj.extend(Firebug.Module, 27 /** @lends Firebug.KnownIssues */ 28 { 29 dispatchName: "knownIssues", 30 31 initialize: function() 32 { 33 var popupPrefName = "commandLineShowCompleterPopup"; 34 if (/Linux/.test(window.navigator.platform)) 35 Options.register(popupPrefName, false); 36 else 37 Options.register(popupPrefName, true); 38 39 Firebug.commandLineShowCompleterPopup = Firebug.Options.get(popupPrefName); 40 41 // In Firefox 4.0b7+ the addon-toolbar is not showing up. We'll show it once just 42 // in case the user overlooks the new Firebug start-button in the toolbar. As soon 43 // as users will get used to the toolbar button this could be removed completely. 44 if (!Firebug.addonBarOpened) 45 { 46 var addonBar = Firefox.getElementById("addon-bar"); 47 48 // Open the addon bar 49 Dom.collapse(addonBar, false); 50 document.persist("addon-bar", "collapsed"); 51 52 // This is just one time operation. 53 Firebug.Options.set("addonBarOpened", true); 54 } 55 56 if (FBTrace.DBG_INITIALIZE) 57 FBTrace.sysout("Set commandLineShowCompleterPopup " + 58 Firebug.commandLineShowCompleterPopup); 59 }, 60 61 internationalizeUI: function(doc) 62 { 63 // See also issue 4529. Since the memory profiler is still a lab thing, 64 // hide the "Memory Profiler" button begin a pref. 65 // xxxHonza: removed from 1.10 (issue 5599) 66 /*if (!Options.get("memoryProfilerEnable")) 67 { 68 var button = doc.getElementById("fbToggleMemoryProfiling"); 69 if (button) 70 Dom.collapse(button, true); 71 }*/ 72 } 73 }); 74 75 // ********************************************************************************************* // 76 // Registration 77 78 Firebug.registerModule(Firebug.KnownIssues); 79 80 return Firebug.KnownIssues; 81 82 // ********************************************************************************************* // 83 }); 84