|
Lines 33-44
Link Here
|
| 33 |
* and other provisions required by the GPL or the LGPL. If you do not delete |
33 |
* and other provisions required by the GPL or the LGPL. If you do not delete |
| 34 |
* the provisions above, a recipient may use your version of this file under |
34 |
* the provisions above, a recipient may use your version of this file under |
| 35 |
* the terms of any one of the NPL, the GPL or the LGPL. |
35 |
* the terms of any one of the NPL, the GPL or the LGPL. |
| 36 |
* |
36 |
* |
| 37 |
* ***** END LICENSE BLOCK ***** */ |
37 |
* ***** END LICENSE BLOCK ***** */ |
| 38 |
|
38 |
|
|
|
39 |
#include <string.h> |
| 39 |
#include "nsPrefService.h" |
40 |
#include "nsPrefService.h" |
| 40 |
#include "nsAppDirectoryServiceDefs.h" |
41 |
#include "nsAppDirectoryServiceDefs.h" |
| 41 |
#include "nsDirectoryServiceDefs.h" |
42 |
#include "nsDirectoryServiceDefs.h" |
| 42 |
#include "nsICategoryManager.h" |
43 |
#include "nsICategoryManager.h" |
| 43 |
#include "nsCategoryManagerUtils.h" |
44 |
#include "nsCategoryManagerUtils.h" |
| 44 |
#include "nsNetUtil.h" |
45 |
#include "nsNetUtil.h" |
|
Lines 204-220
NS_IMETHODIMP nsPrefService::Observe(nsI
Link Here
|
| 204 |
} |
205 |
} |
| 205 |
|
206 |
|
| 206 |
|
207 |
|
| 207 |
NS_IMETHODIMP nsPrefService::ReadUserPrefs(nsIFile *aFile) |
208 |
NS_IMETHODIMP nsPrefService::ReadUserPrefs(nsIFile *aFile) |
| 208 |
{ |
209 |
{ |
| 209 |
nsresult rv; |
210 |
nsresult rv; |
|
|
211 |
PRBool rv2; |
| 210 |
|
212 |
|
| 211 |
if (nsnull == aFile) { |
213 |
if (nsnull == aFile) { |
| 212 |
rv = UseDefaultPrefFile(); |
214 |
rv = UseDefaultPrefFile(); |
| 213 |
UseUserPrefFile(); |
215 |
UseUserPrefFile(); |
| 214 |
|
216 |
|
|
|
217 |
rv2 = PREF_HasUserPref("general.skins.selectedSkin"); |
| 218 |
if (!rv2) { |
| 219 |
if (getenv("KDE_FULL_SESSION")) |
| 220 |
PREF_SetCharPref("general.skins.selectedSkin", "plastikfox"); |
| 221 |
else if (getenv("DESKTOP_SESSION") && !strcmp("gnome", getenv("DESKTOP_SESSION"))) |
| 222 |
PREF_SetCharPref("general.skins.selectedSkin", "tango"); |
| 223 |
else |
| 224 |
PREF_SetCharPref("general.skins.selectedSkin", "classic/1.0"); |
| 225 |
} |
| 226 |
|
| 215 |
NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID); |
227 |
NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID); |
| 216 |
|
228 |
|
| 217 |
} else { |
229 |
} else { |
| 218 |
rv = ReadAndOwnUserPrefFile(aFile); |
230 |
rv = ReadAndOwnUserPrefFile(aFile); |
| 219 |
} |
231 |
} |
| 220 |
return rv; |
232 |
return rv; |