Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix menus for 5754, 5753 and address feature request for 5516 #164

Closed
wants to merge 2 commits into from

Commits on Jun 10, 2012

  1. Simple fix for qgis#5754 (Mac OS-specific). Better fix would be to ma…

    …ke a method that set all QAction additions to base menus (submenus ok) to QAction::NoRole. This would keep any new action from hijacking the Mac app's About or Preferences… menus.
    
    See: http://doc.qt.nokia.com/4.7.1/qmenubar.html#qmenubar-on-mac-os-x
    dakcarto committed Jun 10, 2012
    Configuration menu
    Copy the full SHA
    f01c6ad View commit details
    Browse the repository at this point in the history
  2. Fix for qgis#5753, also addresses feature request qgis#5516.

    These small edits significantly change the ordering and function of the main menus. This standardizes menus to File, Edit, View, Layer, Vector, Raster, Database, Web, Settings, Plugins, [Plugin-added-menus], Window (on Mac), Help. The order chosen is for the following reasons.
    
    Settings was moved after functional program menus. Settings precedes Plugins so that, if there are a lot of plugin-added menus, Settings (an important menu) is not pushed out of view. Having the OS-convention right menus of Window and/or Help possibly pushed out of view is less of an issue. Ideally, from now on, plugins should be adding themselves to standardized category menus.
    
    Any plugin that 'needs' to add itself to the menubar should then use (here for Python):
    menu_bar = self.iface.mainWindow().menuBar()
    menu_bar.insertMenu( self.iface.firstRightStandardMenu().menuAction(), self.my_plugins_menu )
    
    Ideally, a new QgisInterface public slot pair of addMenuToMenuBar(QMenu)/removeMenuFromMenuBar(QMenu) should be added, to help plugin developers put their menus in the correct place.
    dakcarto committed Jun 10, 2012
    Configuration menu
    Copy the full SHA
    10fe387 View commit details
    Browse the repository at this point in the history