summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
authorMike Newman <MikeGTN@src.gnome.org>2003-06-07 14:41:56 +0000
committerMike Newman <MikeGTN@src.gnome.org>2003-06-07 14:41:56 +0000
commit5bade6fe6a14cce50508ee5d510a4560ebe3e421 (patch)
tree35710759f2f1c24923983e246cb86e57b014995d /src/tree.c
parentUntranslate silly strings pointed out by Kjartan Maraas. (diff)
downloadzenity-5bade6fe6a14cce50508ee5d510a4560ebe3e421.tar.gz
zenity-5bade6fe6a14cce50508ee5d510a4560ebe3e421.tar.bz2
zenity-5bade6fe6a14cce50508ee5d510a4560ebe3e421.zip
Support user-defined return values via env vars, like dialog did.
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tree.c b/src/tree.c
index f3e63779..903ef704 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -279,7 +279,7 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
glade_dialog = zenity_util_load_glade_file ("zenity_tree_dialog");
if (glade_dialog == NULL) {
- data->exit_code = -1;
+ data->exit_code = zenity_util_return_exit_code (ZENITY_ERROR);
return;
}
@@ -289,7 +289,7 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data)
if (n_columns == 0) {
g_printerr (_("No column titles specified for List dialog.\n"));
- data->exit_code = -1;
+ data->exit_code = zenity_util_return_exit_code (ZENITY_ERROR);
return;
}
@@ -517,18 +517,18 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
GTK_TREE_VIEW (tree_view));
}
zenity_tree_dialog_output ();
- zen_data->exit_code = 0;
+ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
gtk_main_quit ();
break;
case GTK_RESPONSE_CANCEL:
- zen_data->exit_code = 1;
+ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_CANCEL);
gtk_main_quit ();
break;
default:
/* Esc dialog */
- zen_data->exit_code = 1;
+ zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
break;
}
}
bgstack15