[evince/gpoo/fix-title-1583] shell: Fix title bar when
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gpoo/fix-title-1583] shell: Fix title bar when
- Date: Sun, 11 Apr 2021 20:33:14 +0000 (UTC)
commit 374ebcf5cd815f2358b979582ffaffb74a789cb2
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Sun Apr 11 16:26:42 2021 -0400
shell: Fix title bar when
Before migrating to HdyHeaderBar, gtk_window_set_title was enough
to set the title in the window and GtkHeaderBar because GTK internally
synced both. That bevahiour does not occur with HdyHeaderBar, thus
HdyHeaderBar was updating the title/subtitle only when the document
and the filename were set, leaving the title in blank otherwise
That is, when both title_header and subtitle were set, and did nothing
otherwise.
We now check than in any other situation, we fallback to the title,
which would take a proper value if there is no document, or only we
have its file name.
Fixes #1583
shell/ev-window-title.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
index 87fbd1f7..739eed4e 100644
--- a/shell/ev-window-title.c
+++ b/shell/ev-window-title.c
@@ -139,6 +139,8 @@ ev_window_title_update (EvWindowTitle *window_title)
if (title_header && subtitle) {
hdy_header_bar_set_title (toolbar, title_header);
hdy_header_bar_set_subtitle (toolbar, subtitle);
+ } else if (title) {
+ hdy_header_bar_set_title (toolbar, title);
}
if (window_title->dirname)
gtk_widget_set_tooltip_text (GTK_WIDGET (toolbar),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]