diff options
-rw-r--r-- | src/fs/gnunet-fs-gtk_download-save-as.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/fs/gnunet-fs-gtk_download-save-as.c b/src/fs/gnunet-fs-gtk_download-save-as.c index f71bb2ed..8ec2dcaf 100644 --- a/src/fs/gnunet-fs-gtk_download-save-as.c +++ b/src/fs/gnunet-fs-gtk_download-save-as.c | |||
@@ -49,10 +49,6 @@ struct DownloadAsDialogContext | |||
49 | */ | 49 | */ |
50 | GtkWidget *dialog; | 50 | GtkWidget *dialog; |
51 | 51 | ||
52 | /** | ||
53 | * Final response code from the dialog. | ||
54 | */ | ||
55 | gint response; | ||
56 | }; | 52 | }; |
57 | 53 | ||
58 | 54 | ||
@@ -118,13 +114,7 @@ GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog, | |||
118 | 114 | ||
119 | dc = dlc->dc; | 115 | dc = dlc->dc; |
120 | 116 | ||
121 | /* FIXME: we should get '-5' (OK) when the user presses 'save' | 117 | if (GTK_RESPONSE_OK != response_id) |
122 | (that's the number set in the glade file), but somehow we do not :-( */ | ||
123 | fprintf (stderr, | ||
124 | "Dialog response code is %d\n", | ||
125 | dlc->response); | ||
126 | |||
127 | if (GTK_RESPONSE_OK != dlc->response) | ||
128 | { | 118 | { |
129 | save_as_dialog_free_download_context (dc); | 119 | save_as_dialog_free_download_context (dc); |
130 | gtk_widget_destroy (GTK_WIDGET (dialog)); | 120 | gtk_widget_destroy (GTK_WIDGET (dialog)); |
@@ -213,6 +203,8 @@ GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc) | |||
213 | gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dlc->dialog), basename); | 203 | gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dlc->dialog), basename); |
214 | GNUNET_free (dirname); | 204 | GNUNET_free (dirname); |
215 | } | 205 | } |
206 | gtk_dialog_set_default_response (GTK_DIALOG (dlc->dialog), | ||
207 | GTK_RESPONSE_OK); | ||
216 | gtk_window_present (GTK_WINDOW (dlc->dialog)); | 208 | gtk_window_present (GTK_WINDOW (dlc->dialog)); |
217 | } | 209 | } |
218 | 210 | ||