From 0fe08f5ffe1d62ae1c37f7f9c145f49164194ea4 Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Sun, 26 Nov 2017 00:26:07 +0100 Subject: [PATCH] simplify filter pattern --- src/WebWindow.vala | 2 +- src/Widgets/Assistant.vala | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/WebWindow.vala b/src/WebWindow.vala index dfb1550..3470b00 100644 --- a/src/WebWindow.vala +++ b/src/WebWindow.vala @@ -64,7 +64,7 @@ namespace Webpin { var stay_open = new Gtk.ToggleButton (); 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.toggled.connect (() => { desktop_file.edit_property ("X-Webpin-StayOpen", stay_open.active.to_string ()); diff --git a/src/Widgets/Assistant.vala b/src/Widgets/Assistant.vala index d17ad33..6e6e1f6 100644 --- a/src/Widgets/Assistant.vala +++ b/src/Widgets/Assistant.vala @@ -234,16 +234,8 @@ namespace Webpin { private void on_icon_chooser_activate () { var filter = new Gtk.FileFilter (); - filter.set_filter_name (_("Images")); - filter.add_pattern ("*.png"); - 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"); + filter.add_mime_type ("image/*"); file_chooser = new Gtk.FileChooserDialog ("", null, Gtk.FileChooserAction.OPEN,