From ae0e40586a1f88115e92af42adbd323e9adeb4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 1 Oct 2008 04:19:30 +0000 Subject: [PATCH] Guidelinizationing again... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27810 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../themes/addons/BackgroundsAddon.cpp | 47 ++++++++++---- 3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp | 31 +++++++--- .../themes/addons/BeOSWindowDecorAddon.cpp | 34 +++++++--- .../themes/addons/DanoUISettingsAddon.cpp | 31 +++++++--- .../mmu_man/themes/addons/DeskbarAddon.cpp | 31 +++++++--- 3rdparty/mmu_man/themes/addons/EddieAddon.cpp | 31 +++++++--- .../themes/addons/HaikuUISettingsAddon.cpp | 32 +++++++--- .../themes/addons/HaikuWindowDecorAddon.cpp | 36 ++++++++--- 3rdparty/mmu_man/themes/addons/PeAddon.cpp | 31 +++++++--- .../themes/addons/ScreensaverAddon.cpp | 31 +++++++--- .../themes/addons/SoundplayColorAddon.cpp | 30 ++++++--- .../mmu_man/themes/addons/SoundsAddon.cpp | 31 +++++++--- .../mmu_man/themes/addons/TerminalAddon.cpp | 59 +++++++++++++----- .../mmu_man/themes/addons/WinampSkinAddon.cpp | 62 ++++++++++++++----- 14 files changed, 395 insertions(+), 122 deletions(-) diff --git a/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp b/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp index 2cd2c0fd97..edc0e8ede0 100644 --- a/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/BackgroundsAddon.cpp @@ -33,6 +33,7 @@ #define B__DESKTOP_COLOR "be:desktop_color" + class BackgroundThemesAddon : public ThemesAddon { public: BackgroundThemesAddon(); @@ -58,21 +59,27 @@ status_t BackupFiles(BMessage &theme, BDirectory &folder); }; + BackgroundThemesAddon::BackgroundThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + BackgroundThemesAddon::~BackgroundThemesAddon() { } -const char *BackgroundThemesAddon::Description() + +const char * +BackgroundThemesAddon::Description() { return A_DESCRIPTION; } -status_t BackgroundThemesAddon::RunPreferencesPanel() + +status_t +BackgroundThemesAddon::RunPreferencesPanel() { /* if (be_roster->Launch("application/x-vnd.obos-Backgrounds") < B_OK) if (be_roster->Launch("application/x-vnd.Be-Backgrounds") < B_OK) @@ -104,7 +111,9 @@ status_t BackgroundThemesAddon::RunPreferencesPanel() return err; } -status_t BackgroundThemesAddon::AddNames(BMessage &names) + +status_t +BackgroundThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_BACKGROUND_SETTINGS, "Desktop backgrounds and color; please respect count and ordering of all fields!"); names.AddString(B_BACKGROUND_WORKSPACES, "Workspaces each backdrop apply to"); @@ -116,7 +125,9 @@ status_t BackgroundThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t BackgroundThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +BackgroundThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage backgrounds; status_t err = B_OK; @@ -177,7 +188,9 @@ getout: return err; } -status_t BackgroundThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +BackgroundThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage backgrounds; status_t err = B_OK; @@ -239,7 +252,9 @@ getout: return err; } -status_t BackgroundThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +BackgroundThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage backgrounds; @@ -250,20 +265,26 @@ status_t BackgroundThemesAddon::ApplyDefaultTheme(uint32 flags) return ApplyTheme(theme, flags); } -status_t BackgroundThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) -{ - (void)theme; (void)folder; - return B_OK; -} -status_t BackgroundThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) +status_t +BackgroundThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) { (void)theme; (void)folder; return B_OK; } -ThemesAddon *instantiate_themes_addon() +status_t +BackgroundThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) +{ + (void)theme; (void)folder; + return B_OK; +} + + +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new BackgroundThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp b/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp index 9c343b18aa..b034ca2272 100644 --- a/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/BeIDEAddon.cpp @@ -32,6 +32,7 @@ #define BEIDE_SETTINGS_NAME "Metrowerks/BeIDE_Prefs" + // __PACKED struct beide_editor_pref { uint32 dummy; /* BIG ENDIAN */ @@ -66,32 +67,42 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + BeIDEThemesAddon::BeIDEThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + BeIDEThemesAddon::~BeIDEThemesAddon() { } -const char *BeIDEThemesAddon::Description() + +const char * +BeIDEThemesAddon::Description() { return A_DESCRIPTION; } -status_t BeIDEThemesAddon::RunPreferencesPanel() + +status_t +BeIDEThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t BeIDEThemesAddon::AddNames(BMessage &names) + +status_t +BeIDEThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_BEIDE_SETTINGS, "BeIDE Settings"); return B_OK; } -status_t BeIDEThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +BeIDEThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -166,13 +177,17 @@ status_t BeIDEThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t BeIDEThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +BeIDEThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t BeIDEThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +BeIDEThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -185,7 +200,9 @@ status_t BeIDEThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new BeIDEThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp b/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp index afa4a3cd60..a9e54f7132 100644 --- a/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/BeOSWindowDecorAddon.cpp @@ -45,8 +45,10 @@ #define A_MSGNAME Z_THEME_WINDOW_DECORATIONS #define A_DESCRIPTION "Window decorations and scrollbars" + #ifdef B_BEOS_VERSION_DANO -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) //PRINT(("set_window_decor_safe(%s, %p)\n", name, globals)); @@ -79,21 +81,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + DecorThemesAddon::DecorThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DecorThemesAddon::~DecorThemesAddon() { } -const char *DecorThemesAddon::Description() + +const char * +DecorThemesAddon::Description() { return A_DESCRIPTION; } -status_t DecorThemesAddon::RunPreferencesPanel() + +status_t +DecorThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -113,7 +121,9 @@ status_t DecorThemesAddon::RunPreferencesPanel() return err; } -status_t DecorThemesAddon::AddNames(BMessage &names) + +status_t +DecorThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_WINDOW_DECORATIONS, "Window decorations and scrollbars"); names.AddString("window:decor", "Window decor"); @@ -121,7 +131,9 @@ status_t DecorThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -261,7 +273,9 @@ extern void __set_window_decor(int32 theme); return B_OK; } -status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -287,7 +301,9 @@ status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DecorThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage window_decor; @@ -298,9 +314,11 @@ status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DecorThemesAddon; } + #endif /* B_BEOS_VERSION && !__HAIKU__ */ diff --git a/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp b/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp index a05712a5e2..8c4c459a15 100644 --- a/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/DanoUISettingsAddon.cpp @@ -28,6 +28,7 @@ #define A_MSGNAME Z_THEME_UI_SETTINGS #define A_DESCRIPTION "System colors, fonts and other goodies" + class UISettingsThemesAddon : public ThemesAddon { public: UISettingsThemesAddon(); @@ -45,21 +46,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + UISettingsThemesAddon::UISettingsThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + UISettingsThemesAddon::~UISettingsThemesAddon() { } -const char *UISettingsThemesAddon::Description() + +const char * +UISettingsThemesAddon::Description() { return A_DESCRIPTION; } -status_t UISettingsThemesAddon::RunPreferencesPanel() + +status_t +UISettingsThemesAddon::RunPreferencesPanel() { status_t err = B_OK; entry_ref ref; @@ -90,7 +97,9 @@ status_t UISettingsThemesAddon::RunPreferencesPanel() return err; } -status_t UISettingsThemesAddon::AddNames(BMessage &names) + +status_t +UISettingsThemesAddon::AddNames(BMessage &names) { BMessage uisettings; BMessage uinames; @@ -113,7 +122,9 @@ status_t UISettingsThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BFont fnt; @@ -153,7 +164,9 @@ status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BMessage names; @@ -181,7 +194,9 @@ status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -205,9 +220,11 @@ status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new UISettingsThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ diff --git a/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp b/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp index ca2d3b6384..f3821254f9 100644 --- a/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/DeskbarAddon.cpp @@ -23,6 +23,7 @@ #define A_MSGNAME Z_THEME_DESKBAR_SETTINGS #define A_DESCRIPTION "Deskbar on-screen position" + class DeskbarThemesAddon : public ThemesAddon { public: DeskbarThemesAddon(); @@ -40,21 +41,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + DeskbarThemesAddon::DeskbarThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DeskbarThemesAddon::~DeskbarThemesAddon() { } -const char *DeskbarThemesAddon::Description() + +const char * +DeskbarThemesAddon::Description() { return A_DESCRIPTION; } -status_t DeskbarThemesAddon::RunPreferencesPanel() + +status_t +DeskbarThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -83,7 +90,9 @@ status_t DeskbarThemesAddon::RunPreferencesPanel() return err; } -status_t DeskbarThemesAddon::AddNames(BMessage &names) + +status_t +DeskbarThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_DESKBAR_SETTINGS, "Deskbar position"); names.AddString("db:location", "Deskbar on-screen position"); @@ -91,7 +100,9 @@ status_t DeskbarThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t DeskbarThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DeskbarThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage deskbar; status_t err; @@ -112,7 +123,9 @@ status_t DeskbarThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return db.SetLocation((deskbar_location)loc, expanded); } -status_t DeskbarThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DeskbarThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage deskbar; status_t err; @@ -137,7 +150,9 @@ status_t DeskbarThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t DeskbarThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DeskbarThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage deskbar; @@ -150,7 +165,9 @@ status_t DeskbarThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DeskbarThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/EddieAddon.cpp b/3rdparty/mmu_man/themes/addons/EddieAddon.cpp index 450fd454c8..2e670819c7 100644 --- a/3rdparty/mmu_man/themes/addons/EddieAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/EddieAddon.cpp @@ -32,6 +32,7 @@ #define EDDIE_SETTINGS_NAME "Eddie/settings" + class EddieThemesAddon : public ThemesAddon { public: EddieThemesAddon(); @@ -49,32 +50,42 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + EddieThemesAddon::EddieThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + EddieThemesAddon::~EddieThemesAddon() { } -const char *EddieThemesAddon::Description() + +const char * +EddieThemesAddon::Description() { return A_DESCRIPTION; } -status_t EddieThemesAddon::RunPreferencesPanel() + +status_t +EddieThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t EddieThemesAddon::AddNames(BMessage &names) + +status_t +EddieThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_EDDIE_SETTINGS, "Eddie Settings"); return B_OK; } -status_t EddieThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +EddieThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -121,13 +132,17 @@ status_t EddieThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t EddieThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +EddieThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t EddieThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +EddieThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -142,7 +157,9 @@ status_t EddieThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new EddieThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp b/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp index 3b5b805d89..defde2eb73 100644 --- a/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/HaikuUISettingsAddon.cpp @@ -46,6 +46,7 @@ extern status_t _get_system_default_font_(const char* which, #define A_MSGNAME Z_THEME_UI_SETTINGS #define A_DESCRIPTION "System colors, fonts and other goodies" + class UISettingsThemesAddon : public ThemesAddon { public: UISettingsThemesAddon(); @@ -63,6 +64,7 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + struct ui_color_map { const char *name; color_which id; @@ -93,23 +95,29 @@ struct ui_color_map { { NULL, (color_which)-1 } }; + UISettingsThemesAddon::UISettingsThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { FENTRY; } + UISettingsThemesAddon::~UISettingsThemesAddon() { FENTRY; } -const char *UISettingsThemesAddon::Description() + +const char * +UISettingsThemesAddon::Description() { return A_DESCRIPTION; } -status_t UISettingsThemesAddon::RunPreferencesPanel() + +status_t +UISettingsThemesAddon::RunPreferencesPanel() { status_t err = B_OK; entry_ref ref; @@ -136,7 +144,9 @@ status_t UISettingsThemesAddon::RunPreferencesPanel() return err; } -status_t UISettingsThemesAddon::AddNames(BMessage &names) + +status_t +UISettingsThemesAddon::AddNames(BMessage &names) { FENTRY; @@ -177,7 +187,9 @@ status_t UISettingsThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BFont fnt; @@ -264,7 +276,9 @@ status_t UISettingsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage uisettings; BMessage names; @@ -305,7 +319,9 @@ status_t UISettingsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -360,9 +376,11 @@ status_t UISettingsThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new UISettingsThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ diff --git a/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp b/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp index c8c7b769b5..3d4a6dd54a 100644 --- a/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/HaikuWindowDecorAddon.cpp @@ -40,7 +40,9 @@ status_t set_decorator(const int32 &index); using namespace BPrivate; -status_t set_decorator(const char *name) + +status_t +set_decorator(const char *name) { BString n; status_t err; @@ -59,10 +61,12 @@ status_t set_decorator(const char *name) return ENOENT; } + #define A_NAME "Window Decor" #define A_MSGNAME Z_THEME_WINDOW_DECORATIONS #define A_DESCRIPTION "Window decorations and scrollbars" + class DecorThemesAddon : public ThemesAddon { public: DecorThemesAddon(); @@ -80,21 +84,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + DecorThemesAddon::DecorThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + DecorThemesAddon::~DecorThemesAddon() { } -const char *DecorThemesAddon::Description() + +const char * +DecorThemesAddon::Description() { return A_DESCRIPTION; } -status_t DecorThemesAddon::RunPreferencesPanel() + +status_t +DecorThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -109,7 +119,9 @@ status_t DecorThemesAddon::RunPreferencesPanel() return err; } -status_t DecorThemesAddon::AddNames(BMessage &names) + +status_t +DecorThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_WINDOW_DECORATIONS, "Window decorations and scrollbars"); names.AddString("window:decor", "Window decor"); @@ -117,7 +129,9 @@ status_t DecorThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -178,7 +192,9 @@ extern void __set_window_decor(int32 theme); return B_OK; } -status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage window_decor; BMessage globals; @@ -215,7 +231,9 @@ status_t DecorThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +DecorThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage window_decor; @@ -226,9 +244,11 @@ status_t DecorThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new DecorThemesAddon; } + #endif /* B_BEOS_VERSION_DANO */ diff --git a/3rdparty/mmu_man/themes/addons/PeAddon.cpp b/3rdparty/mmu_man/themes/addons/PeAddon.cpp index fc44f8f39b..c7068451ba 100644 --- a/3rdparty/mmu_man/themes/addons/PeAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/PeAddon.cpp @@ -32,6 +32,7 @@ #define PE_SETTINGS_NAME "pe/settings" + class PeThemesAddon : public ThemesAddon { public: PeThemesAddon(); @@ -49,32 +50,42 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + PeThemesAddon::PeThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + PeThemesAddon::~PeThemesAddon() { } -const char *PeThemesAddon::Description() + +const char * +PeThemesAddon::Description() { return A_DESCRIPTION; } -status_t PeThemesAddon::RunPreferencesPanel() + +status_t +PeThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t PeThemesAddon::AddNames(BMessage &names) + +status_t +PeThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_PE_SETTINGS, "Pe Settings"); return B_OK; } -status_t PeThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +PeThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -121,13 +132,17 @@ status_t PeThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t PeThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +PeThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t PeThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +PeThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -142,7 +157,9 @@ status_t PeThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new PeThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp b/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp index 327d5cb927..46ec318cd8 100644 --- a/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/ScreensaverAddon.cpp @@ -32,6 +32,7 @@ #define MS_NAME "modulesettings_" + class ScreensaverThemesAddon : public ThemesAddon { public: ScreensaverThemesAddon(); @@ -49,21 +50,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + ScreensaverThemesAddon::ScreensaverThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + ScreensaverThemesAddon::~ScreensaverThemesAddon() { } -const char *ScreensaverThemesAddon::Description() + +const char * +ScreensaverThemesAddon::Description() { return A_DESCRIPTION; } -status_t ScreensaverThemesAddon::RunPreferencesPanel() + +status_t +ScreensaverThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -87,7 +94,9 @@ status_t ScreensaverThemesAddon::RunPreferencesPanel() return err; } -status_t ScreensaverThemesAddon::AddNames(BMessage &names) + +status_t +ScreensaverThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_SCREENSAVER_SETTINGS, "Screensaver settings"); names.AddString(Z_THEME_SS_MODULE, "Screensaver active module"); @@ -95,7 +104,9 @@ status_t ScreensaverThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t ScreensaverThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +ScreensaverThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage screensaver; status_t err; @@ -135,7 +146,9 @@ status_t ScreensaverThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return err; } -status_t ScreensaverThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +ScreensaverThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage screensaver; status_t err; @@ -168,7 +181,9 @@ status_t ScreensaverThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t ScreensaverThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +ScreensaverThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage screensaver; @@ -178,7 +193,9 @@ status_t ScreensaverThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new ScreensaverThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp b/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp index 52f1130586..0f46461787 100644 --- a/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/SoundplayColorAddon.cpp @@ -43,33 +43,43 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + SoundplayThemesAddon::SoundplayThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + SoundplayThemesAddon::~SoundplayThemesAddon() { } -const char *SoundplayThemesAddon::Description() + +const char * +SoundplayThemesAddon::Description() { return A_DESCRIPTION; } -status_t SoundplayThemesAddon::RunPreferencesPanel() + +status_t +SoundplayThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t SoundplayThemesAddon::AddNames(BMessage &names) + +status_t +SoundplayThemesAddon::AddNames(BMessage &names) { //names.AddString(Z_THEME_BEIDE_SETTINGS, "BeIDE Settings"); (void)names; return B_OK; } -status_t SoundplayThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +SoundplayThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage uisettings; status_t err; @@ -111,13 +121,17 @@ status_t SoundplayThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t SoundplayThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +SoundplayThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { (void)theme; (void)flags; return B_OK; } -status_t SoundplayThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +SoundplayThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage uisettings; @@ -128,7 +142,9 @@ status_t SoundplayThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new SoundplayThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp b/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp index f376fa1491..960b07e0c8 100644 --- a/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/SoundsAddon.cpp @@ -27,6 +27,7 @@ #define A_MSGNAME Z_THEME_SOUNDS_SETTINGS #define A_DESCRIPTION "System sound events" + class SoundsThemesAddon : public ThemesAddon { public: SoundsThemesAddon(); @@ -44,21 +45,27 @@ status_t MakeTheme(BMessage &theme, uint32 flags=0L); status_t ApplyDefaultTheme(uint32 flags=0L); }; + SoundsThemesAddon::SoundsThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + SoundsThemesAddon::~SoundsThemesAddon() { } -const char *SoundsThemesAddon::Description() + +const char * +SoundsThemesAddon::Description() { return A_DESCRIPTION; } -status_t SoundsThemesAddon::RunPreferencesPanel() + +status_t +SoundsThemesAddon::RunPreferencesPanel() { status_t err; entry_ref ref; @@ -87,7 +94,9 @@ status_t SoundsThemesAddon::RunPreferencesPanel() return err; } -status_t SoundsThemesAddon::AddNames(BMessage &names) + +status_t +SoundsThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_SOUNDS_SETTINGS, "Sounds Settings"); names.AddString("sounds:file", "Filename for this sound event"); @@ -95,7 +104,9 @@ status_t SoundsThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t SoundsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +SoundsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage sounds; status_t err; @@ -152,7 +163,9 @@ status_t SoundsThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t SoundsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +SoundsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage sounds; status_t err; @@ -190,7 +203,9 @@ status_t SoundsThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t SoundsThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +SoundsThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage sounds; @@ -202,7 +217,9 @@ status_t SoundsThemesAddon::ApplyDefaultTheme(uint32 flags) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new SoundsThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp b/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp index db3768b3c9..daab14234b 100644 --- a/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/TerminalAddon.cpp @@ -117,6 +117,7 @@ struct termprefs { static const char *kHaikuTerminalAppSig = "application/x-vnd.Haiku-Terminal"; static const char *kBeOSTerminalAppSig = "application/x-vnd.Be-SHEL"; + class TerminalThemesAddon : public ThemesAddon { public: TerminalThemesAddon(); @@ -146,21 +147,27 @@ status_t LoadHaikuTerminalSettings(BMessage &into); status_t SaveHaikuTerminalSettings(BMessage &from); }; + TerminalThemesAddon::TerminalThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + TerminalThemesAddon::~TerminalThemesAddon() { } -const char *TerminalThemesAddon::Description() + +const char * +TerminalThemesAddon::Description() { return A_DESCRIPTION; } -status_t TerminalThemesAddon::RunPreferencesPanel() + +status_t +TerminalThemesAddon::RunPreferencesPanel() { BAlert *alert; alert = new BAlert("info", "Please use the Settings menu in the Terminal application.", "Gotcha"); @@ -168,7 +175,9 @@ status_t TerminalThemesAddon::RunPreferencesPanel() return B_OK; } -status_t TerminalThemesAddon::AddNames(BMessage &names) + +status_t +TerminalThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_TERMINAL_SETTINGS, "Terminal Preferences"); names.AddString(TP_COLS, "Terminal column count"); @@ -185,7 +194,9 @@ status_t TerminalThemesAddon::AddNames(BMessage &names) return B_OK; } -status_t TerminalThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +TerminalThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { status_t err; @@ -199,7 +210,9 @@ status_t TerminalThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t TerminalThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +TerminalThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { #ifdef __HAIKU__ return MakeThemeHaiku(theme, flags); @@ -208,7 +221,9 @@ status_t TerminalThemesAddon::MakeTheme(BMessage &theme, uint32 flags) #endif } -status_t TerminalThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +TerminalThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage termpref; @@ -223,7 +238,9 @@ status_t TerminalThemesAddon::ApplyDefaultTheme(uint32 flags) return ApplyTheme(theme, flags); } -status_t TerminalThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) + +status_t +TerminalThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) { BMessage termpref; status_t err; @@ -236,7 +253,9 @@ status_t TerminalThemesAddon::InstallFiles(BMessage &theme, BDirectory &folder) return B_OK; } -status_t TerminalThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) + +status_t +TerminalThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) { BMessage termpref; status_t err; @@ -252,7 +271,8 @@ status_t TerminalThemesAddon::BackupFiles(BMessage &theme, BDirectory &folder) } -status_t TerminalThemesAddon::ApplyThemeR5(BMessage &theme, uint32 flags) +status_t +TerminalThemesAddon::ApplyThemeR5(BMessage &theme, uint32 flags) { BMessage termpref; status_t err; @@ -344,7 +364,9 @@ status_t TerminalThemesAddon::ApplyThemeR5(BMessage &theme, uint32 flags) return B_OK; } -status_t TerminalThemesAddon::MakeThemeR5(BMessage &theme, uint32 flags) + +status_t +TerminalThemesAddon::MakeThemeR5(BMessage &theme, uint32 flags) { BMessage termpref; status_t err; @@ -394,7 +416,8 @@ status_t TerminalThemesAddon::MakeThemeR5(BMessage &theme, uint32 flags) } -status_t TerminalThemesAddon::ApplyThemeHaiku(BMessage &theme, uint32 flags) +status_t +TerminalThemesAddon::ApplyThemeHaiku(BMessage &theme, uint32 flags) { BMessage termpref; BMessage lines; @@ -521,7 +544,9 @@ status_t TerminalThemesAddon::ApplyThemeHaiku(BMessage &theme, uint32 flags) return B_OK; } -status_t TerminalThemesAddon::MakeThemeHaiku(BMessage &theme, uint32 flags) + +status_t +TerminalThemesAddon::MakeThemeHaiku(BMessage &theme, uint32 flags) { BMessage termpref; BMessage lines; @@ -598,7 +623,8 @@ status_t TerminalThemesAddon::MakeThemeHaiku(BMessage &theme, uint32 flags) } -status_t TerminalThemesAddon::LoadHaikuTerminalSettings(BMessage &into) +status_t +TerminalThemesAddon::LoadHaikuTerminalSettings(BMessage &into) { status_t err; BPath pTermPref; @@ -633,7 +659,8 @@ status_t TerminalThemesAddon::LoadHaikuTerminalSettings(BMessage &into) } -status_t TerminalThemesAddon::SaveHaikuTerminalSettings(BMessage &from) +status_t +TerminalThemesAddon::SaveHaikuTerminalSettings(BMessage &from) { BMessage settings; status_t err; @@ -682,7 +709,9 @@ status_t TerminalThemesAddon::SaveHaikuTerminalSettings(BMessage &from) } -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new TerminalThemesAddon; } + diff --git a/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp b/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp index 0b38d90180..04b82bba93 100644 --- a/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp +++ b/3rdparty/mmu_man/themes/addons/WinampSkinAddon.cpp @@ -68,32 +68,42 @@ status_t SetSPSkin(BString *from); status_t StripPath(BString *path); }; + WinampSkinThemesAddon::WinampSkinThemesAddon() : ThemesAddon(A_NAME, A_MSGNAME) { } + WinampSkinThemesAddon::~WinampSkinThemesAddon() { } -const char *WinampSkinThemesAddon::Description() + +const char * +WinampSkinThemesAddon::Description() { return A_DESCRIPTION; } -status_t WinampSkinThemesAddon::RunPreferencesPanel() + +status_t +WinampSkinThemesAddon::RunPreferencesPanel() { return B_OK; } -status_t WinampSkinThemesAddon::AddNames(BMessage &names) + +status_t +WinampSkinThemesAddon::AddNames(BMessage &names) { names.AddString(Z_THEME_WINAMP_SKIN_SETTINGS, "CLAmp/SoundPlay Skin Settings"); return B_OK; } -status_t WinampSkinThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) + +status_t +WinampSkinThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) { BMessage skin; BString name; @@ -114,7 +124,9 @@ status_t WinampSkinThemesAddon::ApplyTheme(BMessage &theme, uint32 flags) return B_OK; } -status_t WinampSkinThemesAddon::MakeTheme(BMessage &theme, uint32 flags) + +status_t +WinampSkinThemesAddon::MakeTheme(BMessage &theme, uint32 flags) { BMessage skin; BString name; @@ -141,7 +153,9 @@ status_t WinampSkinThemesAddon::MakeTheme(BMessage &theme, uint32 flags) return err; } -status_t WinampSkinThemesAddon::ApplyDefaultTheme(uint32 flags) + +status_t +WinampSkinThemesAddon::ApplyDefaultTheme(uint32 flags) { BMessage theme; BMessage skin; @@ -150,7 +164,9 @@ status_t WinampSkinThemesAddon::ApplyDefaultTheme(uint32 flags) return ApplyTheme(theme, flags); } -int32 WinampSkinThemesAddon::WhichApp() + +int32 +WinampSkinThemesAddon::WhichApp() { // XXX /* @@ -167,7 +183,9 @@ int32 WinampSkinThemesAddon::WhichApp() return USE_SP; } -status_t WinampSkinThemesAddon::CLSkin(BString *to, bool preffile) + +status_t +WinampSkinThemesAddon::CLSkin(BString *to, bool preffile) { if (preffile) { BPath CLSPath; @@ -201,7 +219,9 @@ status_t WinampSkinThemesAddon::CLSkin(BString *to, bool preffile) return B_ERROR; } -status_t WinampSkinThemesAddon::SPSkin(BString *to, bool preffile) + +status_t +WinampSkinThemesAddon::SPSkin(BString *to, bool preffile) { if (preffile) { status_t err; @@ -236,7 +256,9 @@ status_t WinampSkinThemesAddon::SPSkin(BString *to, bool preffile) return B_ERROR; } -status_t WinampSkinThemesAddon::CLSkinPath(BPath *to) + +status_t +WinampSkinThemesAddon::CLSkinPath(BPath *to) { char buffer[B_FILE_NAME_LENGTH+1]; BPath CLSPath; @@ -255,7 +277,9 @@ status_t WinampSkinThemesAddon::CLSkinPath(BPath *to) return B_OK; } -status_t WinampSkinThemesAddon::SPSkinPath(BPath *to) + +status_t +WinampSkinThemesAddon::SPSkinPath(BPath *to) { status_t err; BMessage settings; @@ -280,7 +304,9 @@ status_t WinampSkinThemesAddon::SPSkinPath(BPath *to) return err; } -status_t WinampSkinThemesAddon::SetCLSkin(BString *from) + +status_t +WinampSkinThemesAddon::SetCLSkin(BString *from) { status_t err; BPath p; @@ -314,7 +340,9 @@ status_t WinampSkinThemesAddon::SetCLSkin(BString *from) return B_OK; } -status_t WinampSkinThemesAddon::SetSPSkin(BString *from) + +status_t +WinampSkinThemesAddon::SetSPSkin(BString *from) { status_t err; BPath p; @@ -410,7 +438,9 @@ status_t WinampSkinThemesAddon::SetSPSkin(BString *from) return B_OK; } -status_t WinampSkinThemesAddon::StripPath(BString *path) + +status_t +WinampSkinThemesAddon::StripPath(BString *path) { if (!path) return EINVAL; @@ -421,7 +451,9 @@ status_t WinampSkinThemesAddon::StripPath(BString *path) -ThemesAddon *instantiate_themes_addon() +ThemesAddon * +instantiate_themes_addon() { return (ThemesAddon *) new WinampSkinThemesAddon; } +