diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-07 01:46:20 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-07 01:46:20 +0000 |
commit | 59cd52b5caae3806fbaba984833a8edd2752f2c4 (patch) | |
tree | f886df01065a589edecb4617770e7f599ef396cf /ui/qt/display_filter_combo.cpp | |
parent | 2b240a299b3cf26a5ef52e400588bb2e56d2a57f (diff) |
Implement the items under "Edit→Copy", "Analyze→Apply as Filter" and
"Analyze→Prepare a Filter". Add a context menu to the protocol tree and
fill in the items we've implemented so far.
Add an "applyAllPreferences" method and corresponding
"preferencesUpdated" signal to wsApp. Use it to set the maximum display
filter combo count.
Move the packet filtering code from the display filter edit to the main
window (which makes more sense and matches what we're doing in the GTK+
version and gets rid of more global cfile references). Try to center the
display filter edit button images.
Use a different "close" button in the main toolbar. It looks better but
is still wrong (on OS X at least).
svn path=/trunk/; revision=46434
Diffstat (limited to 'ui/qt/display_filter_combo.cpp')
-rw-r--r-- | ui/qt/display_filter_combo.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/qt/display_filter_combo.cpp b/ui/qt/display_filter_combo.cpp index abc35e8b28..9816668ad9 100644 --- a/ui/qt/display_filter_combo.cpp +++ b/ui/qt/display_filter_combo.cpp @@ -26,8 +26,11 @@ #include "qt_ui_utils.h" #include "ui/recent.h" +#include <epan/prefs.h> + #include "display_filter_edit.h" #include "display_filter_combo.h" +#include "wireshark_application.h" #include <QCompleter> @@ -69,6 +72,8 @@ DisplayFilterCombo::DisplayFilterCombo(QWidget *parent) : "}" ); completer()->setCompletionMode(QCompleter::PopupCompletion); + + connect(wsApp, SIGNAL(updatePreferences()), this, SLOT(updateMaxCount())); } extern "C" void dfilter_recent_combo_write_all(FILE *rf) { @@ -90,6 +95,18 @@ void DisplayFilterCombo::writeRecent(FILE *rf) { } } +void DisplayFilterCombo::applyDisplayFilter() +{ + DisplayFilterEdit *df_edit = qobject_cast<DisplayFilterEdit *>(lineEdit()); + + if (df_edit) df_edit->applyDisplayFilter(); +} + +void DisplayFilterCombo::updateMaxCount() +{ + setMaxCount(prefs.gui_recent_df_entries_max); +} + extern "C" gboolean dfilter_combo_add_recent(gchar *filter) { if (!cur_display_filter_combo) return FALSE; |