Hello community,

here is the log from the commit of package mate-notification-daemon for 
openSUSE:Factory checked in at 2018-03-20 21:57:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-notification-daemon (Old)
 and      /work/SRC/openSUSE:Factory/.mate-notification-daemon.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mate-notification-daemon"

Tue Mar 20 21:57:22 2018 rev:18 rq:586572 version:1.20.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/mate-notification-daemon/mate-notification-daemon.changes
        2017-11-09 13:57:11.036456461 +0100
+++ 
/work/SRC/openSUSE:Factory/.mate-notification-daemon.new/mate-notification-daemon.changes
   2018-03-20 21:57:57.826858661 +0100
@@ -1,0 +2,13 @@
+Fri Mar  9 19:10:07 UTC 2018 - [email protected]
+
+- Update to version 1.20.0:
+  * Require GTK+ 3.22 and GLib 2.50.
+  * Avoid deprecated gdk_screen_get_monitor_,
+    gdk_screen_get_width/height(), gdk_screen_get_n_monitors()
+    functions.
+  * An implementation of WidthOfScreen and HeightOfScreen.
+  * Update translations.
+- Add mate-notification-daemon-gtk-3.20.patch: Restore GLib 2.48
+  and GTK+ 3.20 support.
+
+-------------------------------------------------------------------

Old:
----
  mate-notification-daemon-1.18.1.tar.xz

New:
----
  mate-notification-daemon-1.20.0.tar.xz
  mate-notification-daemon-gtk-3.20.patch

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

Other differences:
------------------
++++++ mate-notification-daemon.spec ++++++
--- /var/tmp/diff_new_pack.8c7Esl/_old  2018-03-20 21:57:58.630829714 +0100
+++ /var/tmp/diff_new_pack.8c7Esl/_new  2018-03-20 21:57:58.630829714 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package mate-notification-daemon
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,22 +16,24 @@
 #
 
 
-%define _version 1.18
+%define _version 1.20
 Name:           mate-notification-daemon
-Version:        1.18.1
+Version:        1.20.0
 Release:        0
 Summary:        Notification daemon for MATE
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/GUI/Other
 Url:            https://mate-desktop.org/
 Source:         
http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
+# PATCH-FEATURE-OPENSUSE mate-notification-daemon-gtk-3.20.patch -- Restore 
GLib 2.48 and GTK+ 3.20 support.
+Patch0:         mate-notification-daemon-gtk-3.20.patch
 BuildRequires:  mate-common >= %{_version}
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
 BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(gtk+-3.0) >= 3.14
+BuildRequires:  pkgconfig(gtk+-3.0) >= 3.20
 BuildRequires:  pkgconfig(libcanberra-gtk3)
 BuildRequires:  pkgconfig(libnotify)
 BuildRequires:  pkgconfig(libwnck-3.0)
@@ -47,6 +49,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 NOCONFIGURE=1 mate-autogen
@@ -62,7 +65,7 @@
 find %{buildroot} -type f -name "*.la" -delete -print
 %suse_update_desktop_file mate-notification-properties
 
-%if 0%{?suse_version} <= 1320
+%if 0%{?suse_version} < 1500
 %post
 %desktop_database_post
 %icon_theme_cache_post
@@ -75,7 +78,12 @@
 %endif
 
 %files
-%doc AUTHORS COPYING NEWS
+%if 0%{?suse_version} >= 1500
+%license COPYING
+%else
+%doc COPYING
+%endif
+%doc AUTHORS NEWS
 %{_bindir}/mate-notification-properties
 %dir %{_libexecdir}/mate-notification-daemon/
 %{_libexecdir}/mate-notification-daemon/mate-notification-daemon

++++++ mate-notification-daemon-1.18.1.tar.xz -> 
mate-notification-daemon-1.20.0.tar.xz ++++++
++++ 31877 lines of diff (skipped)

++++++ mate-notification-daemon-gtk-3.20.patch ++++++
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ dnl ------------------------------------
 dnl Requirements for the themes
 dnl ---------------------------------------------------------------------------
 
