From eb38aea55cfc4cd9f058c108db61685d59fd3d67 Mon Sep 17 00:00:00 2001 From: yangxx Date: Mon, 2 Feb 2004 17:15:50 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@471 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/gui/main/src/callbacks.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index 98585271..f7eaa26b 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -189,7 +189,7 @@ void get_label_string (GtkWidget * text, gchar * label) strcpy(label,gtk_entry_get_text(entry)); } -void get_label(MainWindow * mw, gchar * str, gchar* dialogue_title, gchar * label_str) +gboolean get_label(MainWindow * mw, gchar * str, gchar* dialogue_title, gchar * label_str) { GtkWidget * dialogue; GtkWidget * text; @@ -220,8 +220,9 @@ void get_label(MainWindow * mw, gchar * str, gchar* dialogue_title, gchar * labe case GTK_RESPONSE_REJECT: default: gtk_widget_destroy(dialogue); - break; + return FALSE; } + return TRUE; } MainWindow * get_window_data_struct(GtkWidget * widget) @@ -651,9 +652,8 @@ void create_new_tab(GtkWidget* widget, gpointer user_data){ } strcpy(label,"Page"); - get_label(mw_data, label,"Get the name of the tab","Please input tab's name"); - - create_tab (mw_data, mw_data, notebook, label); + if(get_label(mw_data, label,"Get the name of the tab","Please input tab's name")) + create_tab (mw_data, mw_data, notebook, label); } void -- 2.34.1