diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-download.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk-download.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fs/gnunet-fs-gtk-download.c b/src/fs/gnunet-fs-gtk-download.c index 09ae7e1f..ee6b1927 100644 --- a/src/fs/gnunet-fs-gtk-download.c +++ b/src/fs/gnunet-fs-gtk-download.c | |||
@@ -37,8 +37,8 @@ struct dialog_context | |||
37 | 37 | ||
38 | 38 | ||
39 | gboolean | 39 | gboolean |
40 | GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget *widget, GdkEvent *event, | 40 | GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget * widget, GdkEvent * event, |
41 | gpointer user_data) | 41 | gpointer user_data) |
42 | { | 42 | { |
43 | GtkBuilder *builder; | 43 | GtkBuilder *builder; |
44 | struct dialog_context *dlc; | 44 | struct dialog_context *dlc; |
@@ -73,7 +73,8 @@ GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget *widget, GdkEvent *event, | |||
73 | return FALSE; | 73 | return FALSE; |
74 | } | 74 | } |
75 | GNUNET_free_non_null (dc->filename); | 75 | GNUNET_free_non_null (dc->filename); |
76 | dc->filename = GNUNET_GTK_filechooser_get_filename_loc (GTK_FILE_CHOOSER (dlc->dialog)); | 76 | dc->filename = |
77 | GNUNET_GTK_filechooser_get_filename_loc (GTK_FILE_CHOOSER (dlc->dialog)); | ||
77 | dc->is_recursive = | 78 | dc->is_recursive = |
78 | (TRUE == | 79 | (TRUE == |
79 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (cb))) ? GNUNET_YES : | 80 | gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (cb))) ? GNUNET_YES : |
@@ -122,17 +123,19 @@ GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget *widget, GdkEvent *event, | |||
122 | } | 123 | } |
123 | 124 | ||
124 | void | 125 | void |
125 | GNUNET_GTK_save_as_dialog_response_cb (GtkDialog *dialog, | 126 | GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog, gint response_id, |
126 | gint response_id, gpointer user_data) | 127 | gpointer user_data) |
127 | { | 128 | { |
128 | struct dialog_context *dlc; | 129 | struct dialog_context *dlc; |
130 | |||
129 | dlc = g_object_get_data (G_OBJECT (dialog), "dialog-context"); | 131 | dlc = g_object_get_data (G_OBJECT (dialog), "dialog-context"); |
130 | if (dlc != NULL) | 132 | if (dlc != NULL) |
131 | dlc->response = response_id; | 133 | dlc->response = response_id; |
132 | /* dialogs don't get delete-event the way normal windows do, | 134 | /* dialogs don't get delete-event the way normal windows do, |
133 | * call the handler manually | 135 | * call the handler manually |
134 | */ | 136 | */ |
135 | GNUNET_GTK_save_as_dialog_delete_event_cb (GTK_WIDGET (dialog), NULL, user_data); | 137 | GNUNET_GTK_save_as_dialog_delete_event_cb (GTK_WIDGET (dialog), NULL, |
138 | user_data); | ||
136 | gtk_widget_destroy (GTK_WIDGET (dialog)); | 139 | gtk_widget_destroy (GTK_WIDGET (dialog)); |
137 | } | 140 | } |
138 | 141 | ||
@@ -183,6 +186,7 @@ GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc) | |||
183 | } | 186 | } |
184 | } | 187 | } |
185 | dlc = g_new0 (struct dialog_context, 1); | 188 | dlc = g_new0 (struct dialog_context, 1); |
189 | |||
186 | dlc->builder = builder; | 190 | dlc->builder = builder; |
187 | dlc->dialog = ad; | 191 | dlc->dialog = ad; |
188 | dlc->response = 0; | 192 | dlc->response = 0; |