From ca75aaad96e6df3d649c77f23bc568950c7a0ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 27 Sep 2008 22:32:43 +0000 Subject: [PATCH] Fix for R5: - add missing controls for R5 version - hack to work around a race that happens on BeOS at least, someone should fix it better. stippi ? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27764 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/mediaplayer/MainApp.cpp | 8 +++++++- src/apps/mediaplayer/settings/SettingsWindow.cpp | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/apps/mediaplayer/MainApp.cpp b/src/apps/mediaplayer/MainApp.cpp index 528b8125c2..10c36c3e77 100644 --- a/src/apps/mediaplayer/MainApp.cpp +++ b/src/apps/mediaplayer/MainApp.cpp @@ -45,12 +45,18 @@ static const char* kMediaServerAddOnSig = "application/x-vnd.Be.addon-host"; MainApp::MainApp() : BApplication(kAppSig), fPlayerCount(0), - fFirstWindow(NewWindow()), + //fFirstWindow(NewWindow()), fSettingsWindow(NULL), fMediaServerRunning(false), fMediaAddOnServerRunning(false) { + // XXX: HACK HACK HACK + // this works around a locking issue where gMainApp isn't set yet, + // while NewWindow() calls Show() which in the window thread calls + // Controller::PlayerActivated() which calls gMainApp->PlayerCount() + gMainApp = this; + fFirstWindow = NewWindow(); } diff --git a/src/apps/mediaplayer/settings/SettingsWindow.cpp b/src/apps/mediaplayer/settings/SettingsWindow.cpp index 1ede9e7031..cb7faf55e3 100644 --- a/src/apps/mediaplayer/settings/SettingsWindow.cpp +++ b/src/apps/mediaplayer/settings/SettingsWindow.cpp @@ -181,8 +181,14 @@ SettingsWindow::SettingsWindow(BRect frame) BView* view = new BView(frame,"SettingsView",B_FOLLOW_ALL_SIDES,B_WILL_DRAW); view->SetViewColor(216, 216, 216); - BRect btnRect(140.00, frame.bottom - (SPACE + BUTTONHEIGHT), 205.00, + BRect btnRect(80.00, frame.bottom - (SPACE + BUTTONHEIGHT), 145.00, frame.bottom-SPACE); + + fRevertB = new BButton(btnRect, "revert", "Revert", + new BMessage(M_SETTINGS_REVERT)); + view->AddChild(fRevertB); + + btnRect.OffsetBy(btnRect.Width() + SPACE, 0); BButton* btn = new BButton(btnRect, "btnCancel", "Cancel", new BMessage(M_SETTINGS_CANCEL)); view->AddChild(btn); @@ -226,6 +232,14 @@ SettingsWindow::SettingsWindow(BRect frame) bbox->AddChild(fLoopSoundsCB = new BCheckBox(rect, "chkBoxLoopSounds", "Loop sounds by default", new BMessage(M_LOOP_SOUND))); + rect.OffsetBy(0, rect.Height() + SPACEING); + bbox->AddChild(fUseOverlaysCB = new BCheckBox(rect, "chkBoxUseOverlays", "Use hardware video overlays if available", + new BMessage(M_USE_OVERLAYS))); + + rect.OffsetBy(0, rect.Height() + SPACEING); + bbox->AddChild(fScaleBilinearCB = new BCheckBox(rect, "chkBoxScaleBilinear", "Scale movies smoothly (non-overlay mode)", + new BMessage(M_SCALE_BILINEAR))); + rect.OffsetBy(0, rect.Height() + SPACE + SPACEING); bbox->AddChild(new BStringView(rect, "stringViewPlayBackg", "Play backgrounds clips at:"));