diff options
-rw-r--r-- | file.c | 2 | ||||
-rw-r--r-- | file.h | 2 | ||||
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/main_titlebar.c | 2 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 6 |
5 files changed, 8 insertions, 8 deletions
@@ -4060,7 +4060,7 @@ cf_can_save_as(capture_file *cf) * Does this file have unsaved data? */ gboolean -cf_not_saved(capture_file *cf) +cf_has_unsaved_data(capture_file *cf) { /* * If this is a temporary file, or a file with unsaved changes, it @@ -232,7 +232,7 @@ gboolean cf_can_save_as(capture_file *cf); * @param cf the capture file to check * @return TRUE if it has unsaved data, FALSE if it doesn't */ -gboolean cf_not_saved(capture_file *cf); +gboolean cf_has_unsaved_data(capture_file *cf); /** * Save all packets in a capture file to a new file, and, if that succeeds, diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index 2b460159c5..f67c4a178e 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -1027,7 +1027,7 @@ file_merge_cmd_cb(GtkWidget *widget, gpointer data _U_) { gint response; if (prefs.gui_ask_unsaved) { - if (cf_not_saved(&cfile)) { + if (cf_has_unsaved_data(&cfile)) { /* This file has unsaved data; ask the user whether to save the capture. */ if (cfile.is_tempfile) { @@ -1135,7 +1135,7 @@ test_file_close(capture_file *cf, gboolean from_quit, const char *before_what) capture_in_progress = FALSE; if (prefs.gui_ask_unsaved) { - if (cf_not_saved(cf) || capture_in_progress) { + if (cf_has_unsaved_data(cf) || capture_in_progress) { /* This file has unsaved data or there's a capture in progress; ask the user whether to save the data. */ if (cf->is_tempfile) { diff --git a/ui/gtk/main_titlebar.c b/ui/gtk/main_titlebar.c index 0d0a8cc2f1..1ff0a97251 100644 --- a/ui/gtk/main_titlebar.c +++ b/ui/gtk/main_titlebar.c @@ -95,7 +95,7 @@ set_titlebar_for_capture_file(capture_file *cf) if (cf && cf->filename) { display_name = cf_get_display_name(cf); - window_name = g_strdup_printf("%s%s", cf_not_saved(cf) ? "*" : "", + window_name = g_strdup_printf("%s%s", cf_has_unsaved_data(cf) ? "*" : "", display_name); g_free(display_name); main_set_window_name(window_name); diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 47b4cf556d..4c1c65a3ee 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -372,7 +372,7 @@ void MainWindow::mergeCaptureFile() return; if (prefs.gui_ask_unsaved) { - if (cf_not_saved(cap_file_)) { + if (cf_has_unsaved_data(cap_file_)) { QMessageBox msg_dialog; gchar *display_basename; int response; @@ -980,7 +980,7 @@ bool MainWindow::testCaptureFileClose(bool from_quit, QString &before_what) { #endif if (prefs.gui_ask_unsaved) { - if (cf_not_saved(cap_file_) || capture_in_progress) { + if (cf_has_unsaved_data(cap_file_) || capture_in_progress) { QMessageBox msg_dialog; QString question; QPushButton *default_button; @@ -1120,7 +1120,7 @@ void MainWindow::setTitlebarForCaptureFile() if (cap_file_ && cap_file_->filename) { display_name = cf_get_display_name(cap_file_); - setWindowModified(cf_not_saved(cap_file_)); + setWindowModified(cf_has_unsaved_data(cap_file_)); // Clear the window title so that setWindowFilePath does something setWindowTitle(NULL); setWindowFilePath(display_name); |