aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_file.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2014-12-22 15:51:36 -0800
committerGerald Combs <gerald@wireshark.org>2014-12-29 01:42:13 +0000
commite8ec11fb7e67f83a7296f1e87451f3d7ddd5d85d (patch)
treeebac5b8251ca402bbb09dce014bdd883fd192f3b /ui/qt/capture_file.cpp
parentc1d9d93efb3581f11ea8115e5b1d6a4c7105a1d2 (diff)
Qt: Add a WiresharkDialog convenience class.
Add WiresharkDialog, a common base class for dialogs centered around capture files. Make it a parent of Capture File Properties, Traffic Table, Conversations, and Endpoints. Rename CaptureFile::read_only_ to file_closed_. Add methods to WiresharkApplication for generating consistent window titles. Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257 Reviewed-on: https://code.wireshark.org/review/6097 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/capture_file.cpp')
-rw-r--r--ui/qt/capture_file.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/qt/capture_file.cpp b/ui/qt/capture_file.cpp
index c395497457..831b65b4d0 100644
--- a/ui/qt/capture_file.cpp
+++ b/ui/qt/capture_file.cpp
@@ -46,7 +46,8 @@ QString CaptureFile::no_capture_file_ = QObject::tr("[no capture file]");
CaptureFile::CaptureFile(QObject *parent, capture_file *cap_file) :
QObject(parent),
cap_file_(cap_file),
- file_title_(no_capture_file_)
+ file_title_(no_capture_file_),
+ file_state_(QString())
{
#ifdef HAVE_LIBPCAP
capture_callback_add(captureCallback, (gpointer) this);
@@ -117,14 +118,16 @@ void CaptureFile::captureFileEvent(int event, gpointer data)
}
case(cf_cb_file_closing):
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: Closing");
- file_title_.append(tr(" [closed]"));
+ file_state_ = tr(" [closing]");
emit captureFileClosing();
break;
case(cf_cb_file_closed):
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: Closed");
+ file_state_ = tr(" [closed]");
emit captureFileClosed();
cap_file_ = NULL;
file_title_ = no_capture_file_;
+ file_state_ = QString();
break;
case(cf_cb_file_read_started):
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: Read started");