aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2004-03-30 00:05:23 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2004-03-30 00:05:23 +0800
commit9fb5753f5269d9ce94a0815660dfc907c6d96cdf (patch)
treeca05877a390f51ec9dc586a05a32ffd3600bb9a8
parentdf0bef1f04e5cc6782a80fe328805f806b579cd3 (diff)
downloadgsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar.gz
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar.bz2
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar.lz
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar.xz
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.tar.zst
gsoc2013-epiphany-9fb5753f5269d9ce94a0815660dfc907c6d96cdf.zip
Fixes #138263.
2004-03-29 Federico Mena Quintero <federico@ximian.com> 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.
-rw-r--r--ChangeLog28
-rw-r--r--embed/mozilla/ContentHandler.cpp2
-rw-r--r--embed/mozilla/EphyHeaderSniffer.cpp2
-rw-r--r--embed/mozilla/FilePicker.cpp15
-rwxr-xr-xembed/print-dialog.c2
-rw-r--r--lib/ephy-file-chooser.c8
-rw-r--r--lib/ephy-file-chooser.h6
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c2
-rw-r--r--src/prefs-dialog.c2
-rw-r--r--src/window-commands.c2
10 files changed, 45 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 85124b100..42ed2d2bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2004-03-29 Federico Mena Quintero <federico@ximian.com>
+
+ 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.
+
2004-03-29 Christian Persch <chpe@cvs.gnome.org>
* src/epiphany.in:
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 5cd1bdbbe..a2dabda03 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -132,7 +132,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
NS_ConvertUTF16toUTF8 (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 28bbf7e22..1a14fe962 100644
--- a/embed/mozilla/EphyHeaderSniffer.cpp
+++ b/embed/mozilla/EphyHeaderSniffer.cpp
@@ -197,7 +197,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 a456be78f..39283c56e 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 01e20e325..ddc8192d5 100755
--- a/embed/print-dialog.c
+++ b/embed/print-dialog.c
@@ -258,7 +258,7 @@ print_filechooser_response_cb (GtkDialog *fc,
int response,
EphyDialog *dialog)
{
- if (response == EPHY_RESPONSE_SAVE)
+ if (response == GTK_RESPONSE_ACCEPT)
{
char *filename;
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index c3baec5ec..a7f610336 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -238,19 +238,19 @@ ephy_file_chooser_new (const char *title,
{
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
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 (dialog),
- EPHY_RESPONSE_OPEN);
+ GTK_RESPONSE_ACCEPT);
}
else if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
{
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
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 (dialog),
- EPHY_RESPONSE_SAVE);
+ GTK_RESPONSE_ACCEPT);
}
if (parent != NULL)
diff --git a/lib/ephy-file-chooser.h b/lib/ephy-file-chooser.h
index 1ca3426f4..d3d729ca6 100644
--- a/lib/ephy-file-chooser.h
+++ b/lib/ephy-file-chooser.h
@@ -37,12 +37,6 @@ G_BEGIN_DECLS
typedef struct EphyFileChooserPrivate EphyFileChooserPrivate;
-enum
-{
- EPHY_RESPONSE_OPEN = 2,
- EPHY_RESPONSE_SAVE = 3
-};
-
typedef struct
{
GtkFileChooserDialog parent;
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index fab8237a6..f789922a2 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -515,7 +515,7 @@ import_from_file_response_cb (GtkDialog *dialog, gint response,
{
char *filename;
- if (response == EPHY_RESPONSE_OPEN)
+ if (response == GTK_RESPONSE_ACCEPT)
{
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 017151c5f..1261c57f1 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1282,7 +1282,7 @@ prefs_homepage_blank_button_clicked_cb (GtkWidget *button,
static void
download_path_response_cb (GtkDialog *fc, gint response, EphyDialog *dialog)
{
- if (response == EPHY_RESPONSE_OPEN)
+ if (response == GTK_RESPONSE_ACCEPT)
{
char *dir;
diff --git a/src/window-commands.c b/src/window-commands.c
index 2611dcbe6..f6618f985 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -364,7 +364,7 @@ window_cmd_file_bookmark_page (GtkAction *action,
static void
open_response_cb (GtkDialog *dialog, int response, EphyWindow *window)
{
- if (response == EPHY_RESPONSE_OPEN)
+ if (response == GTK_RESPONSE_ACCEPT)
{
char *uri, *converted;