From 63661a6ea0de0250b545d794f645a36ffeb88490 Mon Sep 17 00:00:00 2001 From: Glynn Foster Date: Mon, 19 Jul 2004 01:13:40 +0000 Subject: src/calendar.c, src/entry.c, src/fileselection.c, Cleanup fixes from Paul 2004-07-19 Glynn Foster * src/calendar.c, src/entry.c, src/fileselection.c, * src/msg.c, src/progress.c, src/text.c, src/tree.c: Cleanup fixes from Paul Bolle. --- src/calendar.c | 5 ++--- src/entry.c | 3 +-- src/fileselection.c | 4 +--- src/msg.c | 5 ++--- src/progress.c | 3 +-- src/text.c | 2 +- src/tree.c | 3 +-- 7 files changed, 9 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/calendar.c b/src/calendar.c index 2d297786..5936aef2 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -107,17 +107,16 @@ zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data) g_date_free (date); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: /* Esc dialog */ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; - } + } + gtk_main_quit (); } diff --git a/src/entry.c b/src/entry.c index 36ff704a..4d242160 100644 --- a/src/entry.c +++ b/src/entry.c @@ -98,12 +98,10 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data) if (text != NULL) g_print ("%s\n", text); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: @@ -111,4 +109,5 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data) zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } + gtk_main_quit (); } diff --git a/src/fileselection.c b/src/fileselection.c index a783b34a..995ba03f 100644 --- a/src/fileselection.c +++ b/src/fileselection.c @@ -94,18 +94,16 @@ zenity_fileselection_dialog_response (GtkWidget *widget, int response, gpointer g_slist_free(selections); g_free(separator); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: /* Esc dialog */ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); - gtk_main_quit (); break; } + gtk_main_quit (); } diff --git a/src/msg.c b/src/msg.c index 013fc721..27284472 100644 --- a/src/msg.c +++ b/src/msg.c @@ -126,16 +126,15 @@ zenity_msg_dialog_response (GtkWidget *widget, int response, gpointer data) switch (response) { case GTK_RESPONSE_OK: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: - zen_data->exit_code = 1; + zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } + gtk_main_quit (); } diff --git a/src/progress.c b/src/progress.c index 5804e88a..373c5b82 100644 --- a/src/progress.c +++ b/src/progress.c @@ -220,7 +220,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data) switch (response) { case GTK_RESPONSE_OK: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: @@ -230,7 +229,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data) */ kill (getppid (), 1); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: @@ -238,4 +236,5 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data) zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } + gtk_main_quit (); } diff --git a/src/text.c b/src/text.c index 88c08620..b70bed0a 100644 --- a/src/text.c +++ b/src/text.c @@ -175,7 +175,6 @@ zenity_text_dialog_response (GtkWidget *widget, int response, gpointer data) g_print (gtk_text_buffer_get_text (zen_text_data->buffer, &start, &end, 0)); } zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - gtk_main_quit (); break; default: @@ -183,4 +182,5 @@ zenity_text_dialog_response (GtkWidget *widget, int response, gpointer data) zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } + gtk_main_quit (); } diff --git a/src/tree.c b/src/tree.c index e828dfc3..fed58e2a 100644 --- a/src/tree.c +++ b/src/tree.c @@ -564,12 +564,10 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data) } zenity_tree_dialog_output (); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - gtk_main_quit (); break; case GTK_RESPONSE_CANCEL: zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); - gtk_main_quit (); break; default: @@ -577,4 +575,5 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data) zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } + gtk_main_quit (); } -- cgit