Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/AppChooser/Dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,23 @@ public class AppChooser.Dialog : Gtk.Window {
buttons = new HashTable<string, AppButton> (str_hash, str_equal);
AppInfo? info = app_id == "" ? null : new DesktopAppInfo (app_id + ".desktop");

var primary_text = _("Open file with…");
if (filename != "") {
primary_text = _("Open “%s” with…").printf (filename);
}

var content_description = ContentType.get_description ("text/plain");
var content_icon = ContentType.get_icon ("text/plain");
if (content_type != "") {
content_description = ContentType.get_description (content_type);
content_icon = ContentType.get_icon (content_type);
}

var primary_text = _("An application wants to open a %s").printf (content_description);
if (info != null) {
primary_text = _("“%s” wants to open a %s").printf (info.get_display_name (), content_description);
}

var secondary_text = _("Open file with…");
if (filename != "") {
secondary_text = _("Open “%s” with…").printf (filename);
}

var primary_label = new Gtk.Label (primary_text) {
max_width_chars = 50,
selectable = false,
Expand All @@ -69,11 +74,6 @@ public class AppChooser.Dialog : Gtk.Window {
};
primary_label.add_css_class (Granite.STYLE_CLASS_TITLE_LABEL);

var secondary_text = _("An application requested to open a %s.").printf (content_description);
if (info != null) {
secondary_text = _("“%s” requested to open a %s.").printf (info.get_display_name (), content_description);
}

var secondary_label = new Gtk.Label (secondary_text) {
max_width_chars = 50,
margin_bottom = 18,
Expand Down