aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-04-02 20:35:46 +0000
committerGuy Harris <guy@alum.mit.edu>2013-04-02 20:35:46 +0000
commit432e914dbd43c3ee354aa1eeff8f2dc750913f0e (patch)
tree80578ae6f2e2f3f347a4022b4d5503852e075d56
parentf32a839bb0514461072096dadad0e0d888fc3869 (diff)
Rename cf_not_saved() to cf_has_unsaved_data() to clarify what it
indicates. (Note: "unsaved data" is more than just "unsaved changes"; it could also mean "temporary file that hasn't been saved anywhere".) svn path=/trunk/; revision=48709
-rw-r--r--file.c2
-rw-r--r--file.h2
-rw-r--r--ui/gtk/capture_file_dlg.c4
-rw-r--r--ui/gtk/main_titlebar.c2
-rw-r--r--ui/qt/main_window.cpp6
5 files changed, 8 insertions, 8 deletions
diff --git a/file.c b/file.c
index b9d62a3c65..8dcb9fbcf2 100644
--- a/file.c
+++ b/file.c
@@ -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
diff --git a/file.h b/file.h
index 774b5264eb..fba684915a 100644
--- a/file.h
+++ b/file.h
@@ -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);