aboutsummaryrefslogtreecommitdiffstats
path: root/embed/print-dialog.c
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 /embed/print-dialog.c
parent9e4d594ee6ccc51bf5dca17b8f790d7fa1a917c2 (diff)
downloadgsoc2013-epiphany-b3fed7cc16e2f03970776e0f874e94c112f4b240.tar.gz
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 'embed/print-dialog.c')
-rwxr-xr-xembed/print-dialog.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/embed/print-dialog.c b/embed/print-dialog.c
index ddc8192d5..238be4d98 100755
--- a/embed/print-dialog.c
+++ b/embed/print-dialog.c
@@ -287,13 +287,21 @@ ephy_print_dialog_browse_button_cb (GtkWidget *widget,
{
GtkWidget *parent;
EphyFileChooser *fc;
+ GtkFileFilter *filter;
parent = ephy_dialog_get_control (dialog, print_props[WINDOW_PROP].id);
fc = ephy_file_chooser_new (_("Print to"),
GTK_WIDGET (parent),
GTK_FILE_CHOOSER_ACTION_SAVE,
- CONF_PRINT_DIR);
+ CONF_PRINT_DIR, EPHY_FILE_FILTER_NONE);
+
+ filter = ephy_file_chooser_add_mime_filter (fc, _("Postscript files"),
+ "application/postscript", NULL);
+
+ ephy_file_chooser_add_pattern_filter (fc, _("All Files"), "*", NULL);
+
+ gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (fc), filter);
g_signal_connect (GTK_DIALOG (fc), "response",
G_CALLBACK (print_filechooser_response_cb),