Hello community,

here is the log from the commit of package mate-applet-dock for 
openSUSE:Factory checked in at 2020-02-28 15:22:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-applet-dock (Old)
 and      /work/SRC/openSUSE:Factory/.mate-applet-dock.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mate-applet-dock"

Fri Feb 28 15:22:26 2020 rev:18 rq:780256 version:20.04.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/mate-applet-dock/mate-applet-dock.changes        
2019-05-16 22:02:49.638677805 +0200
+++ 
/work/SRC/openSUSE:Factory/.mate-applet-dock.new.26092/mate-applet-dock.changes 
    2020-02-28 15:22:27.650029877 +0100
@@ -1,0 +2,11 @@
+Sat Feb 22 15:48:43 UTC 2020 - Alexei Sorokin <[email protected]>
+
+- Update to version 20.04.0 (changes since 0.88):
+  * Fix icon blinking when opening a minimised window.
+  * Fix a typo in user application path.
+  * Support pixbufs without an alpha channel.
+  * Use the "distro" module for looking up distribution details.
+  * Fix a few crashes.
+- Drop support for old openSUSE versions.
+
+-------------------------------------------------------------------

Old:
----
  mate-dock-applet-0.88.tar.gz

New:
----
  mate-dock-applet-20.04.0.tar.gz

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

Other differences:
------------------
++++++ mate-applet-dock.spec ++++++
--- /var/tmp/diff_new_pack.7EvJLv/_old  2020-02-28 15:22:28.198030993 +0100
+++ /var/tmp/diff_new_pack.7EvJLv/_new  2020-02-28 15:22:28.198030993 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package mate-applet-dock
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,12 @@
 
 %define _name   mate-dock-applet
 Name:           mate-applet-dock
-Version:        0.88
+Version:        20.04.0
 Release:        0
 Summary:        Dock applet for the MATE panel
 License:        GPL-2.0-or-later
-Group:          System/GUI/Other
-URL:            https://github.com/robint99/mate-dock-applet
-Source:         
https://github.com/robint99/%{_name}/archive/V%{version}.tar.gz#/%{_name}-%{version}.tar.gz
+URL:            https://github.com/ubuntu-mate/mate-dock-applet
+Source:         
https://github.com/ubuntu-mate/%{_name}/archive/%{version}.tar.gz#/%{_name}-%{version}.tar.gz
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  bamf-daemon
@@ -34,17 +33,14 @@
 Requires:       bamf-daemon
 Requires:       python3-Pillow
 Requires:       python3-cairo
+Requires:       python3-distro
 Requires:       python3-gobject
 Requires:       python3-gobject-Gdk
 Requires:       python3-gobject-cairo
+Requires:       python3-python-xlib
 Requires:       python3-xdg
 Recommends:     libunity
 %glib2_gsettings_schema_requires
-%if 0%{?suse_version} >= 1500
-Requires:       python3-python-xlib
-%else
-Requires:       python3-xlib
-%endif
 
 %description
 An application dock applet for the MATE panel.
@@ -72,7 +68,7 @@
 autoreconf -fi
 %configure \
   --with-gtk3
-make %{?_smp_mflags} V=1
+%make_build
 
 %install
 %make_install
@@ -87,14 +83,6 @@
 %py3_compile .
 popd
 
-%if 0%{?suse_version} < 1500
-%post
-%glib2_gsettings_schema_post
-
-%postun
-%glib2_gsettings_schema_postun
-%endif
-
 %files
 %license COPYING
 %doc AUTHORS ChangeLog README.md

++++++ mate-dock-applet-0.88.tar.gz -> mate-dock-applet-20.04.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/.github/FUNDING.yml 
new/mate-dock-applet-20.04.0/.github/FUNDING.yml
--- old/mate-dock-applet-0.88/.github/FUNDING.yml       1970-01-01 
01:00:00.000000000 +0100
+++ new/mate-dock-applet-20.04.0/.github/FUNDING.yml    2020-02-14 
00:49:40.000000000 +0100
@@ -0,0 +1,9 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, 
user2]
+patreon: ubuntu_mate
+open_collective: # Replace with a single Open Collective username
+ko_fi: ubuntumate
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., 
npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., 
cloud-foundry
+custom: https://ubuntu-mate.org/donate/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/README.md 
new/mate-dock-applet-20.04.0/README.md
--- old/mate-dock-applet-0.88/README.md 2019-01-27 08:26:29.000000000 +0100
+++ new/mate-dock-applet-20.04.0/README.md      2020-02-14 00:49:40.000000000 
+0100
@@ -1,7 +1,7 @@
 # An application dock applet for the MATE panel
 
-### Mate dock applet V0.80 on Solus OS, MATE edition
-![V0.80 on Solus OS MATE 
edition](https://github.com/robint99/screenshots/blob/master/Solus%20and%20V.80.png)
+### Mate dock applet V0.88 on Ubuntu MATE 18.10
+![V0.88 on Ubuntu MATE 
18.10](https://github.com/robint99/screenshots/blob/master/dock%20applet%20V0.88.png)
 
 The applet works with both GTK2 and GTK3 versions of MATE and allows you to:
 
@@ -46,7 +46,7 @@
 
 ### Arch Linux
 
-For Arch users there are two packages available in the AUR, a 
[Gtk2](http://aur.archlinux.org/packages/mate-applet-dock-git) version of the 
applet, and a 
[Gtk3](http://aur.archlinux.org/packages/mate-applet-dock-gtk3-git) version.
+For Arch users the GTK 3 version is available as a [package in the 
repositories](https://archlinux.org/packages/community/any/mate-applet-dock/).
 
 ### Gentoo based distributions
 
@@ -57,13 +57,15 @@
 Users of other distros will need to install from source, so first install the 
required dependencies. Note, the package names below are for Ubuntu/Linux 
Mint/Debian - the name of the packages will vary on other distros.
 
 * Python3
-* Python wnck bindings (gir1.2-wnck-1.0 for Gtk2 versions of the applet, 
gir1.2-wnck-3.0 for Gtk3)
-* Python implementation of Xlib - python-xlib (python3-xlib in Ubuntu based 
distributions)
-* GLib development files (libglib2.0-dev)
-* Python Imaging Library (python3-pil)
+* Python wnck bindings (gir1.2-wnck-1.0 for Gtk2 versions of the applet, 
gir1.2-wnck-3.0 for Gtk3) (`gnome-python2-libwnck` in Fedora)
+* Python implementation of Xlib - python-xlib (python3-xlib in Ubuntu based 
distributions and Fedora)
+* GLib development files (libglib2.0-dev) (`glib2-devel` in Fedora)
+* Python Imaging Library (python3-pil) (`python3-pillow` in Fedora)
 * Python 3 Cairo bindings (python3-cairo)
-* Bamf (bamfdaemon, libbamf and gir1.2-bamf)
+* Bamf (bamfdaemon, libbamf and gir1.2-bamf) (`bamf-daemon` and `bamf` in 
Fedora)
+* Python Distro (python3-distro)
 
+  
 
 then cd to the directory containing all of the development files and run:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/configure.ac 
new/mate-dock-applet-20.04.0/configure.ac
--- old/mate-dock-applet-0.88/configure.ac      2019-01-27 08:26:29.000000000 
+0100
+++ new/mate-dock-applet-20.04.0/configure.ac   2020-02-14 00:49:40.000000000 
+0100
@@ -1,4 +1,4 @@
-AC_INIT([Dock Applet], [0.88])
+AC_INIT([Dock Applet], [20.04.0])
 
 AM_INIT_AUTOMAKE
 AM_PATH_PYTHON([3.0])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/src/dock.in 
new/mate-dock-applet-20.04.0/src/dock.in
--- old/mate-dock-applet-0.88/src/dock.in       2019-01-27 08:26:29.000000000 
+0100
+++ new/mate-dock-applet-20.04.0/src/dock.in    2020-02-14 00:49:40.000000000 
+0100
@@ -2180,7 +2180,7 @@
             # state that .desktop filenames should not contain spaces, so....
             dfname = self.ccl_win.name.replace(" ", "-")
 
-            local_apps = os.path.expanduser("~/.local/share/appplications")
+            local_apps = os.path.expanduser("~/.local/share/applications")
             if not os.path.exists(local_apps):
                 # ~/.local/share/applications doesn't exist, so create it
                 os.mkdir(local_apps)
@@ -2708,7 +2708,9 @@
 
         elif (type(object) is Bamf.Window) and (object.is_user_visible()):
             the_app = matcher.get_application_for_window(object)
-            self.window_added(the_app, object)
+            # fix for #174
+            if the_app is not None:
+                self.window_added(the_app, object)
 
     def view_vis_changed(self, view, object):
         """ Handler for the Bamf.View user visibilty changed signal
@@ -2877,7 +2879,9 @@
                     self.set_all_apps_minimise_targets()
         elif type(object is Bamf.Window):
             the_app = matcher.get_application_for_window(object)
-            self.window_removed(the_app, object)
+            # fix for #174
+            if the_app is not None:
+                self.window_removed(the_app, object)
 
     def do_urgent_changed(self, view, object):
         """ Handler for the Bamf.Application urgent changed signal
@@ -3170,45 +3174,38 @@
         pixbuf = None
         pixbuf_s = None
 
+        # try to get the icon from wnck
         if dock_app.icon_name == "wnck":
-            # we need to get the icon from wnck
-            if dock_app.icon_name == "wnck":
-                win = dock_app.get_first_normal_win()
-                if win is not None:
-                    pixbuf = window_control.get_icon_pb(win)
+            win = dock_app.get_first_normal_win()
+            if win is not None:
+                pixbuf = window_control.get_icon_pb(win)
+                if pixbuf is not None:
                     # scale at best quality
                     pixbuf = pixbuf.scale_simple(icon_size * scale_factor, 
icon_size * scale_factor,
                                                  GdkPixbuf.InterpType.HYPER)
                     # scale to the correct size
                     dock_app.icon_filename = "wnck"  # we got it from wnck
 
-            # can happen e.g. with dock prefs window...
-            # pixbuf = self.applet.render_icon(Gtk.STOCK_EXECUTE,
-            #                                  stock_size, None)
-            # dock_app.icon_filename = "STOCK_EXECUTE"
+        # look up the icon filename using Gtk
+        if pixbuf is None and dock_app.has_desktop_file():
+            dai = Gio.DesktopAppInfo.new_from_filename(dock_app.desktop_file)
+            the_icon = dai.get_icon()
+            if the_icon is Gio.ThemedIcon:
+                icon_info = 
self.icontheme.choose_icon_for_scale(the_icon.get_names(),
+                                                                 icon_size, 
scale_factor,
+                                                                 
Gtk.IconLookUpFlags.FORCE_SIZE)
+            else:
+                icon_info = 
self.icontheme.choose_icon_for_scale([dock_app.icon_name, None],
+                                                                 icon_size, 
scale_factor,
+                                                                 
Gtk.IconLookupFlags.FORCE_SIZE)
 
-        else:
-            if dock_app.has_desktop_file():
-                # look up the icon filename using Gtk
-
-                dai = 
Gio.DesktopAppInfo.new_from_filename(dock_app.desktop_file)
-                the_icon = dai.get_icon()
-                if the_icon is Gio.ThemedIcon:
-                    icon_info = 
self.icontheme.choose_icon_for_scale(the_icon.get_names(),
-                                                                     
icon_size, scale_factor,
-                                                                     
Gtk.IconLookUpFlags.FORCE_SIZE)
-                else:
-                    icon_info = 
self.icontheme.choose_icon_for_scale([dock_app.icon_name, None],
-                                                                     
icon_size, scale_factor,
-                                                                     
Gtk.IconLookupFlags.FORCE_SIZE)
-
-                if icon_info is not None:
-                    dock_app.icon_filename = icon_info.get_filename()
-
-                    try:
-                        pixbuf = icon_info.load_icon()
-                    except GLib.GError:
-                        pixbuf = None
+            if icon_info is not None:
+                dock_app.icon_filename = icon_info.get_filename()
+
+                try:
+                    pixbuf = icon_info.load_icon()
+                except GLib.GError:
+                    pixbuf = None
 
         if pixbuf is None:
             # we couldn't get the icon from the .desktop or wnck but there a 
still a few
@@ -4143,8 +4140,11 @@
             # rarely, the last active win does not end up as the active window
             # if we activate here, so instead a workaround which seems to do
             # the trick is use a timer as below
+            
+            # fix for #176, don't send the current event time to the activation
+            # timer
             GObject.timeout_add(20, win_activation_timer,
-                                [last_active_win, 
Gtk.get_current_event_time()])
+                                [last_active_win, 0]) 
 
         else:
             # minimize all windows and do the last active window last of all
@@ -4546,24 +4546,27 @@
 
         dx, dy = self.get_dock_root_coords()
 
-        if self.panel_orient in ["top", "bottom"]:
-            final_x = x - self.scrolled_win.get_hadjustment().get_value()
-            if self.nice_sizing:
-                max_w = self.applet.get_allocation().width
-            else:
-                max_w = self.scrolled_win.get_max_content_width()
-            final_x = min(max(final_x, dx), dx + max_w)
-            final_y = y
-        else:
-            final_y = y - self.scrolled_win.get_vadjustment().get_value()
-            if self.nice_sizing:
-                max_h = self.applet.get_allocation().height
-            else:
-                max_h = self.scrolled_win.get_max_content_height()
-            final_y = min(max(final_y, dy), dy + max_h)
-            final_x = x
-
-        return final_x, final_y
+        try:
+            if self.panel_orient in ["top", "bottom"]:
+                final_x = x - self.scrolled_win.get_hadjustment().get_value()
+                if self.nice_sizing:
+                    max_w = self.applet.get_allocation().width
+                else:
+                    max_w = self.scrolled_win.get_max_content_width()
+                final_x = min(max(final_x, dx), dx + max_w)
+                final_y = y
+            else:
+                final_y = y - self.scrolled_win.get_vadjustment().get_value()
+                if self.nice_sizing:
+                    max_h = self.applet.get_allocation().height
+                else:
+                    max_h = self.scrolled_win.get_max_content_height()
+                final_y = min(max(final_y, dy), dy + max_h)
+                final_x = x
+
+            return final_x, final_y
+        except:
+            return x, y
 
     def get_app_icon_size(self):
         """ Gets the size of a single app icon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/src/dock_xml.in 
new/mate-dock-applet-20.04.0/src/dock_xml.in
--- old/mate-dock-applet-0.88/src/dock_xml.in   2019-01-27 08:26:29.000000000 
+0100
+++ new/mate-dock-applet-20.04.0/src/dock_xml.in        2020-02-14 
00:49:40.000000000 +0100
@@ -42,7 +42,7 @@
 import xml.etree.ElementTree as ET
 import sys
 import os
-import platform
+import distro as distribution
 
 
 def write_xml(filename, desktop_files, light_ind, show_all_apps, multi_ind,
@@ -414,9 +414,9 @@
         is running on
     """
 
-    distro, release, did = platform.linux_distribution()
-    # Note: platform.linux_distribution is deprecated. Once it is removed,
-    # the ld module can be used instead
+    distro = distribution.name()
+    release = distribution.version()
+    did = distribution.codename()
 
     if (distro is None) or (distro == ""):
         return [False]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-dock-applet-0.88/src/docked_app.in 
new/mate-dock-applet-20.04.0/src/docked_app.in
--- old/mate-dock-applet-0.88/src/docked_app.in 2019-01-27 08:26:29.000000000 
+0100
+++ new/mate-dock-applet-20.04.0/src/docked_app.in      2020-02-14 
00:49:40.000000000 +0100
@@ -110,17 +110,23 @@
     rowstride = pixbuf.props.rowstride
     height = pixbuf.props.height
 
+    num_channels = pixbuf.get_n_channels()
+    has_alpha = pixbuf.get_has_alpha()
+
     img = pixbuf.get_pixels()
     r_total = g_total = b_total = 0
     total = 0.0
 
     for w_count in range(width):
         for h_count in range(height):
-            pix_index = (h_count * rowstride + w_count * 4)
+            pix_index = (h_count * rowstride + w_count * num_channels)
             pix_r = img[pix_index]
             pix_g = img[pix_index + 1]
             pix_b = img[pix_index + 2]
-            pix_a = img[pix_index + 3]
+            if has_alpha:
+                pix_a = img[pix_index + 3]
+            else:
+                pix_a = 255
 
             saturation = float(max(pix_r, max(pix_g, pix_b)) - min(pix_r, 
min(pix_g, pix_b))) / 255.0
             relevance = .1 + .9 * (float(pix_a) / 255) * saturation


Reply via email to