[blam] Add OPML filter for import dialog



commit bd609a3c9494793cc30188ee27c32e9b736d3480
Author: FLORET RÃgis <r floret laposte net>
Date:   Tue Aug 23 23:43:10 2011 +0200

    Add OPML filter for import dialog

 src/Opml.cs |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/Opml.cs b/src/Opml.cs
index a22320f..dc5c1ee 100644
--- a/src/Opml.cs
+++ b/src/Opml.cs
@@ -96,6 +96,21 @@ namespace Imendio.Blam {
                           this.opmlDialog, FileChooserAction.Open,
                           Catalog.GetString("Cancel"), ResponseType.Cancel,
                           Catalog.GetString("Open"), ResponseType.Ok);
+         // Add Filters
+        Gtk.FileFilter filter = new Gtk.FileFilter();
+
+        // Filter for Opml files
+        filter.Name = "Outline Processor Markup Language file";
+        filter.AddMimeType("text/x-opml");
+        filter.AddPattern("*.opml");
+        fileDialog.AddFilter(filter);
+
+        // Filter for all files
+        filter = new Gtk.FileFilter();
+        filter.Name = "All files";
+        filter.AddPattern("*.*");
+        fileDialog.AddFilter(filter);
+
 		fileDialog.Modal = true;
 	    }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]