From 45e14c92c20e05ec002c19e05e6d4767f998aaa9 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Sat, 25 Sep 1999 20:10:29 +0000 Subject: [PATCH] Switch to local throbber git-svn-id: svn://10.0.0.236/trunk@49065 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webshell/tests/viewer/Makefile.in | 1 + mozilla/webshell/tests/viewer/makefile.win | 1 + mozilla/webshell/tests/viewer/nsBrowserWindow.cpp | 10 ++-------- mozilla/webshell/tests/viewer/nsBrowserWindow.h | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/mozilla/webshell/tests/viewer/Makefile.in b/mozilla/webshell/tests/viewer/Makefile.in index d44c089395e..c0307e5d054 100644 --- a/mozilla/webshell/tests/viewer/Makefile.in +++ b/mozilla/webshell/tests/viewer/Makefile.in @@ -37,6 +37,7 @@ CPPSRCS = \ nsBrowserWindow.cpp \ nsEditorMode.cpp \ nsSetupRegistry.cpp \ + nsThrobber.cpp \ nsViewerApp.cpp \ nsWebCrawler.cpp \ $(NULL) diff --git a/mozilla/webshell/tests/viewer/makefile.win b/mozilla/webshell/tests/viewer/makefile.win index 0c7069d86bc..d980dac64ee 100644 --- a/mozilla/webshell/tests/viewer/makefile.win +++ b/mozilla/webshell/tests/viewer/makefile.win @@ -39,6 +39,7 @@ OBJS = \ .\$(OBJDIR)\nsBrowserWindow.obj \ .\$(OBJDIR)\nsEditorMode.obj \ .\$(OBJDIR)\nsSetupRegistry.obj \ + .\$(OBJDIR)\nsThrobber.obj \ .\$(OBJDIR)\nsViewerApp.obj \ .\$(OBJDIR)\nsWebCrawler.obj \ .\$(OBJDIR)\nsWinMain.obj \ diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index 378432631e1..4fb1407ce18 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -33,7 +33,6 @@ #include "nsIButton.h" #include "nsIImageGroup.h" #include "nsITimer.h" -#include "nsIThrobber.h" #include "nsIDOMDocument.h" #include "nsIURL.h" #include "nsIFileWidget.h" @@ -57,6 +56,7 @@ #include "nsIPresContext.h" #include "nsIDocument.h" #include "nsILayoutDebugger.h" +#include "nsThrobber.h" #include "nsXIFDTD.h" #include "nsIParser.h" @@ -147,7 +147,6 @@ static NS_DEFINE_CID(kBrowserWindowCID, NS_BROWSER_WINDOW_CID); static NS_DEFINE_CID(kButtonCID, NS_BUTTON_CID); static NS_DEFINE_CID(kFileWidgetCID, NS_FILEWIDGET_CID); static NS_DEFINE_CID(kTextFieldCID, NS_TEXTFIELD_CID); -static NS_DEFINE_CID(kThrobberCID, NS_THROBBER_CID); static NS_DEFINE_CID(kWebShellCID, NS_WEB_SHELL_CID); static NS_DEFINE_CID(kWindowCID, NS_WINDOW_CID); static NS_DEFINE_CID(kDialogCID, NS_DIALOG_CID); @@ -165,7 +164,6 @@ static NS_DEFINE_IID(kIFileWidgetIID, NS_IFILEWIDGET_IID); static NS_DEFINE_IID(kIStreamObserverIID, NS_ISTREAMOBSERVER_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kITextWidgetIID, NS_ITEXTWIDGET_IID); -static NS_DEFINE_IID(kIThrobberIID, NS_ITHROBBER_IID); static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); static NS_DEFINE_IID(kIWebShellContainerIID, NS_IWEB_SHELL_CONTAINER_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); @@ -1367,11 +1365,7 @@ nsBrowserWindow::CreateToolBar(PRInt32 aWidth) // Create and place throbber r.SetRect(aWidth - THROBBER_WIDTH, 0, THROBBER_WIDTH, THROBBER_HEIGHT); - rv = nsComponentManager::CreateInstance(kThrobberCID, nsnull, kIThrobberIID, - (void**)&mThrobber); - if (NS_OK != rv) { - return rv; - } + mThrobber = nsThrobber::NewThrobber(); nsString throbberURL(THROBBER_AT); mThrobber->Init(mWindow, r, throbberURL, THROB_NUM); mThrobber->Show(); diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.h b/mozilla/webshell/tests/viewer/nsBrowserWindow.h index 087355e8d6a..45000f62816 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.h +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.h @@ -47,7 +47,7 @@ class nsICheckButton; class nsIRadioButton; class nsITextWidget; class nsIButton; -class nsIThrobber; +class nsThrobber; class nsViewerApp; class nsIDocumentViewer; class nsIPresContext; @@ -243,7 +243,7 @@ public: nsITextWidget* mLocation; nsIButton* mBack; nsIButton* mForward; - nsIThrobber* mThrobber; + nsThrobber* mThrobber; // "Status bar" nsITextWidget* mStatus;