Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue 5309: Issue with the Firebug.unregisterPanel()

  • Loading branch information...
commit 3c9483c07a1a11ca42571e635ec139539d4d18c7 1 parent 609df36
@janodvarko janodvarko authored
View
14 extension/content/firebug/chrome/chrome.js
@@ -841,7 +841,12 @@ var FirebugChrome =
syncSidePanels: function()
{
if (FBTrace.DBG_PANELS)
- FBTrace.sysout("syncSidePanels "+panelBar1.selectedPanel);
+ {
+ FBTrace.sysout("chrome.syncSidePanels; main panel: " +
+ (panelBar1.selectedPanel ? panelBar1.selectedPanel.name : "no panel") +
+ ", side panel: " +
+ (panelBar2.selectedPanel ? panelBar2.selectedPanel.name : "no panel"));
+ }
if (!panelBar1.selectedPanel)
return;
@@ -871,9 +876,15 @@ var FirebugChrome =
}
}
else
+ {
panelBar2.selectPanel(null);
+ }
+
+ if (FBTrace.DBG_PANELS)
+ FBTrace.sysout("chrome.syncSidePanels; selected side panel " + panelBar1.selectedPanel);
sidePanelDeck.selectedPanel = panelBar2;
+
Dom.collapse(sidePanelDeck, !panelBar2.selectedPanel);
Dom.collapse(panelSplitter, !panelBar2.selectedPanel);
},
@@ -1671,7 +1682,6 @@ var FirebugChrome =
appendToolbarButton: function(button, before)
{
- FBTrace.sysout("append Toolb button");
var toolbar = FirebugChrome.$("fbPanelBar1-buttons");
var element = Toolbar.createToolbarButton(toolbar, button, before);
element.repObject = button;
View
15 extension/content/firebug/firebug.js
@@ -533,8 +533,17 @@ window.Firebug =
panelTypeMap[arguments[i].prototype.name] = arguments[i];
if (FBTrace.DBG_REGISTRATION)
+ {
for (var i = 0; i < arguments.length; ++i)
- FBTrace.sysout("registerPanel "+arguments[i].prototype.name+"\n");
+ FBTrace.sysout("registerPanel "+arguments[i].prototype.name);
+ }
+
+ // If Firebug is not initialized yet the UI will be updated automatically soon.
+ if (!this.isInitialized)
+ return;
+
+ Firebug.chrome.syncMainPanels();
+ Firebug.chrome.syncSidePanels();
},
unregisterPanel: function(panelType)
@@ -579,6 +588,7 @@ window.Firebug =
// The panel tab must be removed from the UI.
Firebug.chrome.syncMainPanels();
+ Firebug.chrome.syncSidePanels();
},
registerRep: function()
@@ -971,6 +981,9 @@ window.Firebug =
getPanelTitle: function(panelType)
{
+ if (!panelType)
+ return null;
+
return panelType.prototype.title ? panelType.prototype.title
: Locale.$STR("Panel-"+panelType.prototype.name);
},
Please sign in to comment.
Something went wrong with that request. Please try again.