diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-10-26 18:45:56 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-10-26 18:45:56 +0800 |
commit | eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b (patch) | |
tree | 9c1ae176d61be345a8d3295aa9e43e48a43464da /embed/mozilla/FilePicker.h | |
parent | a34a545dbe35d250c5f5743634909ad2a45f423b (diff) | |
download | gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar.gz gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar.bz2 gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar.lz gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar.xz gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.tar.zst gsoc2013-epiphany-eb6b2cdb2e89e41759cf3b1cd136cfca42e6e42b.zip |
Port to new gtk+ file chooser.
2003-10-26 Christian Persch <chpe@cvs.gnome.org>
Port to new gtk+ file chooser.
* data/epiphany.schemas.in:
* lib/ephy-prefs.h:
Add key for remembering upload path.
* embed /Makefile.am:
* embed/downloader-view.c:
* embed/ephy-embed-persist.c: (ephy_embed_persist_get_type),
(ephy_embed_persist_set_dest), (ephy_embed_persist_set_embed),
(ephy_embed_persist_set_fc_title),
(ephy_embed_persist_set_fc_parent), (ephy_embed_persist_set_flags),
(ephy_embed_persist_set_max_size),
(ephy_embed_persist_set_persist_key),
(ephy_embed_persist_set_source), (ephy_embed_persist_get_dest),
(ephy_embed_persist_get_embed), (ephy_embed_persist_get_fc_title),
(ephy_embed_persist_get_fc_parent), (ephy_embed_persist_get_flags),
(ephy_embed_persist_get_max_size),
(ephy_embed_persist_get_persist_key),
(ephy_embed_persist_get_source), (ephy_embed_persist_set_property),
(ephy_embed_persist_get_property), (ephy_embed_persist_init),
(ephy_embed_persist_finalize), (ephy_embed_persist_class_init),
(ephy_embed_persist_cancel), (ephy_embed_persist_save),
(ephy_embed_persist_new):
* embed/ephy-embed-persist.h:
* embed/ephy-embed-popup-control.c: (save_url),
(save_property_url), (background_download_completed),
(embed_popup_set_image_as_background_cmd),
(embed_popup_copy_image_location_cmd):
* src/popup-commands.c: (save_property_url),
(background_download_completed),
(popup_cmd_set_image_as_background):
* src/window-commands.c: (open_response_cb),
(window_cmd_file_open), (window_cmd_file_save_as):
* src/window-commands.h:
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_get_type),
(ephy_favicon_cache_new), (icon_is_obsolete), (icons_added_cb),
(remove_obsolete_icons), (ephy_favicon_cache_init),
(favicon_download_completed_cb), (ephy_favicon_cache_download),
(ephy_favicon_cache_get):
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/mozilla-embed-persist.cpp:
* embed/mozilla/mozilla-embed-single.cpp:
* src/popup-commands.c: (save_property_url),
(background_download_completed),
(popup_cmd_set_image_as_background):
* src/window-commands.c: (open_response_cb),
(window_cmd_file_open), (window_cmd_file_save_as):
* src/window-commands.h:
Simplify EphyEmbedPersist implementation. Augment it with properties
for showing a file chooser to select persist destination. Port all
callers to new interfaces.
* embed/ephy-embed-single.c: (ephy_embed_single_remove_passwords):
* embed/ephy-embed-single.h:
* embed/ephy-embed-utils.c:
* embed/ephy-embed-utils.h:
Obsolete and removed.
* embed/mozilla/ContentHandler.cpp:
* embed/mozilla/ContentHandler.h:
Misc cleanups.
* embed/mozilla/FilePicker.cpp:
* embed/mozilla/FilePicker.h:
Port to new file chooser class.
* embed/mozilla/Makefile.am:
* lib/Makefile.am:
* lib/ephy-file-chooser.c: (ephy_file_chooser_get_type),
(current_folder_changed_cb), (ephy_file_chooser_init),
(ephy_file_chooser_finalize), (ephy_file_chooser_set_persist_key),
(ephy_file_chooser_set_property), (ephy_file_chooser_get_property),
(ephy_file_chooser_class_init), (ephy_file_chooser_new):
* lib/ephy-file-chooser.h:
* src/bookmarks/ephy-bookmarks-editor.c:
(import_from_file_response_cb), (import_dialog_response_cb):
New file chooser wrapper class; ported file chooser callers to it.
Diffstat (limited to 'embed/mozilla/FilePicker.h')
-rw-r--r-- | embed/mozilla/FilePicker.h | 55 |
1 files changed, 15 insertions, 40 deletions
diff --git a/embed/mozilla/FilePicker.h b/embed/mozilla/FilePicker.h index 430e8d854..cf6a7f68f 100644 --- a/embed/mozilla/FilePicker.h +++ b/embed/mozilla/FilePicker.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2001 Philip Langdale + * Copyright (C) 2003 Christian Persch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,20 +15,17 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ */ -#ifndef __FilePicker_h -#define __FilePicker_h +#ifndef EPHY_FILEPICKER_H +#define EPHY_FILEPICKER_H + +#include <nsIFilePicker.h> +#include <nsISupports.h> -#include "nsIFilePicker.h" -#include "nsError.h" -#include "nsIDOMWindow.h" -#include "nsIDOMWindowInternal.h" -#include "nsCOMPtr.h" -#include "nsString.h" -#include "nsILocalFile.h" -#include <gtk/gtktogglebutton.h> -#include "ephy-embed-shell.h" +#include "ephy-file-chooser.h" #define G_FILEPICKER_CID \ { /* 3636dc79-0b42-4bad-8a3f-ae15d3671d17 */ \ @@ -37,48 +35,25 @@ {0x8a, 0x3f, 0xae, 0x15, 0xd3, 0x67, 0x1d, 0x17} \ } -#define G_FILEPICKER_CONTRACTID "@mozilla.org/filepicker;1" -#define G_FILEPICKER_CLASSNAME "Epiphany's File Picker Implementation" +#define G_FILEPICKER_CONTRACTID "@mozilla.org/filepicker;1" +#define G_FILEPICKER_CLASSNAME "Epiphany File Picker Implementation" class nsIFactory; extern nsresult NS_NewFilePickerFactory(nsIFactory** aFactory); -/* Header file */ class GFilePicker : public nsIFilePicker { - public: +public: NS_DECL_ISUPPORTS NS_DECL_NSIFILEPICKER - enum { returnOK = nsIFilePicker::returnOK, - returnCancel = nsIFilePicker::returnCancel, - returnReplace = nsIFilePicker::returnReplace }; - + GFilePicker(); virtual ~GFilePicker(); - /* additional members */ - NS_METHOD InitWithGtkWidget(GtkWidget *aParentWidget, - const char *aTitle, PRInt16 aMode); - NS_METHOD SanityCheck(PRBool *retIsSane); - - private: - NS_METHOD HandleFilePickerResult(); - NS_METHOD ValidateFilePickerResult(PRInt16 *retval); - - nsCOMPtr<nsIDOMWindow> mParent; - - nsCString mTitle; - nsCString mFilter; - nsCString mDefaultString; - - nsCOMPtr<nsILocalFile> mFile; - nsCOMPtr<nsILocalFile> mDisplayDirectory; - +private: + EphyFileChooser *mDialog; PRInt16 mMode; - - GtkWidget *mParentWidget; - GtkWidget *mFileSelector; }; #endif |