diff --git a/src/AppChooser/Dialog.vala b/src/AppChooser/Dialog.vala index 514d2cf4..04495758 100644 --- a/src/AppChooser/Dialog.vala +++ b/src/AppChooser/Dialog.vala @@ -49,10 +49,18 @@ public class AppChooser.Dialog : Gtk.Window { AppInfo? info = app_id == "" ? null : new DesktopAppInfo (app_id + ".desktop"); var content_description = ContentType.get_description ("text/plain"); - var content_icon = ContentType.get_icon ("text/plain"); + Icon secondary_icon = new ThemedIcon ("document-open"); if (content_type != "") { content_description = ContentType.get_description (content_type); - content_icon = ContentType.get_icon (content_type); + if (content_description.contains ("x-scheme-handler")) { + ///TRANSLATORS: An http link + content_description = _("link"); + } + + var content_icon = ContentType.get_icon (content_type); + if (Gtk.IconTheme.get_for_display (Gdk.Display.get_default ()).has_gicon (content_icon)) { + secondary_icon = content_icon; + } } var primary_text = _("An application wants to open a %s").printf (content_description); @@ -60,7 +68,7 @@ public class AppChooser.Dialog : Gtk.Window { primary_text = _("“%s” wants to open a %s").printf (info.get_display_name (), content_description); } - var secondary_text = _("Open file with…"); + var secondary_text = _("Open with…"); if (filename != "") { secondary_text = _("Open “%s” with…").printf (filename); } @@ -82,7 +90,7 @@ public class AppChooser.Dialog : Gtk.Window { xalign = 0 }; - var mime_icon = new Gtk.Image.from_gicon (content_icon) { + var mime_icon = new Gtk.Image.from_gicon (secondary_icon) { pixel_size = 48 };