Add an image filter to the file chooser.
2005-10-05 Dennis Cranston <dennis_cranston@yahoo.com> * gnome-wp-capplet.c: (wallpaper_properties_init): Add an image filter to the file chooser.
This commit is contained in:
parent
82ed701d08
commit
e43e1a350d
2 changed files with 16 additions and 0 deletions
|
@ -932,6 +932,7 @@ static void wallpaper_properties_init (poptContext ctx) {
|
|||
GdkCursor * cursor;
|
||||
const gchar ** args;
|
||||
GtkIconInfo * icon_info = NULL;
|
||||
GtkFileFilter *filter;
|
||||
|
||||
gtk_rc_parse_string ("style \"wp-tree-defaults\" {\n"
|
||||
" GtkTreeView::horizontal-separator = 6\n"
|
||||
|
@ -1280,6 +1281,16 @@ static void wallpaper_properties_init (poptContext ctx) {
|
|||
gtk_file_chooser_set_use_preview_label (GTK_FILE_CHOOSER (capplet->filesel),
|
||||
FALSE);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_add_pixbuf_formats (filter);
|
||||
gtk_file_filter_set_name (filter, _("Images"));
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (capplet->filesel), filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, _("All Files"));
|
||||
gtk_file_filter_add_pattern (filter, "*");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (capplet->filesel), filter);
|
||||
|
||||
capplet->image = gtk_image_new ();
|
||||
gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (capplet->filesel),
|
||||
capplet->image);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue