src/calendar.c, src/entry.c, src/fileselection.c, Cleanup fixes from Paul

2004-07-19  Glynn Foster  <glynn.foster@sun.com>

	* 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.
This commit is contained in:
Glynn Foster 2004-07-19 01:13:40 +00:00 committed by Glynn Foster
parent 4dd6dd672a
commit 63661a6ea0
8 changed files with 15 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2004-07-19 Glynn Foster <glynn.foster@sun.com>
* 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.
2004-07-19 Glynn Foster <glynn.foster@sun.com> 2004-07-19 Glynn Foster <glynn.foster@sun.com>
* src/main.c, src/tree.c, src/zenity.h, * src/main.c, src/tree.c, src/zenity.h,

View File

@ -107,12 +107,10 @@ zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data)
g_date_free (date); g_date_free (date);
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: default:
@ -120,4 +118,5 @@ zenity_calendar_dialog_response (GtkWidget *widget, int response, gpointer data)
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }

View File

@ -98,12 +98,10 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
if (text != NULL) if (text != NULL)
g_print ("%s\n", text); g_print ("%s\n", text);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: 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); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }

View File

@ -94,18 +94,16 @@ zenity_fileselection_dialog_response (GtkWidget *widget, int response, gpointer
g_slist_free(selections); g_slist_free(selections);
g_free(separator); g_free(separator);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: default:
/* Esc dialog */ /* Esc dialog */
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
gtk_main_quit ();
break; break;
} }
gtk_main_quit ();
} }

View File

@ -126,16 +126,15 @@ zenity_msg_dialog_response (GtkWidget *widget, int response, gpointer data)
switch (response) { switch (response) {
case GTK_RESPONSE_OK: case GTK_RESPONSE_OK:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: default:
zen_data->exit_code = 1; zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }

View File

@ -220,7 +220,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data)
switch (response) { switch (response) {
case GTK_RESPONSE_OK: case GTK_RESPONSE_OK:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
@ -230,7 +229,6 @@ zenity_progress_dialog_response (GtkWidget *widget, int response, gpointer data)
*/ */
kill (getppid (), 1); kill (getppid (), 1);
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: 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); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }

View File

@ -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)); 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); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break; break;
default: 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); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }

View File

@ -564,12 +564,10 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
} }
zenity_tree_dialog_output (); zenity_tree_dialog_output ();
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break; break;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break; break;
default: 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); zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break; break;
} }
gtk_main_quit ();
} }