Author: stippi Date: Mon Mar 1 10:05:35 2010 New Revision: 253 URL: http://mmlr.dyndns.org/changeset/253 Log: Made the integrated menu bar a build time configuration feature. I don't like it so much, since it somehow looks alien for no /really/ good reason. Maybe I'll integrate this option into the settings, when I get to those. Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h webkit/trunk/WebKit/haiku/WebPositive/WebTabView.cpp webkit/trunk/WebKit/haiku/WebPositive/WebTabView.h Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon Mar 1 09:58:21 2010 (r252) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.cpp Mon Mar 1 10:05:35 2010 (r253) @@ -108,8 +108,11 @@ if (toolbarPolicy == HaveToolbar) { // Menu -// BMenu* mainMenu = new BMenuBar("Main menu"); +#if INTEGRATE_MENU_INTO_TAB_BAR BMenu* mainMenu = fTabManager->Menu(); +#else + BMenu* mainMenu = new BMenuBar("Main menu"); +#endif BMenu* menu = new BMenu("Window"); BMessage* newWindowMessage = new BMessage(NEW_WINDOW); newWindowMessage->AddString("url", ""); @@ -199,7 +202,9 @@ ; // Layout AddChild(BGroupLayoutBuilder(B_VERTICAL) -// .Add(mainMenu) +#if !INTEGRATE_MENU_INTO_TAB_BAR + .Add(mainMenu) +#endif .Add(fTabManager->TabGroup()) .Add(BGridLayoutBuilder(kElementSpacing, kElementSpacing) .Add(fBackButton, 0, 0) Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h Mon Mar 1 09:58:21 2010 (r252) +++ webkit/trunk/WebKit/haiku/WebPositive/BrowserWindow.h Mon Mar 1 10:05:35 2010 (r253) @@ -58,6 +58,8 @@ SHOW_DOWNLOAD_WINDOW = 'sdwd' }; +#define INTEGRATE_MENU_INTO_TAB_BAR 0 + class BrowserWindow : public BWebWindow { public: Modified: webkit/trunk/WebKit/haiku/WebPositive/WebTabView.cpp ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/WebTabView.cpp Mon Mar 1 09:58:21 2010 (r252) +++ webkit/trunk/WebKit/haiku/WebPositive/WebTabView.cpp Mon Mar 1 10:05:35 2010 (r253) @@ -1092,16 +1092,18 @@ fCardLayout = new BCardLayout(); fContainerView->SetLayout(fCardLayout); - fMenu = new BMenu("Menu"); fTabContainerView = new TabContainerView(fController); fTabContainerGroup = new BGroupView(B_HORIZONTAL); fTabContainerGroup->GroupLayout()->SetInsets(0, 3, 0, 0); +#if INTEGRATE_MENU_INTO_TAB_BAR + fMenu = new BMenu("Menu"); BMenuBar* menuBar = new BMenuBar("Menu bar"); menuBar->AddItem(fMenu); TabButtonContainer* menuBarContainer = new TabButtonContainer(); menuBarContainer->GroupLayout()->AddView(menuBar); fTabContainerGroup->GroupLayout()->AddView(menuBarContainer, 0.0f); +#endif fTabContainerGroup->GroupLayout()->AddView(fTabContainerView); // fTabContainerGroup->GroupLayout()->AddView(new ScrollLeftTabButton(NULL), 0.0f); @@ -1133,11 +1135,13 @@ } +#if INTEGRATE_MENU_INTO_TAB_BAR BMenu* TabManager::Menu() const { return fMenu; } +#endif BView* Modified: webkit/trunk/WebKit/haiku/WebPositive/WebTabView.h ============================================================================== --- webkit/trunk/WebKit/haiku/WebPositive/WebTabView.h Mon Mar 1 09:58:21 2010 (r252) +++ webkit/trunk/WebKit/haiku/WebPositive/WebTabView.h Mon Mar 1 10:05:35 2010 (r253) @@ -51,7 +51,9 @@ void SetTarget(const BMessenger& target); const BMessenger& Target() const; +#if INTEGRATE_MENU_INTO_TAB_BAR BMenu* Menu() const; +#endif BView* TabGroup() const; BView* ContainerView() const; @@ -72,7 +74,9 @@ void SetCloseButtonsAvailable(bool available); private: +#if INTEGRATE_MENU_INTO_TAB_BAR BMenu* fMenu; +#endif BGroupView* fTabContainerGroup; TabContainerView* fTabContainerView; BView* fContainerView;