aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-07-15 20:17:17 +0000
committerGerald Combs <gerald@wireshark.org>2013-07-15 20:17:17 +0000
commit946b736de2ca38949d6cd2a0d1afc1a8a917423f (patch)
tree93340ddbee7388b8eba93d2155bf97b7d65aed61 /ui
parentb71a5aa351bba605769ea14e43dd97249b9904cb (diff)
Set the menuRole for actionCaptureOptions to NoRole similar to
actionEditConfigurationProfiles. This keeps it from being converted to the default preferences item on OS X. Remove a hack where we stored the text for actionEditConfigurationProfiles in its iconText in order to keep it from clobbering actionEditPreferences. It doesn't seem to be necessary. svn path=/trunk/; revision=50636
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_window.cpp8
-rw-r--r--ui/qt/main_window.h2
-rw-r--r--ui/qt/main_window.ui14
-rw-r--r--ui/qt/main_window_slots.cpp5
4 files changed, 20 insertions, 9 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 4822f15616..119f77a7f9 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -125,10 +125,6 @@ MainWindow::MainWindow(QWidget *parent) :
main_ui_->actionFileClose->setIcon(
QIcon().fromTheme("process-stop", style()->standardIcon(QStyle::SP_DialogCloseButton)));
- // If we use the name "Configuration Profiles" OS X QMenuBar will match "config" and
- // use the "profiles" action as the default preferences item.
- main_ui_->actionEditConfigurationProfiles->setText(main_ui_->actionEditConfigurationProfiles->iconText());
-
// In Qt4 multiple toolbars and "pretty" are mutually exculsive on OS X. If
// unifiedTitleAndToolBarOnMac is enabled everything ends up in the same row.
// https://bugreports.qt-project.org/browse/QTBUG-22433
@@ -147,7 +143,7 @@ MainWindow::MainWindow(QWidget *parent) :
#ifdef QT_MACEXTRAS_LIB
QMacNativeToolBar *ntb = QtMacExtras::setNativeToolBar(main_ui_->mainToolBar);
ntb->setIconSize(QSize(24, 24));
-#endif // HAVE_QT5_MAC_EXTRAS
+#endif // QT_MACEXTRAS_LIB
foreach (QMenu *menu, main_ui_->menuBar->findChildren<QMenu*>()) {
foreach (QAction *act, menu->actions()) {
@@ -158,6 +154,8 @@ MainWindow::MainWindow(QWidget *parent) :
main_ui_->goToGo->setAttribute(Qt::WA_MacSmallSize, true);
main_ui_->goToCancel->setAttribute(Qt::WA_MacSmallSize, true);
+ main_ui_->actionEditPreferences->setMenuRole(QAction::PreferencesRole);
+
#endif // Q_OS_MAC
#ifdef HAVE_SOFTWARE_UPDATE
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index 8805debee1..9e07825ebb 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -243,6 +243,8 @@ private slots:
void on_actionGoGoToPacket_triggered();
void resetPreviousFocus();
+ void on_actionCaptureOptions_triggered();
+
void matchSelectedFilter(MainWindow::MatchSelected filter_type, bool apply = false, bool copy_only = false);
void on_actionAnalyzeAAFSelected_triggered();
void on_actionAnalyzeAAFNotSelected_triggered();
diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui
index e91389ce65..f4feb4fd31 100644
--- a/ui/qt/main_window.ui
+++ b/ui/qt/main_window.ui
@@ -14,7 +14,7 @@
<string>Wireshark</string>
</property>
<property name="windowIcon">
- <iconset resource="../../image/toolbar.qrc">
+ <iconset>
<normaloff>:/toolbar/main/hi48-app-wireshark.png</normaloff>:/toolbar/main/hi48-app-wireshark.png</iconset>
</property>
<property name="unifiedTitleAndToolBarOnMac">
@@ -97,7 +97,7 @@
<x>0</x>
<y>0</y>
<width>960</width>
- <height>21</height>
+ <height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -769,12 +769,18 @@
<property name="text">
<string>&amp;Options...</string>
</property>
+ <property name="iconText">
+ <string>Options</string>
+ </property>
<property name="toolTip">
<string>Capture options</string>
</property>
<property name="shortcut">
<string>Ctrl+K</string>
</property>
+ <property name="menuRole">
+ <enum>QAction::NoRole</enum>
+ </property>
</action>
<action name="actionCaptureCaptureFilters">
<property name="text">
@@ -1169,10 +1175,10 @@
<bool>false</bool>
</property>
<property name="text">
- <string>Name set in iconText to keep QMenuBar from grabbing it on OS X</string>
+ <string>Configuration Profiles...</string>
</property>
<property name="iconText">
- <string>Configuration Profiles...</string>
+ <string>Configuration profiles</string>
</property>
<property name="toolTip">
<string>Manage your configuration profiles</string>
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 07f891874d..b04c1a9591 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -1694,6 +1694,11 @@ void MainWindow::on_goToLineEdit_returnPressed()
on_goToGo_clicked();
}
+void MainWindow::on_actionCaptureOptions_triggered()
+{
+ qDebug() << "Capture options";
+}
+
void MainWindow::on_actionStartCapture_triggered()
{
//#ifdef HAVE_AIRPCAP