From 8d7c00d4f49feac3ec632bccb4671880425c6c1a Mon Sep 17 00:00:00 2001 From: "tingley%sundell.net" Date: Mon, 18 Aug 2003 04:41:46 +0000 Subject: [PATCH] Fix the broken tabs menu in the sidebar, and clean up a related idiom in the prefs window. bug 211088: r=rjc, sr=bz, a=asa. --- .../prefwindow/resources/content/pref-applications.js | 8 +++----- xpfe/components/sidebar/resources/sidebarOverlay.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xpfe/components/prefwindow/resources/content/pref-applications.js b/xpfe/components/prefwindow/resources/content/pref-applications.js index a5d8bbbe02d..2797c46eb92 100644 --- a/xpfe/components/prefwindow/resources/content/pref-applications.js +++ b/xpfe/components/prefwindow/resources/content/pref-applications.js @@ -36,8 +36,7 @@ function newType() var handlerOverride = new HandlerOverride(); window.openDialog("chrome://communicator/content/pref/pref-applications-edit.xul", "appEdit", "chrome,modal=yes,resizable=no", handlerOverride); if (gNewTypeRV) { - //gList.builder.rebuild(); - gList.setAttribute("ref", "urn:mimetypes"); + gList.builder.rebuild(); gNewTypeRV = null; } } @@ -58,7 +57,7 @@ function removeType() } } removeOverride(handlerOverride.mimeType); - gList.setAttribute("ref", "urn:mimetypes"); + gList.builder.rebuild(); selectApplication(); } @@ -184,8 +183,7 @@ function Startup() // intialize the listbox gList.database.AddDataSource(gDS); - gList.removeAttribute("ref"); // Remove the attr so the set is not a no-op - gList.setAttribute("ref", "urn:mimetypes"); + gList.builder.rebuild(); // Test whether the data source is already loaded. if (gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).loaded) { diff --git a/xpfe/components/sidebar/resources/sidebarOverlay.js b/xpfe/components/sidebar/resources/sidebarOverlay.js index 698d1de5453..82ae3703845 100644 --- a/xpfe/components/sidebar/resources/sidebarOverlay.js +++ b/xpfe/components/sidebar/resources/sidebarOverlay.js @@ -1240,7 +1240,6 @@ function SidebarShowHide() { function SidebarBuildPickerPopup() { var menu = document.getElementById('sidebar-panel-picker-popup'); menu.database.AddDataSource(RDF.GetDataSource(sidebarObj.datasource_uri)); - menu.setAttribute('ref', sidebarObj.resource); for (var ii=3; ii < menu.childNodes.length; ii++) { var panel_menuitem = menu.childNodes.item(ii); @@ -1252,6 +1251,7 @@ function SidebarBuildPickerPopup() { panel_menuitem.setAttribute('checked', 'true'); } } + menu.builder.rebuild(); } function SidebarTogglePanel(panel_menuitem) {