summaryrefslogtreecommitdiff
path: root/src/fileselection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileselection.c')
-rw-r--r--src/fileselection.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fileselection.c b/src/fileselection.c
index ec46f0c..69fc658 100644
--- a/src/fileselection.c
+++ b/src/fileselection.c
@@ -35,7 +35,7 @@ void zenity_fileselection (ZenityData *data, ZenityFileData *file_data)
glade_dialog = zenity_util_load_glade_file ("zenity_fileselection_dialog");
if (glade_dialog == NULL) {
- data->exit_code = -1;
+ data->exit_code = zenity_util_return_exit_code (ZENITY_ERROR);
return;
}
@@ -73,19 +73,20 @@ zenity_fileselection_dialog_response (GtkWidget *widget, int response, gpointer
switch (response) {
case GTK_RESPONSE_OK:
- zen_data->exit_code = 0;
+ zen_data->exit_code = zenity_util_return_exit_code
+ (ZENITY_OK);
g_printerr ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (widget)));
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;
}
}