Fixes a bug in Deskbar not using default icon size

My recent changes to Deskbar to support different icon sizes
checks your settings file for an icon size setting and resizes
to that. Unfortunately if your existing settings file doesn't
have that setting it sets the icon size to 0. I followed the example
of other integer settings when I wrote the code, unfortunately
they were broken too so I copied an error. I have fixed that setting
and a couple others to use the reset back to default if the setting
is not found in your settings file.
This commit is contained in:
John Scipione 2012-04-07 21:01:57 -04:00
parent 363a49a64e
commit e73a037077
1 changed files with 12 additions and 2 deletions

View File

@ -284,10 +284,16 @@ TBarApp::InitSettings()
storedSettings.FindBool("top", &settings.top);
storedSettings.FindBool("ampmMode", &settings.ampmMode);
storedSettings.FindInt32("state", (int32*)&settings.state);
if (storedSettings.FindInt32("state", (int32*)&settings.state)
< B_OK) {
settings.state = kExpandoState;
}
storedSettings.FindFloat("width", &settings.width);
storedSettings.FindBool("showTime", &settings.showTime);
storedSettings.FindPoint("switcherLoc", &settings.switcherLoc);
if (storedSettings.FindPoint("switcherLoc", &settings.switcherLoc)
< B_OK) {
settings.switcherLoc = BPoint(5000, 5000);
}
storedSettings.FindInt32("recentAppsCount",
&settings.recentAppsCount);
storedSettings.FindInt32("recentDocsCount",
@ -305,6 +311,10 @@ TBarApp::InitSettings()
storedSettings.FindBool("superExpando", &settings.superExpando);
storedSettings.FindBool("expandNewTeams", &settings.expandNewTeams);
storedSettings.FindBool("hideLabels", &settings.hideLabels);
if (storedSettings.FindInt32("iconSize", (int32*)&settings.iconSize)
< B_OK) {
settings.iconSize = kMinimumIconSize;
}
storedSettings.FindInt32("iconSize", (int32*)&settings.iconSize);
storedSettings.FindBool("autoRaise", &settings.autoRaise);
storedSettings.FindBool("autoHide", &settings.autoHide);