- shut up debug output
- fix decor fallback for dano git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27807 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+7
-7
@@ -608,7 +608,7 @@ status_t MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BP
|
|||||||
BDirectory dir;
|
BDirectory dir;
|
||||||
while (p.Length()) {
|
while (p.Length()) {
|
||||||
BString component;
|
BString component;
|
||||||
PRINT(("ParseWinPath: p.L %d p '%s'\n", p.Length(), p.String()));
|
//PRINT(("ParseWinPath: p.L %d p '%s'\n", p.Length(), p.String()));
|
||||||
int32 len = p.FindFirst('\\');
|
int32 len = p.FindFirst('\\');
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
len = p.Length();
|
len = p.Length();
|
||||||
@@ -617,8 +617,8 @@ status_t MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BP
|
|||||||
err = dir.SetTo(to.Path());
|
err = dir.SetTo(to.Path());
|
||||||
if (err < B_OK)
|
if (err < B_OK)
|
||||||
return err;
|
return err;
|
||||||
PRINT(("ParseWinPath: at '%s'\n", to.Path()));
|
//PRINT(("ParseWinPath: at '%s'\n", to.Path()));
|
||||||
PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
//PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
||||||
if (dir.Contains(component.String())) {
|
if (dir.Contains(component.String())) {
|
||||||
to.Append(component.String());
|
to.Append(component.String());
|
||||||
continue;
|
continue;
|
||||||
@@ -626,25 +626,25 @@ status_t MSThemeImporter::ParseWinPath(BDirectory &rootDir, const char *from, BP
|
|||||||
// can't find as is, try various capitalizations
|
// can't find as is, try various capitalizations
|
||||||
// (caseless fs SUXOR)
|
// (caseless fs SUXOR)
|
||||||
component.Capitalize();
|
component.Capitalize();
|
||||||
PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
//PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
||||||
if (dir.Contains(component.String())) {
|
if (dir.Contains(component.String())) {
|
||||||
to.Append(component.String());
|
to.Append(component.String());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
component.CapitalizeEachWord();
|
component.CapitalizeEachWord();
|
||||||
PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
//PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
||||||
if (dir.Contains(component.String())) {
|
if (dir.Contains(component.String())) {
|
||||||
to.Append(component.String());
|
to.Append(component.String());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
component.ToLower();
|
component.ToLower();
|
||||||
PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
//PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
||||||
if (dir.Contains(component.String())) {
|
if (dir.Contains(component.String())) {
|
||||||
to.Append(component.String());
|
to.Append(component.String());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
component.ToUpper();
|
component.ToUpper();
|
||||||
PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
//PRINT(("ParseWinPath: testing '%s'\n", component.String()));
|
||||||
if (dir.Contains(component.String())) {
|
if (dir.Contains(component.String())) {
|
||||||
to.Append(component.String());
|
to.Append(component.String());
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
+7
-3
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <Debug.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <InterfaceDefs.h>
|
#include <InterfaceDefs.h>
|
||||||
@@ -48,11 +49,13 @@
|
|||||||
status_t set_window_decor_safe(const char *name, BMessage *globals)
|
status_t set_window_decor_safe(const char *name, BMessage *globals)
|
||||||
{
|
{
|
||||||
// make sure the decor exists (set_window_decor() always returns B_OK)
|
// make sure the decor exists (set_window_decor() always returns B_OK)
|
||||||
|
//PRINT(("set_window_decor_safe(%s, %p)\n", name, globals));
|
||||||
BPath p("/etc/decors/");
|
BPath p("/etc/decors/");
|
||||||
p.Append(name);
|
p.Append(name);
|
||||||
BNode n(p.Path());
|
BNode n(p.Path());
|
||||||
if (n.InitCheck() < B_OK || !n.IsFile())
|
if (n.InitCheck() < B_OK || !n.IsFile())
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
|
//PRINT(("set_window_decor_safe: found\n"));
|
||||||
set_window_decor(name, globals);
|
set_window_decor(name, globals);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -135,8 +138,9 @@ status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags)
|
|||||||
|
|
||||||
#ifdef B_BEOS_VERSION_DANO
|
#ifdef B_BEOS_VERSION_DANO
|
||||||
bool decorDone = false;
|
bool decorDone = false;
|
||||||
|
int i;
|
||||||
// try each name until one works
|
// try each name until one works
|
||||||
for (int i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) {
|
for (i = 0; window_decor.FindString("window:decor", i, &decorName) == B_OK; i++) {
|
||||||
err = set_window_decor_safe(decorName.String(),
|
err = set_window_decor_safe(decorName.String(),
|
||||||
(window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL);
|
(window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL);
|
||||||
if (err < B_OK)
|
if (err < B_OK)
|
||||||
@@ -145,9 +149,9 @@ status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// none match but we did have one, force the default with the globals
|
// none match but we did have one, force the default with the globals
|
||||||
if (!decorDone && decorName.Length()) {
|
if (!decorDone && i > 0) {
|
||||||
decorDone = true;
|
decorDone = true;
|
||||||
set_window_decor_safe(decorName.String(),
|
set_window_decor("Default",
|
||||||
(window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL);
|
(window_decor.FindMessage("window:decor_globals", &globals) == B_OK)?&globals:NULL);
|
||||||
}
|
}
|
||||||
// none... maybe R5 number ?
|
// none... maybe R5 number ?
|
||||||
|
|||||||
Reference in New Issue
Block a user