diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index 6cdafdd5a9ac..dff20778831c 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -1399,13 +1399,21 @@ function URLBarKeyupHandler(aEvent) function checkForDefaultBrowser() { const NS_WINHOOKS_CONTRACTID = "@mozilla.org/winhooks;1"; + var dialogShown = false; if (NS_WINHOOKS_CONTRACTID in Components.classes) { try { - Components.classes[NS_WINHOOKS_CONTRACTID] - .getService(Components.interfaces.nsIWindowsHooks) - .checkSettings(window); + dialogShown = Components.classes[NS_WINHOOKS_CONTRACTID] + .getService(Components.interfaces.nsIWindowsHooks) + .checkSettings(window); } catch(e) { } + + if (dialogShown) + { + // Force the sidebar to build since the windows + // integration dialog may have come up. + SidebarRebuild(); + } } } diff --git a/xpfe/components/sidebar/resources/sidebarOverlay.js b/xpfe/components/sidebar/resources/sidebarOverlay.js index 0d156b5169c8..c0164e466750 100644 --- a/xpfe/components/sidebar/resources/sidebarOverlay.js +++ b/xpfe/components/sidebar/resources/sidebarOverlay.js @@ -861,6 +861,12 @@ function SidebarStopPanelLoad(header) { function SidebarReload() { sidebarObj.panels.refresh(); } + +function SidebarRebuild() { + var panels = document.getElementById("sidebar-panels"); + panels.builder.rebuild(); + sidebar_open_default_panel(100, 0); +} // Set up a lame hack to avoid opening two customize // windows on a double click. diff --git a/xpfe/components/winhooks/nsIWindowsHooks.idl b/xpfe/components/winhooks/nsIWindowsHooks.idl index 3902b980e131..616e725faee5 100644 --- a/xpfe/components/winhooks/nsIWindowsHooks.idl +++ b/xpfe/components/winhooks/nsIWindowsHooks.idl @@ -167,7 +167,8 @@ interface nsIWindowsHooks : nsISupports { // service is called. // aParent - parent window for any dialogs that // will appear - void checkSettings( in nsIDOMWindowInternal aParent ); + // Returns true if the windows integration dialog was shown + boolean checkSettings( in nsIDOMWindowInternal aParent ); /** * Returns true if the "(appname) QuickLaunch" value is in the diff --git a/xpfe/components/winhooks/nsWindowsHooks.cpp b/xpfe/components/winhooks/nsWindowsHooks.cpp index 6f6515eee4b6..172f0913f482 100644 --- a/xpfe/components/winhooks/nsWindowsHooks.cpp +++ b/xpfe/components/winhooks/nsWindowsHooks.cpp @@ -273,8 +273,10 @@ static PRBool isAccessRestricted() { // Implementation of method that checks settings versus registry and prompts user // if out of synch. NS_IMETHODIMP -nsWindowsHooks::CheckSettings( nsIDOMWindowInternal *aParent ) { +nsWindowsHooks::CheckSettings( nsIDOMWindowInternal *aParent, + PRBool *_retval ) { nsresult rv = NS_OK; + *_retval = PR_FALSE; // Only do this once! static PRBool alreadyChecked = PR_FALSE; @@ -407,6 +409,9 @@ nsWindowsHooks::CheckSettings( nsIDOMWindowInternal *aParent ) { nsnull, nsnull, nsnull, labelArg, &showDialog, &dlgResult); if ( NS_SUCCEEDED( rv ) ) { + // Dialog was shown + *_retval = PR_TRUE; + // Did they say go ahead? switch ( dlgResult ) { case 0: