Hello community,

here is the log from the commit of package evince for openSUSE:Factory checked 
in at 2018-12-31 09:39:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evince (Old)
 and      /work/SRC/openSUSE:Factory/.evince.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evince"

Mon Dec 31 09:39:28 2018 rev:137 rq:661749 version:3.30.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/evince/evince.changes    2018-11-08 
09:43:31.353448953 +0100
+++ /work/SRC/openSUSE:Factory/.evince.new.28833/evince.changes 2018-12-31 
09:39:29.886554984 +0100
@@ -1,0 +2,9 @@
+Thu Dec 27 23:05:40 UTC 2018 - [email protected]
+
+- Add upstream bug fix patches from stable branch:
+  + evince-previewer-Fix-default-icon-name.patch: previewer: Fix
+    default icon name.
+  + evince-shell-Use-monitor-instead-of-screen.patch: Use monitor
+    instead of screen to determine window size.
+
+-------------------------------------------------------------------

New:
----
  evince-previewer-Fix-default-icon-name.patch
  evince-shell-Use-monitor-instead-of-screen.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evince.spec ++++++
--- /var/tmp/diff_new_pack.3iTSAx/_old  2018-12-31 09:39:30.374554584 +0100
+++ /var/tmp/diff_new_pack.3iTSAx/_new  2018-12-31 09:39:30.374554584 +0100
@@ -26,6 +26,10 @@
 Group:          Productivity/Office/Other
 URL:            https://www.gnome.org/projects/evince/
 Source0:        
https://download.gnome.org/sources/evince/3.30/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM evince-previewer-Fix-default-icon-name.patch -- 
previewer: Fix default icon name
+Patch0:         evince-previewer-Fix-default-icon-name.patch
+# PATCH-FIX-UPSTREAM evince-shell-Use-monitor-instead-of-screen.patch -- Use 
monitor instead of screen to determine window size
+Patch1:         evince-shell-Use-monitor-instead-of-screen.patch
 
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++

++++++ evince-previewer-Fix-default-icon-name.patch ++++++
>From b066dd36cafc5ed7173c3708bf8231ec2f3ce526 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= <[email protected]>
Date: Thu, 8 Nov 2018 11:34:45 -0300
Subject: [PATCH] previewer: Fix default icon name

---
 previewer/ev-previewer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/previewer/ev-previewer.c b/previewer/ev-previewer.c
index 146762e0..343bc5de 100644
--- a/previewer/ev-previewer.c
+++ b/previewer/ev-previewer.c
@@ -208,7 +208,7 @@ main (gint argc, gchar **argv)
        ev_stock_icons_init ();
 
        g_set_application_name (_("GNOME Document Previewer"));
-       gtk_window_set_default_icon_name ("evince");
+       gtk_window_set_default_icon_name ("org.gnome.Evince");
 
         application = gtk_application_new (NULL,
                                            G_APPLICATION_NON_UNIQUE |
-- 
2.18.1

++++++ evince-shell-Use-monitor-instead-of-screen.patch ++++++
>From ad9f94b35cc09d148dfad8cb0d9efd94010daad3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= <[email protected]>
Date: Mon, 12 Nov 2018 12:23:39 -0300
Subject: [PATCH] shell: Use monitor instead of screen to determine window size

Replace gdk_screen_width/height deprecated API

Fixes #757
---
 shell/ev-window.c | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/shell/ev-window.c b/shell/ev-window.c
index 142836ba..11169c14 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1253,6 +1253,31 @@ setup_model_from_metadata (EvWindow *window)
        }
 }
 
+static void
+monitor_get_dimesions (EvWindow *ev_window,
+                       gint     *width,
+                       gint     *height)
+{
+       GdkDisplay  *display;
+       GdkWindow   *gdk_window;
+       GdkMonitor  *monitor;
+       GdkRectangle geometry;
+
+       *width = 0;
+       *height = 0;
+
+       display = gtk_widget_get_display (GTK_WIDGET (ev_window));
+       gdk_window = gtk_widget_get_window (GTK_WIDGET (ev_window));
+
+       if (gdk_window) {
+               monitor = gdk_display_get_monitor_at_window (display,
+                                                            gdk_window);
+               gdk_monitor_get_workarea (monitor, &geometry);
+               *width = geometry.width;
+               *height = geometry.height;
+       }
+}
+
 static void
 setup_document_from_metadata (EvWindow *window)
 {
@@ -1292,9 +1317,10 @@ setup_document_from_metadata (EvWindow *window)
        if (width_ratio > 0. && height_ratio > 0.) {
                gdouble    document_width;
                gdouble    document_height;
-               GdkScreen *screen;
                gint       request_width;
                gint       request_height;
+               gint       monitor_width;
+               gint       monitor_height;
 
                ev_document_get_max_page_size (window->priv->document,
                                               &document_width, 
&document_height);
@@ -1302,10 +1328,10 @@ setup_document_from_metadata (EvWindow *window)
                request_width = (gint)(width_ratio * document_width + 0.5);
                request_height = (gint)(height_ratio * document_height + 0.5);
 
-               screen = gtk_window_get_screen (GTK_WINDOW (window));
-               if (screen) {
-                       request_width = MIN (request_width, 
gdk_screen_get_width (screen));
-                       request_height = MIN (request_height, 
gdk_screen_get_height (screen));
+               monitor_get_dimesions (window, &monitor_width, &monitor_height);
+               if (monitor_width > 0 && monitor_height > 0) {
+                       request_width = MIN (request_width, monitor_width);
+                       request_height = MIN (request_height, monitor_height);
                }
 
                if (request_width > 0 && request_height > 0) {
-- 
2.18.1


Reply via email to