summaryrefslogtreecommitdiff
path: root/ui/qt/decode_as_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-12-10 21:07:26 +0000
committerGerald Combs <gerald@wireshark.org>2013-12-10 21:07:26 +0000
commit1c9b5dfad3b9943bd3ea46b5e59952641e32656b (patch)
treed361e2faf02175cabb2f9ee11c932374cddb04d0 /ui/qt/decode_as_dialog.cpp
parentb007fccec3b81b52c109c8d04f890aa0b5d0a226 (diff)
downloadwireshark-1c9b5dfad3b9943bd3ea46b5e59952641e32656b.tar.gz
Add "Decode As" to the packet list and protocol tree context menus.
Automatically add a new item if "Decode As" is triggered from the context menus. svn path=/trunk/; revision=53915
Diffstat (limited to 'ui/qt/decode_as_dialog.cpp')
-rw-r--r--ui/qt/decode_as_dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/decode_as_dialog.cpp b/ui/qt/decode_as_dialog.cpp
index 8d36d13ded..b6125d41ea 100644
--- a/ui/qt/decode_as_dialog.cpp
+++ b/ui/qt/decode_as_dialog.cpp
@@ -54,7 +54,7 @@ const char *default_int_selector_ = "0"; // Arbitrary
const char *default_str_selector_ = "foo"; // Arbitrary
const int max_name_em_width_ = 10; // Some table names are a tad long.
-DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf) :
+DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf, bool create_new) :
QDialog(parent),
ui(new Ui::DecodeAsDialog),
cap_file_(cf),
@@ -75,6 +75,8 @@ DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf) :
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(fillTable()));
fillTable();
+
+ if (create_new) on_newToolButton_clicked();
}
DecodeAsDialog::~DecodeAsDialog()