From 5bade6fe6a14cce50508ee5d510a4560ebe3e421 Mon Sep 17 00:00:00 2001 From: Mike Newman Date: Sat, 7 Jun 2003 14:41:56 +0000 Subject: Support user-defined return values via env vars, like dialog did. --- src/text.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/text.c') diff --git a/src/text.c b/src/text.c index af655e50..0afe2694 100644 --- a/src/text.c +++ b/src/text.c @@ -41,7 +41,7 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) glade_dialog = zenity_util_load_glade_file ("zenity_text_dialog"); if (glade_dialog == NULL) { - data->exit_code = -1; + data->exit_code = zenity_util_return_exit_code (ZENITY_ERROR); return; } @@ -95,13 +95,13 @@ zenity_text_dialog_response (GtkWidget *widget, int response, gpointer data) gtk_text_buffer_get_bounds (zen_text_data->buffer, &start, &end); g_printerr (gtk_text_buffer_get_text (zen_text_data->buffer, &start, &end, 0)); } - zen_data->exit_code = 0; + zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); gtk_main_quit (); break; default: /* Esc dialog */ - zen_data->exit_code = 1; + zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); break; } } -- cgit