diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 13 |
2 files changed, 14 insertions, 5 deletions
@@ -1,3 +1,9 @@ +2006-01-08 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/ContentHandler.cpp: + + Make ESC cancel the content handler dialogue. Bug #325811. + 2006-01-06 Crispin Flowerday <gnome@flowerday.cx> * src/window-commands.c (window_cmd_help_about): diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 678ea5077..e7d7ca885 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -154,7 +154,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile( nsILocalFile **_retval) { EphyFileChooser *dialog; - gint response; + int response; char *filename = NULL; nsEmbedCString defaultFile; @@ -375,15 +375,18 @@ NS_METHOD GContentHandler::MIMEConfirmAction () gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, CONTENT_ACTION_SAVEAS); gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, CONTENT_ACTION_NONE); + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button (GTK_DIALOG (dialog), action_label, mAction); gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser"); + + int defaultResponse = mAction == CONTENT_ACTION_NONE + ? (int) GTK_RESPONSE_CANCEL + : (int) mAction; + gtk_dialog_set_default_response (GTK_DIALOG (dialog), defaultResponse); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), (guint) mAction); - - NS_ADDREF (this); + NS_ADDREF_THIS(); g_signal_connect_data (dialog, "response", G_CALLBACK (response_cb), this, (GClosureNotify) release_cb, (GConnectFlags) 0); |