aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-file-chooser.h
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-05-09 04:11:17 +0800
committerChristian Persch <chpe@src.gnome.org>2004-05-09 04:11:17 +0800
commitb3fed7cc16e2f03970776e0f874e94c112f4b240 (patch)
treeb54e3d04e84efa3b1df7b32f42b879c3e03d7609 /lib/ephy-file-chooser.h
parent9e4d594ee6ccc51bf5dca17b8f790d7fa1a917c2 (diff)
downloadgsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.gz
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.bz2
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.lz
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.xz
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.zst
gsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.zip
Add convenience functions for creating a filter with a bunch of mime types
2004-05-08 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-chooser.c: (ephy_file_chooser_add_pattern_filter), (ephy_file_chooser_add_mime_filter), (ephy_file_chooser_new): * lib/ephy-file-chooser.h: Add convenience functions for creating a filter with a bunch of mime types or patterns and add it to a file chooser. Those should really be in gtk+; see bug #142142. * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/FilePicker.cpp: * embed/print-dialog.c: (ephy_print_dialog_browse_button_cb): * src/bookmarks/ephy-bookmarks-editor.c: (import_dialog_response_cb): * src/prefs-dialog.c: (prefs_download_path_button_clicked_cb): * src/window-commands.c: (window_cmd_file_open): Add some filters to the file chooser dialogues.
Diffstat (limited to 'lib/ephy-file-chooser.h')
-rw-r--r--lib/ephy-file-chooser.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/ephy-file-chooser.h b/lib/ephy-file-chooser.h
index d3d729ca6..5b576728a 100644
--- a/lib/ephy-file-chooser.h
+++ b/lib/ephy-file-chooser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003 Christian Persch
+ * Copyright (C) 2003, 2004 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
@@ -24,6 +24,7 @@
#include <glib-object.h>
#include <gtk/gtkwidget.h>
+#include <gtk/gtkfilefilter.h>
#include <gtk/gtkfilechooserdialog.h>
G_BEGIN_DECLS
@@ -37,6 +38,16 @@ G_BEGIN_DECLS
typedef struct EphyFileChooserPrivate EphyFileChooserPrivate;
+typedef enum
+{
+ EPHY_FILE_FILTER_ALL_SUPPORTED,
+ EPHY_FILE_FILTER_WEBPAGES,
+ EPHY_FILE_FILTER_IMAGES,
+ EPHY_FILE_FILTER_ALL,
+ EPHY_FILE_FILTER_NONE,
+ EPHY_FILE_FILTER_LAST = EPHY_FILE_FILTER_NONE
+} EphyFileFilterDefault;
+
typedef struct
{
GtkFileChooserDialog parent;
@@ -55,13 +66,24 @@ GType ephy_file_chooser_get_type (void);
EphyFileChooser *ephy_file_chooser_new (const char *title,
GtkWidget *parent,
GtkFileChooserAction action,
- const char *persist_key);
+ const char *persist_key,
+ EphyFileFilterDefault default_filter);
void ephy_file_chooser_set_persist_key (EphyFileChooser *dialog,
const char *key);
const char *ephy_file_chooser_get_persist_key (EphyFileChooser *dialog);
+GtkFileFilter *ephy_file_chooser_add_pattern_filter (EphyFileChooser *dialog,
+ const char *title,
+ const char *first_pattern,
+ ...);
+
+GtkFileFilter *ephy_file_chooser_add_mime_filter (EphyFileChooser *dialog,
+ const char *title,
+ const char *first_mimetype,
+ ...);
+
G_END_DECLS
#endif