From 57a393d2f9f8fab402f2153a707c677026d0d3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 11 Jan 2008 22:11:18 +0000 Subject: [PATCH] It now builds as a standalone app for Zeta. Even still works :)) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23419 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- 3rdparty/Jamfile | 2 +- 3rdparty/mmu_man/Jamfile | 3 ++ 3rdparty/mmu_man/themes/Jamfile | 7 ++- 3rdparty/mmu_man/themes/ThemeInterfaceView.h | 1 + 3rdparty/mmu_man/themes/ThemesApp.cpp | 52 ++++++++++++++++++++ 3rdparty/mmu_man/themes/ThemesApp.h | 11 +++++ 6 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 3rdparty/mmu_man/Jamfile create mode 100644 3rdparty/mmu_man/themes/ThemesApp.cpp create mode 100644 3rdparty/mmu_man/themes/ThemesApp.h diff --git a/3rdparty/Jamfile b/3rdparty/Jamfile index 5538332d22..1286d38363 100644 --- a/3rdparty/Jamfile +++ b/3rdparty/Jamfile @@ -1,3 +1,3 @@ SubDir HAIKU_TOP 3rdparty ; -#SubInclude HAIKU_TOP 3rdparty mmu_man ; +SubInclude HAIKU_TOP 3rdparty mmu_man ; diff --git a/3rdparty/mmu_man/Jamfile b/3rdparty/mmu_man/Jamfile new file mode 100644 index 0000000000..f480b7dd54 --- /dev/null +++ b/3rdparty/mmu_man/Jamfile @@ -0,0 +1,3 @@ +SubDir HAIKU_TOP 3rdparty mmu_man ; + +SubInclude HAIKU_TOP 3rdparty mmu_man themes ; diff --git a/3rdparty/mmu_man/themes/Jamfile b/3rdparty/mmu_man/themes/Jamfile index 2d203631a8..811cab9601 100644 --- a/3rdparty/mmu_man/themes/Jamfile +++ b/3rdparty/mmu_man/themes/Jamfile @@ -1,8 +1,10 @@ -SubDir HAIKU_TOP 3rdparty themes ; +SubDir HAIKU_TOP 3rdparty mmu_man themes ; SetSubDirSupportedPlatformsBeOSCompatible ; -SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) 3rdparty themes addons ] ; +SubDirC++Flags -DSINGLE_BINARY ; + +SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) 3rdparty mmu_man themes addons ] ; local addonSources ; addonSources = @@ -28,6 +30,7 @@ Application <3rdparty>Themes : ParseMessage.cpp TextInputAlert.cpp ThemeAddonItem.cpp + ThemesApp.cpp ThemeInterfaceView.cpp ThemeItem.cpp ThemeManager.cpp diff --git a/3rdparty/mmu_man/themes/ThemeInterfaceView.h b/3rdparty/mmu_man/themes/ThemeInterfaceView.h index 5dc5718d94..00c73eb543 100644 --- a/3rdparty/mmu_man/themes/ThemeInterfaceView.h +++ b/3rdparty/mmu_man/themes/ThemeInterfaceView.h @@ -16,6 +16,7 @@ class BScrollView; class BTextView; class BMessage; class BStringView; +class BInvoker; class ThemeInterfaceView : public BView { diff --git a/3rdparty/mmu_man/themes/ThemesApp.cpp b/3rdparty/mmu_man/themes/ThemesApp.cpp new file mode 100644 index 0000000000..7da377e8b2 --- /dev/null +++ b/3rdparty/mmu_man/themes/ThemesApp.cpp @@ -0,0 +1,52 @@ +#include +#include + +#include +#include + +#include "ThemesApp.h" +#include "ThemeInterfaceView.h" + +const char *kThemesAppSig = "application/x-vnd.mmu_man-Themes"; + + +ThemesApp::ThemesApp() + : BApplication(kThemesAppSig) +{ +} + + +ThemesApp::~ThemesApp() +{ +} + + +void +ThemesApp::ReadyToRun() +{ + BScreen s; + BRect frame(0, 0, 500, 300); + frame.OffsetBySelf(s.Frame().Width()/2 - frame.Width()/2, + s.Frame().Height()/2 - frame.Height()/2); + BWindow *w = new BWindow(frame, "Themes", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_QUIT_ON_WINDOW_CLOSE); + ThemeInterfaceView *v = new ThemeInterfaceView(w->Bounds()); + w->AddChild(v); + w->Show(); +} + + +void +ThemesApp::MessageReceived(BMessage *message) +{ + switch (message->what) { + default: + BApplication::MessageReceived(message); + } +} + + +int main(int argc, char **argv) +{ + ThemesApp app; + app.Run(); +} diff --git a/3rdparty/mmu_man/themes/ThemesApp.h b/3rdparty/mmu_man/themes/ThemesApp.h new file mode 100644 index 0000000000..b51e007214 --- /dev/null +++ b/3rdparty/mmu_man/themes/ThemesApp.h @@ -0,0 +1,11 @@ +#include + +class ThemesApp : public BApplication { +public: + ThemesApp(); + virtual ~ThemesApp(); + void ReadyToRun(); + void MessageReceived(BMessage *message); + +private: +};