mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 161751 Can't switch themes when certain prefs are set r=bsmedberg sr=darin
This commit is contained in:
parent
10c9f68c60
commit
7e4ee2c304
@ -2958,20 +2958,6 @@ nsresult nsChromeRegistry::LoadProfileDataSource()
|
||||
rv = AddToCompositeDataSource(PR_TRUE);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// XXX this sucks ASS. This is a temporary hack until we get
|
||||
// around to fixing the skin switching bugs.
|
||||
// Select and Remove skins based on a pref set in a previous session.
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefBranch) {
|
||||
nsXPIDLCString skinToSelect;
|
||||
rv = prefBranch->GetCharPref("general.skins.selectedSkin", getter_Copies(skinToSelect));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = SelectSkin(skinToSelect, PR_TRUE);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
prefBranch->DeleteBranch("general.skins.selectedSkin");
|
||||
}
|
||||
}
|
||||
|
||||
// We have to flush the chrome skin cache...
|
||||
FlushSkinCaches();
|
||||
}
|
||||
@ -3288,6 +3274,20 @@ NS_IMETHODIMP nsChromeRegistry::Observe(nsISupports *aSubject, const char *aTopi
|
||||
if (!mProfileInitialized) {
|
||||
rv = LoadProfileDataSource();
|
||||
}
|
||||
|
||||
// XXX this sucks ASS. This is a temporary hack until we get
|
||||
// around to fixing the skin switching bugs.
|
||||
// Select and Remove skins based on a pref set in a previous session.
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefBranch) {
|
||||
nsXPIDLCString skinToSelect;
|
||||
rv = prefBranch->GetCharPref("general.skins.selectedSkin", getter_Copies(skinToSelect));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = SelectSkin(skinToSelect, PR_TRUE);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
prefBranch->DeleteBranch("general.skins.selectedSkin");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user