From 22625f8b16e1dc38be50cc2e869780b74e7f6891 Mon Sep 17 00:00:00 2001 From: Glynn Foster Date: Tue, 28 Jan 2003 14:58:30 +0000 Subject: Don't display the translators tab unless there is stuff to show. 2003-01-28 Glynn Foster * src/about.c: Don't display the translators tab unless there is stuff to show. * src/entry.c: Add sanity NULL checking. * src/tree.c, src/zenity.h: Add support for a new --editable option. * src/main.c: Add support for new --editable option for the List dialog. Merge in the list of Gtk+ options into the popt table - ripped this from libbonoboui, thanks to James for pointing this out. * src/zenity.glade: Make the translatable strings less arse. * TODO: Update accordingly. --- src/entry.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/entry.c') diff --git a/src/entry.c b/src/entry.c index 3578788..893fbf6 100644 --- a/src/entry.c +++ b/src/entry.c @@ -84,11 +84,16 @@ static void zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data) { ZenityData *zen_data = data; + const gchar *text; switch (response) { case GTK_RESPONSE_OK: zen_data->exit_code = 0; - g_printerr ("%s\n", gtk_entry_get_text (GTK_ENTRY (entry))); + text = gtk_entry_get_text (GTK_ENTRY (entry)); + + if (text != NULL) + g_printerr ("%s\n", gtk_entry_get_text (GTK_ENTRY (entry))); + gtk_main_quit (); break; -- cgit v1.2.1