From 87b1f025f2eaacaf1eaaa259018adddb4a9298ab Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 29 Mar 2004 16:14:12 +0000 Subject: Fixes #138263. 2004-03-29 Federico Mena Quintero Fixes #138263. * lib/ephy-file-chooser.h: Remove EPHY_RESPONSE_OPEN and EPHY_RESPONSE_SAVE; we'll use GTK_RESPONSE_ACCEPT instead. * lib/ephy-file-chooser.c (ephy_file_chooser_new): Use GTK_RESPONSE_ACCEPT rather than EPHY_RESPONSE_*. * embed/print-dialog.c (print_filechooser_response_cb): Likewise. * src/bookmarks/ephy-bookmarks-editor.c (import_from_file_response_cb): Likewise. * src/prefs-dialog.c (download_path_response_cb): Likewise. * src/window-commands.c (open_response_cb): Likewise. * embed/mozilla/ContentHandler.cpp (PromptForSaveToFile): Likewise. * embed/mozilla/EphyHeaderSniffer.cpp (filechooser_response_cb): Likewise. * embed/mozilla/FilePicker.cpp (Init): Likewise. (Show): Likewise. --- embed/mozilla/ContentHandler.cpp | 2 +- embed/mozilla/EphyHeaderSniffer.cpp | 2 +- embed/mozilla/FilePicker.cpp | 15 +++++++-------- embed/print-dialog.c | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index b39df19bd..d9f8b6b64 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -138,7 +138,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile( NS_ConvertUCS2toUTF8 (aDefaultFile).get()); response = gtk_dialog_run (GTK_DIALOG (dialog)); - if (response == EPHY_RESPONSE_SAVE) + if (response == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); diff --git a/embed/mozilla/EphyHeaderSniffer.cpp b/embed/mozilla/EphyHeaderSniffer.cpp index 68e51ca6c..d7165af18 100644 --- a/embed/mozilla/EphyHeaderSniffer.cpp +++ b/embed/mozilla/EphyHeaderSniffer.cpp @@ -199,7 +199,7 @@ EphyHeaderSniffer::OnSecurityChange (nsIWebProgress *aWebProgress, nsIRequest *a static void filechooser_response_cb (EphyFileChooser *dialog, gint response, EphyHeaderSniffer* sniffer) { - if (response == EPHY_RESPONSE_SAVE) + if (response == GTK_RESPONSE_ACCEPT) { char *filename; GtkWidget *parent = NULL; // FIXME! diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp index d8e2e15a1..eddb73d5f 100644 --- a/embed/mozilla/FilePicker.cpp +++ b/embed/mozilla/FilePicker.cpp @@ -110,9 +110,9 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t gtk_dialog_add_buttons (GTK_DIALOG (mDialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, EPHY_RESPONSE_OPEN, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (mDialog), EPHY_RESPONSE_OPEN); + gtk_dialog_set_default_response (GTK_DIALOG (mDialog), GTK_RESPONSE_ACCEPT); break; case nsIFilePicker::modeOpenMultiple: @@ -124,9 +124,9 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t gtk_dialog_add_buttons (GTK_DIALOG (mDialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, EPHY_RESPONSE_OPEN, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (mDialog), EPHY_RESPONSE_OPEN); + gtk_dialog_set_default_response (GTK_DIALOG (mDialog), GTK_RESPONSE_ACCEPT); break; @@ -136,9 +136,9 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t gtk_dialog_add_buttons (GTK_DIALOG (mDialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, EPHY_RESPONSE_SAVE, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (mDialog), EPHY_RESPONSE_SAVE); + gtk_dialog_set_default_response (GTK_DIALOG (mDialog), GTK_RESPONSE_ACCEPT); break; default: g_assert_not_reached (); @@ -385,8 +385,7 @@ NS_IMETHODIMP GFilePicker::Show(PRInt16 *_retval) switch (response) { - case EPHY_RESPONSE_OPEN: - case EPHY_RESPONSE_SAVE: + case GTK_RESPONSE_ACCEPT: *_retval = nsIFilePicker::returnOK; break; default: diff --git a/embed/print-dialog.c b/embed/print-dialog.c index 4fc54788c..224a75691 100755 --- a/embed/print-dialog.c +++ b/embed/print-dialog.c @@ -254,7 +254,7 @@ print_filechooser_response_cb (GtkDialog *fc, int response, EphyDialog *dialog) { - if (response == EPHY_RESPONSE_SAVE) + if (response == GTK_RESPONSE_ACCEPT) { char *filename; -- cgit v1.2.3