[Xfce4-commits] <ristretto:master> Add jpeg filter to open files dialog

Stephan Arts stephan at xfce.org
Wed Aug 12 12:20:20 CEST 2009


Updating branch refs/heads/master
         to e81a905eac295ffb23214cac5f239e8c0370379d (commit)
       from 90a0d52283c57eafc4c49e2065883a4828580e65 (commit)

commit e81a905eac295ffb23214cac5f239e8c0370379d
Author: Stephan Arts <stephan at xfce.org>
Date:   Sat May 2 00:31:31 2009 +0200

    Add jpeg filter to open files dialog

 ChangeLog         |    4 ++++
 src/main_window.c |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index da3a23e..3742c2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-02  Stephan Arts <stephan at xfce.org>
+
+	* src/main_window.c: Add jpeg filter to the open-files dialog
+
 2009-05-01  Stephan Arts <stephan at xfce.org>
 
 	* src/main_window.c: Make sure the fullscreen-toolbar gets shown in
diff --git a/src/main_window.c b/src/main_window.c
index c308fd0..6ae02d3 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -926,6 +926,11 @@ cb_rstto_main_window_open_image (GtkWidget *widget, RsttoMainWindow *window)
     gtk_file_filter_set_name (filter, _("Images"));
     gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
 
+    filter = gtk_file_filter_new();
+    gtk_file_filter_add_mime_type (filter, "image/jpeg");
+    gtk_file_filter_set_name (filter, _(".jp(e)g"));
+    gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
+
 
     response = gtk_dialog_run(GTK_DIALOG(dialog));
     gtk_widget_hide (dialog);



More information about the Xfce4-commits mailing list