Jacek Caban : mshtml: Move preferences settings to separated function.

Alexandre Julliard julliard at winehq.org
Mon Dec 22 10:19:39 CST 2008


Module: wine
Branch: master
Commit: e2cb0c82a6f4705eff58212f4d31d4ce53e9a34e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e2cb0c82a6f4705eff58212f4d31d4ce53e9a34e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Dec 22 01:10:56 2008 +0100

mshtml: Move preferences settings to separated function.

---

 dlls/mshtml/nsembed.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c
index 34bc6d5..a653e24 100644
--- a/dlls/mshtml/nsembed.c
+++ b/dlls/mshtml/nsembed.c
@@ -371,7 +371,6 @@ static void set_bool_pref(nsIPrefBranch *pref, const char *pref_name, BOOL val)
 
 static void set_profile(void)
 {
-    nsIPrefBranch *pref;
     nsIProfile *profile;
     PRBool exists = FALSE;
     nsresult nsres;
@@ -397,6 +396,12 @@ static void set_profile(void)
         ERR("SetCurrentProfile failed: %08x\n", nsres);
 
     nsIProfile_Release(profile);
+}
+
+static void set_preferences(void)
+{
+    nsIPrefBranch *pref;
+    nsresult nsres;
 
     nsres = nsIServiceManager_GetServiceByContractID(pServMgr, NS_PREFERENCES_CONTRACTID,
             &IID_nsIPrefBranch, (void**)&pref);
@@ -469,6 +474,7 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
     }
 
     set_profile();
+    set_preferences();
 
     nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, NS_MEMORY_CONTRACTID,
             NULL, &IID_nsIMemory, (void**)&nsmem);




More information about the wine-cvs mailing list