Only quit the loop on ENOENT to try and load next themes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23805 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef01092096
commit
1258015bc1
8
3rdparty/mmu_man/themes/BeThemeImporter.cpp
vendored
8
3rdparty/mmu_man/themes/BeThemeImporter.cpp
vendored
@ -87,7 +87,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
return err;
|
||||
err = settingsDir.SetTo(&dir, "Settings");
|
||||
if (err < 0)
|
||||
return err;
|
||||
return B_ERROR;
|
||||
PRINT(("BeThemeImporter: importing from '%s'\n", path.Path()));
|
||||
|
||||
BMessage global(Z_THEME_MESSAGE_WHAT);
|
||||
@ -105,7 +105,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
|
||||
err = file.SetTo(&settingsDir, "Description", B_READ_ONLY);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
return B_ERROR;
|
||||
BString str;
|
||||
char *buff;
|
||||
buff = str.LockBuffer(1024);
|
||||
@ -120,7 +120,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
|
||||
err = file.SetTo(&settingsDir, "Deskbar", B_READ_ONLY);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
return B_ERROR;
|
||||
str = "";
|
||||
buff = str.LockBuffer(1024);
|
||||
memset(buff, 0, 1024);
|
||||
@ -151,7 +151,7 @@ status_t BeThemeImporter::ImportNextTheme(BMessage **theme)
|
||||
|
||||
err = file.SetTo(&settingsDir, "WorkSpaces", B_READ_ONLY);
|
||||
if (err < B_OK)
|
||||
return err;
|
||||
return B_ERROR;
|
||||
buff = str.LockBuffer(1024);
|
||||
memset(buff, 0, 1024);
|
||||
file.Read(buff, 1024);
|
||||
|
5
3rdparty/mmu_man/themes/ThemeManager.cpp
vendored
5
3rdparty/mmu_man/themes/ThemeManager.cpp
vendored
@ -990,8 +990,9 @@ status_t ThemeManager::ImportThemesFor(int32 index, const char *path)
|
||||
err = importer->FetchThemes();
|
||||
if (err < 0)
|
||||
return err;
|
||||
while ((importer->ImportNextTheme(&theme)) >= 0) {
|
||||
AddTheme(theme);
|
||||
while ((err = importer->ImportNextTheme(&theme)) != ENOENT) {
|
||||
if (err >= 0)
|
||||
AddTheme(theme);
|
||||
}
|
||||
importer->EndImports();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user