diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-02-27 22:50:01 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-02-27 22:50:01 +0800 |
commit | b19f5097e2c7c2a433f48064346685cfc89a16ce (patch) | |
tree | b1be8cb03a9a023578f3b9c8802a4801b5eadf56 /embed/mozilla/FilePicker.cpp | |
parent | 9f59023c308b583478e4519cf8d08419db4361b0 (diff) | |
download | gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar.gz gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar.bz2 gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar.lz gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar.xz gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.tar.zst gsoc2013-epiphany-b19f5097e2c7c2a433f48064346685cfc89a16ce.zip |
Fix for gtk+ filechooser API change.
2004-02-27 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/FilePicker.cpp:
* lib/ephy-file-chooser.c: (ephy_file_chooser_init),
(ephy_file_chooser_new):
* src/prefs-dialog.c: (prefs_download_path_button_clicked_cb):
Fix for gtk+ filechooser API change.
Diffstat (limited to 'embed/mozilla/FilePicker.cpp')
-rw-r--r-- | embed/mozilla/FilePicker.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/embed/mozilla/FilePicker.cpp b/embed/mozilla/FilePicker.cpp index 77e1c436c..2c7150ebd 100644 --- a/embed/mozilla/FilePicker.cpp +++ b/embed/mozilla/FilePicker.cpp @@ -104,9 +104,21 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t switch (mode) { - case nsIFilePicker::modeOpen: case nsIFilePicker::modeGetFolder: + gtk_file_chooser_set_action (GTK_FILE_CHOOSER (mDialog), + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); + + gtk_dialog_add_buttons (GTK_DIALOG (mDialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, EPHY_RESPONSE_OPEN, + NULL); + gtk_dialog_set_default_response (GTK_DIALOG (mDialog), EPHY_RESPONSE_OPEN); + break; + case nsIFilePicker::modeOpenMultiple: + gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (mDialog), TRUE); + /* fallthrough */ + case nsIFilePicker::modeOpen: gtk_file_chooser_set_action (GTK_FILE_CHOOSER (mDialog), GTK_FILE_CHOOSER_ACTION_OPEN); @@ -117,6 +129,7 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t gtk_dialog_set_default_response (GTK_DIALOG (mDialog), EPHY_RESPONSE_OPEN); break; + case nsIFilePicker::modeSave: gtk_file_chooser_set_action (GTK_FILE_CHOOSER (mDialog), GTK_FILE_CHOOSER_ACTION_SAVE); @@ -132,12 +145,6 @@ NS_IMETHODIMP GFilePicker::Init(nsIDOMWindowInternal *parent, const PRUnichar *t break; } - gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (mDialog), - mode == nsIFilePicker::modeOpenMultiple); - - gtk_file_chooser_set_folder_mode (GTK_FILE_CHOOSER (mDialog), - mode == nsIFilePicker::modeGetFolder); - return NS_OK; } |