Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 4 insertions, 10 deletions
-rw-r--r--badwolf.c14
diff --git a/badwolf.c b/badwolf.c
index a69c05a..9071351 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -445,28 +445,22 @@ downloadCb_decide_destination(WebKitDownload *download,
gint chooser_response;
GtkWindow *parent_window = GTK_WINDOW(browser->window->main_window);
- GtkWidget *file_dialog = gtk_file_chooser_dialog_new(NULL,
- parent_window,
- GTK_FILE_CHOOSER_ACTION_SAVE,
- _("_Cancel"),
- GTK_RESPONSE_CANCEL,
- _("_Save"),
- GTK_RESPONSE_ACCEPT,
- NULL);
+ GtkFileChooserNative *file_dialog =
+ gtk_file_chooser_native_new(NULL, parent_window, GTK_FILE_CHOOSER_ACTION_SAVE, NULL, NULL);
GtkFileChooser *file_chooser = GTK_FILE_CHOOSER(file_dialog);
gtk_file_chooser_set_current_name(file_chooser, suggested_filename);
gtk_file_chooser_set_do_overwrite_confirmation(file_chooser, TRUE);
webkit_download_set_allow_overwrite(download, TRUE);
- chooser_response = gtk_dialog_run(GTK_DIALOG(file_dialog));
+ chooser_response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(file_dialog));
if(chooser_response == GTK_RESPONSE_ACCEPT)
webkit_download_set_destination(download, gtk_file_chooser_get_uri(file_chooser));
else
webkit_download_cancel(download);
- gtk_widget_destroy(file_dialog);
+ g_object_unref(file_dialog);
return FALSE; /* Let it propagate */
}