fix-hijacked-menus-patch.diff

Larry Shaffer, 2012-06-11 10:13 AM

Download (1.55 KB)

View differences:

src/app/qgisapp.cpp
928 928
  connect( mActionCustomization, SIGNAL( triggered() ), this, SLOT( customize() ) );
929 929

  
930 930
#ifdef Q_WS_MAC
931
  // copy of Options action that gets moved to app Preferences...
932
  mActionOptionsMac = new QAction( mActionOptions->text(), this );
933
  mActionOptionsMac->setMenuRole( QAction::NoRole );
934
  mActionOptionsMac->setIcon( mActionOptions->icon() );
935
  connect( mActionOptionsMac, SIGNAL( triggered() ), this, SLOT( options() ) );
936

  
937 931
  // Window Menu Items
938 932

  
939 933
  mActionWindowMinimize = new QAction( tr( "Minimize" ), this );
......
1164 1158
  }
1165 1159

  
1166 1160
#ifdef Q_WS_MAC
1167
  // copy back the Options action after assigned to app Preferences...
1168
  mSettingsMenu->addAction( mActionOptionsMac );
1161

  
1162
  // keep plugins from hijacking About and Preferences application menus
1163
  // these duplicate actions will be moved to application menus by Qt
1164
  mFileMenu->addAction( mActionAbout );
1165
  mFileMenu->addAction( mActionOptions );
1169 1166

  
1170 1167
  // Window Menu
1171 1168

  
src/app/qgisapp.h
978 978
    // actions for menus and toolbars -----------------
979 979

  
980 980
#ifdef Q_WS_MAC
981
    QAction *mActionOptionsMac;
982 981
    QAction *mActionWindowMinimize;
983 982
    QAction *mActionWindowZoom;
984 983
    QAction *mActionWindowSeparator1;