зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug #2343 - Preferences are not initialized in the apprunner...
This commit is contained in:
Родитель
d100dc959e
Коммит
8d15a665eb
|
@ -44,6 +44,7 @@ LINCS=-I$(PUBLIC)\raptor \
|
|||
-I$(PUBLIC)\base \
|
||||
-I$(PUBLIC)\dom \
|
||||
-I$(PUBLIC)\js \
|
||||
-I$(PUBLIC)\pref \
|
||||
-I$(PUBLIC)\appcores \
|
||||
-I$(PUBLIC)\netlib
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
|
@ -73,6 +74,9 @@ static NS_DEFINE_IID(kMenuBarCID, NS_MENUBAR_CID);
|
|||
static NS_DEFINE_IID(kMenuCID, NS_MENU_CID);
|
||||
static NS_DEFINE_IID(kMenuItemCID, NS_MENUITEM_CID);
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
|
||||
/* Define Interface IDs */
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIWebShellWindowIID, NS_IWEBSHELL_WINDOW_IID);
|
||||
|
@ -233,7 +237,23 @@ nsresult nsWebShellWindow::Initialize(nsIWidget* aParent,
|
|||
if (nsnull != docLoader) {
|
||||
docLoader->AddObserver((nsIDocumentLoaderObserver *)this);
|
||||
}
|
||||
/// webShell->SetPrefs(aPrefs);
|
||||
|
||||
/*
|
||||
* XXX: How should preferences be supplied to the nsWebShellWindow?
|
||||
* Should there be the notion of a global preferences service?
|
||||
* Or should there be many preferences components based on
|
||||
* the user profile...
|
||||
*/
|
||||
// Initialize the webshell with the preferences service
|
||||
nsIPref *prefs;
|
||||
|
||||
rv = nsServiceManager::GetService(kPrefCID,
|
||||
nsIPref::GetIID(),
|
||||
(nsISupports **)&prefs);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mWebShell->SetPrefs(prefs);
|
||||
nsServiceManager::ReleaseService(kPrefCID, prefs);
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(mCallbacks);
|
||||
mCallbacks = aCallbacks;
|
||||
|
|
Загрузка…
Ссылка в новой задаче