diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-04-01 17:57:47 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-04-01 17:57:47 +0000 |
commit | 2deedfb1e1288e79341bf05704f0662c251897e7 (patch) | |
tree | 3aed87b25c9fb42fe4f28cbab5b355e473ca60b1 /ui | |
parent | d49404236ccd3eb0cbfc58503a562170611d25bf (diff) | |
download | wireshark-2deedfb1e1288e79341bf05704f0662c251897e7.tar.gz wireshark-2deedfb1e1288e79341bf05704f0662c251897e7.tar.bz2 wireshark-2deedfb1e1288e79341bf05704f0662c251897e7.zip |
Add a setTitlebarForCaptureInProgress() method to MainWindow, and use it
to set the title when we have a capture in progress.
svn path=/trunk/; revision=48688
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window.cpp | 14 | ||||
-rw-r--r-- | ui/qt/main_window.h | 1 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 7 |
3 files changed, 21 insertions, 1 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 24a1887fd5..96eb9ea01b 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -1132,6 +1132,20 @@ void MainWindow::setTitlebarForCaptureFile() } } +void MainWindow::setTitlebarForCaptureInProgress() +{ + gchar *window_name; + + if (cap_file_) { + window_name = g_strdup_printf("Capturing from %s ", cf_get_tempfile_source(cap_file_)); + setWindowTitle(window_name); + g_free(window_name); + } else { + /* We have no capture in progress. */ + setWindowTitle("The Wireshark Network Analyzer"); + } +} + // Menu state /* Enable or disable menu items based on whether you have a capture file diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 5ad595c2a4..c94d34b21d 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -125,6 +125,7 @@ private: void captureStop(); void setTitlebarForCaptureFile(); + void setTitlebarForCaptureInProgress(); void setMenusForCaptureFile(bool force_disable = false); void setMenusForCaptureInProgress(bool capture_in_progress = false); void setMenusForCaptureStopping(); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 1c4e02bdec..30f60b58a1 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -204,7 +204,7 @@ void MainWindow::filterPackets(QString& new_filter, bool force) #ifdef HAVE_LIBPCAP void MainWindow::captureCapturePrepared(capture_options *capture_opts) { qDebug() << "FIX captureCapturePrepared"; -// main_capture_set_main_window_title(capture_opts); + setTitlebarForCaptureInProgress(); // if(icon_list == NULL) { // icon_list = icon_list_create(wsiconcap16_xpm, wsiconcap32_xpm, wsiconcap48_xpm, NULL); @@ -224,7 +224,12 @@ void MainWindow::captureCapturePrepared(capture_options *capture_opts) { void MainWindow::captureCaptureUpdateStarted(capture_options *capture_opts) { Q_UNUSED(capture_opts); + /* We've done this in "prepared" above, but it will be cleared while + switching to the next multiple file. */ + setTitlebarForCaptureInProgress(); + setForCaptureInProgress(true); + setForCapturedPackets(true); } void MainWindow::captureCaptureUpdateFinished(capture_options *capture_opts) { |