diff options
author | Corey Berla <corey@berla.me> | 2022-08-05 12:54:01 -0700 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-08-07 01:15:29 +0000 |
commit | 29616fc86874d9c2a956c8d0496713ef627998d5 (patch) | |
tree | 68e458f96a8387e7f5cfb3332a852994d4514e01 /src/nautilus-app-chooser.c | |
parent | 8fe25c418c9d3c8321385cd91f000e433e113147 (diff) | |
download | nautilus-29616fc86874d9c2a956c8d0496713ef627998d5.tar.gz |
app-chooser: Use more specific title
Make default title "Open File" or "Open Folder" if it's a folder.
If we are acting on a mix of items make it "Open Items"
Diffstat (limited to 'src/nautilus-app-chooser.c')
-rw-r--r-- | src/nautilus-app-chooser.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/nautilus-app-chooser.c b/src/nautilus-app-chooser.c index 63a8b302a..6775a2386 100644 --- a/src/nautilus-app-chooser.c +++ b/src/nautilus-app-chooser.c @@ -144,6 +144,7 @@ nautilus_app_chooser_constructed (GObject *object) NautilusAppChooser *self = NAUTILUS_APP_CHOOSER (object); g_autoptr (GAppInfo) info = NULL; g_autofree gchar *content_type_description = NULL; + gchar *title; G_OBJECT_CLASS (nautilus_app_chooser_parent_class)->constructed (object); @@ -169,9 +170,21 @@ nautilus_app_chooser_constructed (GObject *object) G_CALLBACK (on_application_selected), self); + if (!self->single_content_type) + { + title = _("Open Items"); + } + else if (g_strcmp0 (self->content_type, "inode/directory") == 0) + { + title = _("Open Folder"); + } + else + { + title = _("Open File"); + } + gtk_header_bar_set_title_widget (GTK_HEADER_BAR (gtk_dialog_get_header_bar (GTK_DIALOG (self))), - adw_window_title_new (gtk_window_get_title (GTK_WINDOW (self)), - self->content_type)); + adw_window_title_new (title, NULL)); if (self->single_content_type) { |