-GTK_REQUIRED=3.22.0
+GTK_REQUIRED=3.20.0
 
 PKG_CHECK_MODULES(THEME,
   gtk+-3.0 >= $GTK_REQUIRED
@@ -89,7 +89,7 @@ AC_SUBST(THEME_LIBS)
 dnl ---------------------------------------------------------------------------
 dnl Requirements for the daemon
 dnl ---------------------------------------------------------------------------
-REQ_GLIB_VERSION=2.50.0
+REQ_GLIB_VERSION=2.48.0
 REQ_DBUS_VERSION=0.78
 REQ_LIBCANBERRA_GTK_VERSION=0.4
 
PKG_CHECK_MODULES(GMODULE,gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""])
--- a/src/capplet/mate-notification-properties.c
+++ b/src/capplet/mate-notification-properties.c
@@ -212,8 +212,12 @@ static void notification_properties_dial
        // TODO: add support for mulitple screens.
        screen = gdk_display_get_default_screen(display);
        g_assert(screen != NULL);
-       
+
+#if GTK_CHECK_VERSION (3, 22, 0)
        num_monitors = gdk_display_get_n_monitors(display);
+#else
+       num_monitors = gdk_screen_get_n_monitors(screen);
+#endif
        g_assert(num_monitors >= 1);
        
        store = gtk_list_store_new(N_COLUMNS_MONITOR, G_TYPE_INT);
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -176,6 +176,7 @@ static void remove_exit_timeout(NotifyDa
        daemon->priv->exit_timeout_source = 0;
 }
 
