diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index c25a0d3f5b..20804b0b8e 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -526,7 +526,8 @@ Desktop::Init() } // now that the mode is set, see if we should increase the default font size - if (fSettings->DefaultPlainFont() == *gFontManager->DefaultPlainFont()) { + if (fSettings->DefaultPlainFont() == *gFontManager->DefaultPlainFont() + && !fSettings->DidLoadSettings()) { float fontSize = fSettings->DefaultPlainFont().Size(); gScreenManager->Lock(); Screen* screen = gScreenManager->ScreenAt(0); diff --git a/src/servers/app/DesktopSettings.cpp b/src/servers/app/DesktopSettings.cpp index aee25a5303..972f75f6cd 100644 --- a/src/servers/app/DesktopSettings.cpp +++ b/src/servers/app/DesktopSettings.cpp @@ -34,7 +34,7 @@ DesktopSettingsPrivate::DesktopSettingsPrivate(server_read_only_memory* shared) { // if the on-disk settings are not complete, the defaults will be kept _SetDefaults(); - _Load(); + fLoadStatus = _Load(); } @@ -111,6 +111,7 @@ DesktopSettingsPrivate::_Load() status_t status = _GetPath(basePath); if (status < B_OK) return status; + int32 loadFailures = 0; // read workspaces settings @@ -137,8 +138,10 @@ DesktopSettingsPrivate::_Load() i, &fWorkspaceMessages[i]) == B_OK) { i++; } - } - } + } else + loadFailures++; + } else + loadFailures++; // read font settings @@ -185,8 +188,10 @@ DesktopSettingsPrivate::_Load() gDefaultHintingMode = hinting; gFontManager->Unlock(); - } - } + } else + loadFailures++; + } else + loadFailures++; // read mouse settings @@ -214,8 +219,10 @@ DesktopSettingsPrivate::_Load() == B_OK) { fAcceptFirstClick = acceptFirstClick; } - } - } + } else + loadFailures++; + } else + loadFailures++; // read appearance settings @@ -308,8 +315,10 @@ DesktopSettingsPrivate::_Load() fShared.colors[i] = B_TRANSPARENT_COLOR; } } - } - } + } else + loadFailures++; + } else + loadFailures++; // read dragger settings @@ -323,10 +332,12 @@ DesktopSettingsPrivate::_Load() if (status == B_OK) { if (settings.FindBool("show", &fShowAllDraggers) != B_OK) fShowAllDraggers = true; - } - } + } else + loadFailures++; + } else + loadFailures++; - return B_OK; + return (loadFailures > 0) ? B_PARTIAL_READ : B_OK; } diff --git a/src/servers/app/DesktopSettingsPrivate.h b/src/servers/app/DesktopSettingsPrivate.h index 0aae7a48cb..7b061280ca 100644 --- a/src/servers/app/DesktopSettingsPrivate.h +++ b/src/servers/app/DesktopSettingsPrivate.h @@ -27,6 +27,8 @@ public: server_read_only_memory* shared); ~DesktopSettingsPrivate(); + bool DidLoadSettings() const + { return fLoadStatus == B_OK; } status_t Save(uint32 mask = kAllSettings); void SetDefaultPlainFont(const ServerFont& font); @@ -102,6 +104,8 @@ private: void _ValidateWorkspacesLayout(int32& columns, int32& rows) const; + status_t fLoadStatus; + ServerFont fPlainFont; ServerFont fBoldFont; ServerFont fFixedFont;