Skip to content
Permalink
Browse files
Added the menu to toggle toolbar visibility to the 'view' menu
git-svn-id: http://svn.osgeo.org/qgis/trunk@6972 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 31, 2007
1 parent bcaf553 commit d894411a7c452afed3751a00e8b8c0e00c2a2e93
Showing with 12 additions and 4 deletions.
  1. +12 −4 src/app/qgisapp.cpp
@@ -861,13 +861,11 @@ void QgisApp::createMenus()
mViewMenu->addAction(mActionShowBookmarks);
mViewMenu->addAction(mActionNewBookmark);
mViewMenu->addSeparator();
mToolbarMenu = mViewMenu->addMenu(QIcon(myIconPath+"/mActionOptions.png"),
tr("&Toolbars..."));

//
// View:toolbars menu
mToolbarMenu->addAction(mActionShowAllToolbars);
mToolbarMenu->addAction(mActionHideAllToolbars);
mViewMenu->addAction(mActionShowAllToolbars);
mViewMenu->addAction(mActionHideAllToolbars);

//
// Layers Menu
@@ -1012,6 +1010,16 @@ void QgisApp::createToolBars()
mPluginToolBar = addToolBar(tr("Plugins"));
mPluginToolBar->setIconSize(QSize(24,24));
mPluginToolBar->setObjectName("Plugins");

//Add the menu for toolbar visibility here
//because createPopupMenu() would return 0
//before the toolbars are created
QMenu* toolbarVisibilityMenu = createPopupMenu();
if(toolbarVisibilityMenu)
{
toolbarVisibilityMenu->setTitle(tr("Toolbar Visibility..."));
mViewMenu->addMenu(toolbarVisibilityMenu);
}
}

void QgisApp::createStatusBar()

0 comments on commit d894411

Please sign in to comment.