aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-03-31 22:17:43 +0000
committerGuy Harris <guy@alum.mit.edu>2013-03-31 22:17:43 +0000
commit78ab71cc9d2a0e99d44315e64daa4e9b50ef81a5 (patch)
treef7410767a67aea93df18eb85cace633923c36713 /ui
parent1f74d7a1b219115749e945d96554b60082778643 (diff)
Rename set_display_filename() to set_titlebar_for_capture_file(), as
it affects more than just the file name, it also affects whatever "you have unsaved changes" indicator the UI provides. Put a comment in the Qt code as a reminder of how to set the "you have unsaved changes" indicator. svn path=/trunk/; revision=48680
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk/main.c6
-rw-r--r--ui/qt/main_window.cpp3
-rw-r--r--ui/qt/main_window_slots.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index d35d2e36d2..3f7b0b7370 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -1344,7 +1344,7 @@ resolv_update_cb(gpointer data _U_)
/* Set main_window_name and its icon title to the capture filename */
static void
-set_display_filename(capture_file *cf)
+set_titlebar_for_capture_file(capture_file *cf)
{
gchar *display_name;
gchar *window_name;
@@ -1368,7 +1368,7 @@ set_display_filename(capture_file *cf)
void
main_update_for_unsaved_changes(capture_file *cf)
{
- set_display_filename(cf);
+ set_titlebar_for_capture_file(cf);
set_menus_for_capture_file(cf);
set_toolbar_for_capture_file(cf);
}
@@ -1664,7 +1664,7 @@ main_capture_cb_capture_fixed_finished(capture_options *capture_opts _U_)
/* The capture isn't stopping any more - it's stopped. */
capture_stopping = FALSE;
- /*set_display_filename(cf);*/
+ /*set_titlebar_for_capture_file(cf);*/
/* Enable menu items that make sense if you're not currently running
a capture. */
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index e42dbf5d24..f1b765bccb 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -1259,7 +1259,8 @@ void MainWindow::setMenusForFileSet(bool enable_list_files) {
}
void MainWindow::updateForUnsavedChanges() {
-// set_display_filename(cf);
+// set_titlebar_for_capture_file(cf);
+// this->setWindowModified(cf->unsaved_changes);
setMenusForCaptureFile();
// set_toolbar_for_capture_file(cf);
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 2645b01eed..6d21c716f6 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -313,7 +313,7 @@ void MainWindow::captureFileReadFinished(const capture_file *cf) {
// wsApp->setLastOpenDir(dir_path);
// g_free(dir_path);
// }
-// set_display_filename(cf);
+// set_titlebar_for_capture_file(cf);
/* Update the appropriate parts of the main window. */
updateForUnsavedChanges();