From 7423b96443ed33e02f0ccc3339544df11577551b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 4 Mar 2022 15:34:36 -0800 Subject: [PATCH] Backport MR#122 to fix setting window title --- ...ow_set_title-with-hdy_header_bar_set.patch | 70 +++++++++++++++++++ eog.spec | 8 ++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 0001-Replace-gtk_window_set_title-with-hdy_header_bar_set.patch diff --git a/0001-Replace-gtk_window_set_title-with-hdy_header_bar_set.patch b/0001-Replace-gtk_window_set_title-with-hdy_header_bar_set.patch new file mode 100644 index 0000000..0aee8e9 --- /dev/null +++ b/0001-Replace-gtk_window_set_title-with-hdy_header_bar_set.patch @@ -0,0 +1,70 @@ +From 72439f78b4b44f08a0eedc8b4ade496a0bb8446c Mon Sep 17 00:00:00 2001 +From: Krifa75 +Date: Thu, 17 Feb 2022 22:23:55 +0100 +Subject: [PATCH] Replace gtk_window_set_title with hdy_header_bar_set_title + +--- + src/eog-window.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/eog-window.c b/src/eog-window.c +index cc7bccb2..ea18ab87 100644 +--- a/src/eog-window.c ++++ b/src/eog-window.c +@@ -995,7 +995,7 @@ eog_window_display_image (EogWindow *window, EogImage *image) + + eog_scroll_view_set_image (EOG_SCROLL_VIEW (priv->view), image); + +- gtk_window_set_title (GTK_WINDOW (window), eog_image_get_caption (image)); ++ hdy_header_bar_set_title (HDY_HEADER_BAR (priv->headerbar), eog_image_get_caption (image)); + + update_status_bar (window); + +@@ -1422,7 +1422,7 @@ eog_job_load_cb (EogJobLoad *job, gpointer data) + window); + + gtk_window_set_icon (GTK_WINDOW (window), NULL); +- gtk_window_set_title (GTK_WINDOW (window), ++ hdy_header_bar_set_title (HDY_HEADER_BAR (priv->headerbar), + eog_image_get_caption (job->image)); + + eog_window_set_message_area (window, message_area); +@@ -1560,7 +1560,7 @@ handle_image_selection_changed_cb (EogThumbView *thumbview, EogWindow *window) + priv = window->priv; + + if (eog_list_store_length (EOG_LIST_STORE (priv->store)) == 0) { +- gtk_window_set_title (GTK_WINDOW (window), ++ hdy_header_bar_set_title (HDY_HEADER_BAR (priv->headerbar), + g_get_application_name()); + gtk_statusbar_remove_all (GTK_STATUSBAR (priv->statusbar), + priv->image_info_message_cid); +@@ -2353,7 +2353,7 @@ eog_job_close_save_cb (EogJobSave *job, gpointer user_data) + window); + + gtk_window_set_icon (GTK_WINDOW (window), NULL); +- gtk_window_set_title (GTK_WINDOW (window), ++ hdy_header_bar_set_title (HDY_HEADER_BAR (window->priv->headerbar), + eog_image_get_caption (job->current_image)); + + eog_window_set_message_area (window, message_area); +@@ -2776,7 +2776,7 @@ eog_job_save_cb (EogJobSave *job, gpointer user_data) + /* check if job contains any error */ + if (EOG_JOB (job)->error == NULL) { + update_status_bar (window); +- gtk_window_set_title (GTK_WINDOW (window), ++ hdy_header_bar_set_title (HDY_HEADER_BAR (window->priv->headerbar), + eog_image_get_caption (job->current_image)); + + g_simple_action_set_enabled (G_SIMPLE_ACTION (action_save), FALSE); +@@ -2793,7 +2793,7 @@ eog_job_save_cb (EogJobSave *job, gpointer user_data) + window); + + gtk_window_set_icon (GTK_WINDOW (window), NULL); +- gtk_window_set_title (GTK_WINDOW (window), ++ hdy_header_bar_set_title (HDY_HEADER_BAR (window->priv->headerbar), + eog_image_get_caption (job->current_image)); + + eog_window_set_message_area (window, message_area); +-- +2.35.1 + diff --git a/eog.spec b/eog.spec index 9615d84..f24be68 100644 --- a/eog.spec +++ b/eog.spec @@ -8,7 +8,7 @@ Name: eog Version: 42~beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: Eye of GNOME image viewer # The GFDL has an "or later version" clause embedded inside the license. @@ -16,6 +16,9 @@ Summary: Eye of GNOME image viewer License: GPLv2+ and GFDL URL: https://wiki.gnome.org/Apps/EyeOfGnome Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{tarball_version}.tar.xz +# Fix setting the window title +# https://gitlab.gnome.org/GNOME/eog/-/merge_requests/122 +Patch0: 0001-Replace-gtk_window_set_title-with-hdy_header_bar_set.patch BuildRequires: pkgconfig(exempi-2.0) BuildRequires: pkgconfig(gdk-pixbuf-2.0) @@ -135,6 +138,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnome.eog.deskto %endif %changelog +* Fri Mar 04 2022 Adam Williamson - 42~beta-2 +- Backport MR#122 to fix setting window title + * Mon Feb 14 2022 David King - 42~beta-1 - Update to 42.beta