[nautilus/wip/antoniof/visisble-columns-followup: 1/2] list-view: Set folder name as subtitle of Visible Columns dialog
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/visisble-columns-followup: 1/2] list-view: Set folder name as subtitle of Visible Columns dialog
- Date: Fri, 5 Aug 2022 13:21:18 +0000 (UTC)
commit ebbf16b2576bea9b92f8a6e4421e44a746ecbafc
Author: António Fernandes <antoniof gnome org>
Date: Fri Aug 5 14:19:56 2022 +0100
list-view: Set folder name as subtitle of Visible Columns dialog
Avoids taking too much horizontal space for long folder names.
src/nautilus-list-view.c | 7 +++----
src/resources/ui/nautilus-list-view-column-editor.ui | 8 +++++++-
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 1c275cb04..e2389eac3 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -538,10 +538,10 @@ create_column_editor (NautilusListView *view)
{
g_autoptr (GtkBuilder) builder = NULL;
GtkWidget *window;
+ AdwWindowTitle *window_title;
GtkWidget *box;
GtkWidget *column_chooser;
NautilusFile *file;
- char *str;
char *name;
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-list-view-column-editor.ui");
@@ -552,10 +552,9 @@ create_column_editor (NautilusListView *view)
file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
name = nautilus_file_get_display_name (file);
- str = g_strdup_printf (_("Visible Columns - %s"), name);
+ window_title = ADW_WINDOW_TITLE (gtk_builder_get_object (builder, "window_title"));
+ adw_window_title_set_subtitle (window_title, name);
g_free (name);
- gtk_window_set_title (GTK_WINDOW (window), str);
- g_free (str);
box = GTK_WIDGET (gtk_builder_get_object (builder, "box"));
diff --git a/src/resources/ui/nautilus-list-view-column-editor.ui
b/src/resources/ui/nautilus-list-view-column-editor.ui
index adfcbfe54..c4cab589e 100644
--- a/src/resources/ui/nautilus-list-view-column-editor.ui
+++ b/src/resources/ui/nautilus-list-view-column-editor.ui
@@ -9,7 +9,13 @@
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
- <object class="AdwHeaderBar"/>
+ <object class="AdwHeaderBar">
+ <child type="title">
+ <object class="AdwWindowTitle" id="window_title">
+ <property name="title" translatable="true">Visible Columns</property>
+ </object>
+ </child>
+ </object>
</child>
<child>
<object class="GtkBox" id="box">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]