simplify filter pattern

This commit is contained in:
Artem Anufrij 2017-11-26 00:26:07 +01:00
parent 57160bd4db
commit 0fe08f5ffe
2 changed files with 2 additions and 10 deletions

View file

@ -64,7 +64,7 @@ namespace Webpin {
var stay_open = new Gtk.ToggleButton (); var stay_open = new Gtk.ToggleButton ();
stay_open.active = desktop_file.hide_on_close; stay_open.active = desktop_file.hide_on_close;
stay_open.tooltip_text = _("Run in background when closed"); stay_open.tooltip_text = _("Run in background if closed");
stay_open.image = new Gtk.Image.from_icon_name ("view-pin-symbolic", Gtk.IconSize.MENU); stay_open.image = new Gtk.Image.from_icon_name ("view-pin-symbolic", Gtk.IconSize.MENU);
stay_open.toggled.connect (() => { stay_open.toggled.connect (() => {
desktop_file.edit_property ("X-Webpin-StayOpen", stay_open.active.to_string ()); desktop_file.edit_property ("X-Webpin-StayOpen", stay_open.active.to_string ());

View file

@ -234,16 +234,8 @@ namespace Webpin {
private void on_icon_chooser_activate () { private void on_icon_chooser_activate () {
var filter = new Gtk.FileFilter (); var filter = new Gtk.FileFilter ();
filter.set_filter_name (_("Images")); filter.set_filter_name (_("Images"));
filter.add_pattern ("*.png"); filter.add_mime_type ("image/*");
filter.add_pattern ("*.svg");
filter.add_pattern ("*.jpg");
filter.add_pattern ("*.jpeg");
filter.add_pattern ("*.PNG");
filter.add_pattern ("*.SVG");
filter.add_pattern ("*.JPG");
filter.add_pattern ("*.JPEG");
file_chooser = new Gtk.FileChooserDialog ("", null, file_chooser = new Gtk.FileChooserDialog ("", null,
Gtk.FileChooserAction.OPEN, Gtk.FileChooserAction.OPEN,