+#if GTK_CHECK_VERSION(3, 22, 0)
 static int
 _gtk_get_monitor_num (GdkMonitor *monitor)
 {
@@ -194,10 +195,17 @@ _gtk_get_monitor_num (GdkMonitor *monito
 }
 
 static void create_stack_for_monitor(NotifyDaemon* daemon, GdkScreen* screen, 
GdkMonitor *monitor_num)
+#else
+static void create_stack_for_monitor(NotifyDaemon *daemon, GdkScreen *screen, 
int monitor_num)
+#endif
 {
        NotifyScreen* nscreen = daemon->priv->screen;
 
+#if GTK_CHECK_VERSION(3, 22, 0)
        nscreen->stacks[_gtk_get_monitor_num(monitor_num)] = 
notify_stack_new(daemon, screen, monitor_num, daemon->priv->stack_location);
+#else
+       nscreen->stacks[monitor_num] = notify_stack_new(daemon, screen, 
monitor_num, daemon->priv->stack_location);
+#endif
 }
 
 static void on_screen_monitors_changed(GdkScreen* screen, NotifyDaemon* daemon)
@@ -210,7 +218,11 @@ static void on_screen_monitors_changed(G
        nscreen = daemon->priv->screen;
        display = gdk_screen_get_display (screen);
 
+#if GTK_CHECK_VERSION(3, 22, 0)
        n_monitors = gdk_display_get_n_monitors(display);
+#else
+       n_monitors = gdk_screen_get_n_monitors(screen);
+#endif
 
        if (n_monitors > nscreen->n_stacks)
        {
@@ -220,7 +232,11 @@ static void on_screen_monitors_changed(G
                /* add more stacks */
                for (i = nscreen->n_stacks; i < n_monitors; i++)
                {
+#if GTK_CHECK_VERSION(3, 22, 0)
                        create_stack_for_monitor(daemon, screen, 
gdk_display_get_monitor (display, i));
+#else
+                       create_stack_for_monitor(daemon, screen, i);
+#endif
                }
 
                nscreen->n_stacks = n_monitors;
@@ -266,13 +282,21 @@ static void create_stacks_for_screen(Not
        nscreen = daemon->priv->screen;
        display = gdk_screen_get_display (screen);
 
+#if GTK_CHECK_VERSION(3, 22, 0)
        nscreen->n_stacks = gdk_display_get_n_monitors(display);
+#else
+       nscreen->n_stacks = gdk_screen_get_n_monitors(screen);
+#endif
 
        nscreen->stacks = g_renew(NotifyStack*, nscreen->stacks, 
nscreen->n_stacks);
 
        for (i = 0; i < nscreen->n_stacks; i++)
        {
+#if GTK_CHECK_VERSION(3, 22, 0)
                create_stack_for_monitor(daemon, screen, 
gdk_display_get_monitor (display, i));
+#else
+               create_stack_for_monitor(daemon, screen, i);
+#endif
        }
 }
 
@@ -1508,7 +1532,11 @@ gboolean notify_daemon_notify_handler(No
        }
        else
        {
+#if GTK_CHECK_VERSION (3, 22, 0)
                GdkMonitor *monitor_id;
+#else
+               int monitor_num;
+#endif
                GdkDisplay *display;
                GdkSeat *seat;
                GdkDevice *pointer;
@@ -1527,15 +1555,24 @@ gboolean notify_daemon_notify_handler(No
                        pointer = gdk_seat_get_pointer (seat);
 
                        gdk_device_get_position (pointer, &screen, &x, &y);
+#if GTK_CHECK_VERSION (3, 22, 0)
                        monitor_id = gdk_display_get_monitor_at_point 
(gdk_screen_get_display (screen), x, y);
+#else
+                       monitor_num = gdk_screen_get_monitor_at_point (screen, 
x, y);
+#endif
                }
                else
                {
                        screen = 
gdk_display_get_default_screen(gdk_display_get_default());
+#if GTK_CHECK_VERSION (3, 22, 0)
                        monitor_id = gdk_display_get_monitor 
(gdk_display_get_default(),
                                                              
g_settings_get_int(daemon->gsettings, GSETTINGS_KEY_MONITOR_NUMBER));
+#else
+                       monitor_num = g_settings_get_int (daemon->gsettings, 
GSETTINGS_KEY_MONITOR_NUMBER);
+#endif
                }
 
+#if GTK_CHECK_VERSION (3, 22, 0)
                if (_gtk_get_monitor_num (monitor_id) >= priv->screen->n_stacks)
                {
                        /* screw it - dump it on the last one we'll get
@@ -1544,6 +1581,16 @@ gboolean notify_daemon_notify_handler(No
                }
 
                notify_stack_add_window 
(priv->screen->stacks[_gtk_get_monitor_num (monitor_id)], nw, new_notification);
+#else
+               if (monitor_num >= priv->screen->n_stacks)
+               {
+                       /* screw it - dump it on the last one we'll get
+                        a monitors-changed signal soon enough*/
+                       monitor_num = priv->screen->n_stacks - 1;
+               }
+
+               notify_stack_add_window (priv->screen->stacks[monitor_num], nw, 
new_notification);
+#endif
        }
 
        if (id == 0)
--- a/src/daemon/stack.c
+++ b/src/daemon/stack.c
@@ -36,7 +36,11 @@
 struct _NotifyStack {
        NotifyDaemon* daemon;
        GdkScreen* screen;
+#if GTK_CHECK_VERSION (3, 22, 0)
        GdkMonitor *monitor;
+#else
+       int monitor;
+#endif
        NotifyStackLocation location;
        GList* windows;
        guint update_id;
@@ -189,6 +193,7 @@ translate_coordinates (NotifyStackLocati
         }
 }
 
+#if GTK_CHECK_VERSION (3, 22, 0)
 static int
 _gtk_get_monitor_num (GdkMonitor *monitor)
 {
@@ -205,11 +210,16 @@ _gtk_get_monitor_num (GdkMonitor *monito
 
         return -1;
 }
+#endif
 
 NotifyStack *
 notify_stack_new (NotifyDaemon       *daemon,
                   GdkScreen          *screen,
+#if GTK_CHECK_VERSION (3, 22, 0)
                   GdkMonitor         *monitor,
+#else
+                  int                 monitor,
+#endif
                   NotifyStackLocation location)
 {
         NotifyStack    *stack;
@@ -218,7 +228,11 @@ notify_stack_new (NotifyDaemon       *da
         display = gdk_screen_get_display (screen);
         g_assert (daemon != NULL);
         g_assert (screen != NULL && GDK_IS_SCREEN (screen));
+#if GTK_CHECK_VERSION (3, 22, 0)
         g_assert ((guint)_gtk_get_monitor_num (monitor) < 
(guint)gdk_display_get_n_monitors (display));
+#else
+        g_assert (monitor < (guint) gdk_screen_get_n_monitors (screen));
+#endif
         g_assert (location != NOTIFY_STACK_LOCATION_UNKNOWN);
 
         stack = g_new0 (NotifyStack, 1);
@@ -291,7 +305,12 @@ notify_stack_shift_notifications (Notify
         int             n_wins;
 
         get_work_area (stack, &workarea);
+#if GTK_CHECK_VERSION (3, 22, 0)
         gdk_monitor_get_geometry (stack->monitor, &monitor);
+#else
+        gdk_screen_get_monitor_geometry (stack->screen, stack->monitor,
+                                         &monitor);
+#endif
         gdk_rectangle_intersect (&monitor, &workarea, &workarea);
 
         add_padding_to_rect (&workarea);
--- a/src/daemon/stack.h
+++ b/src/daemon/stack.h
@@ -38,7 +38,11 @@ typedef enum {
 
 typedef struct _NotifyStack NotifyStack;
 
+#if GTK_CHECK_VERSION (3, 22, 0)
 NotifyStack* notify_stack_new(NotifyDaemon* daemon, GdkScreen* screen, 
GdkMonitor *monitor, NotifyStackLocation stack_location);
+#else
+NotifyStack *notify_stack_new(NotifyDaemon *daemon, GdkScreen *screen, int 
monitor, NotifyStackLocation stack_location);
+#endif
 void notify_stack_destroy(NotifyStack* stack);
 
 void notify_stack_set_location(NotifyStack* stack, NotifyStackLocation 
location);
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -267,14 +267,23 @@ static GtkArrowType get_notification_arr
        GdkScreen*      screen;
        GdkRectangle    monitor_geometry;
        GdkDisplay*     display;
+#if GTK_CHECK_VERSION(3, 22, 0)
        GdkMonitor*     monitor;
+#else
+       int             monitor;
+#endif
 
        windata = g_object_get_data(G_OBJECT(nw), "windata");
 
        screen = gdk_window_get_screen(GDK_WINDOW( gtk_widget_get_window(nw)));
        display = gdk_screen_get_display (screen);
+#if GTK_CHECK_VERSION(3, 22, 0)
        monitor = gdk_display_get_monitor_at_point (display, windata->point_x, 
windata->point_y);
        gdk_monitor_get_geometry (monitor, &monitor_geometry);
+#else
+       monitor = gdk_screen_get_monitor_at_point(screen, windata->point_x, 
windata->point_y);
+       gdk_screen_get_monitor_geometry(screen, monitor, &monitor_geometry);
+#endif
 
        if (windata->point_y - monitor_geometry.y + windata->height + 
DEFAULT_ARROW_HEIGHT > monitor_geometry.height)
        {
@@ -309,7 +318,11 @@ static void create_border_with_arrow(Gtk
        int             arrow_offset = DEFAULT_ARROW_OFFSET;
        GdkPoint*       shape_points = NULL;
        int             i = 0;
+#if GTK_CHECK_VERSION(3, 22, 0)
        GdkMonitor*     monitor;
+#else
+       int             monitor;
+#endif
        GdkDisplay*     display;
        GdkRectangle    monitor_geometry;
 
@@ -318,8 +331,13 @@ static void create_border_with_arrow(Gtk
 
        screen = gdk_window_get_screen(GDK_WINDOW(gtk_widget_get_window(nw)));
        display = gdk_screen_get_display (screen);
+#if GTK_CHECK_VERSION(3, 22, 0)
        monitor = gdk_display_get_monitor_at_point (display, windata->point_x, 
windata->point_y);
        gdk_monitor_get_geometry (monitor, &monitor_geometry);
+#else
+       monitor = gdk_screen_get_monitor_at_point(screen, windata->point_x, 
windata->point_y);
+       gdk_screen_get_monitor_geometry(screen, monitor, &monitor_geometry);
+#endif
 
        windata->num_border_points = 5;
 

Reply via email to