Backport MR#122 to fix setting window title

This commit is contained in:
Adam Williamson 2022-03-04 15:34:36 -08:00
parent 1998187f4b
commit 7423b96443
2 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,70 @@
From 72439f78b4b44f08a0eedc8b4ade496a0bb8446c Mon Sep 17 00:00:00 2001
From: Krifa75 <yahiaoui.fakhri@gmail.com>
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

View File

@ -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 <awilliam@redhat.com> - 42~beta-2
- Backport MR#122 to fix setting window title
* Mon Feb 14 2022 David King <amigadave@amigadave.com> - 42~beta-1
- Update to 42.beta