Hello community,

here is the log from the commit of package cinnamon-screensaver for 
openSUSE:Factory checked in at 2017-06-26 15:56:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-screensaver (Old)
 and      /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cinnamon-screensaver"

Mon Jun 26 15:56:51 2017 rev:9 rq:506202 version:3.4.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/cinnamon-screensaver/cinnamon-screensaver.changes    
    2017-05-27 13:14:50.921332639 +0200
+++ 
/work/SRC/openSUSE:Factory/.cinnamon-screensaver.new/cinnamon-screensaver.changes
   2017-06-26 15:56:52.728609957 +0200
@@ -1,0 +2,33 @@
+Mon Jun 26 08:54:15 UTC 2017 - [email protected]
+
+- Add the missing python3-xapp dependency (boo#1045920).
+
+-------------------------------------------------------------------
+Wed Jun 21 16:11:48 UTC 2017 - [email protected]
+
+- Update to version 3.4.1:
+  * stage.py: Kill any screensaver plugins when destroying all of
+    the widgets - this will leave unfinished plugin processes.
+  * framedImage: Render images at their native size using the theme
+    value as the maximum size, rather than desired size.
+    This ensures the image displays at its best possible size for
+    quality, but still makes sure an oversize image doesn't break
+    anything.
+  * stage.py: Don't re-allocate the floating widgets unless
+    necessary to prevent obscuring of the unlock widget.
+    This prevents the small jump of the clock when waking the
+    computer, depending on settings.
+  * framedImage: Remove some dead lines, use the correct css
+    property, update commenting.
+  * Fix a typo in the GTK+ 3.20 CSS file.
+  * clock: Update to use new wall-clock api to set the correct
+    update interval depending on the provided date/time format.
+  * Don't lock the screen in live or guest sessions
+  * framedImage.py: Stop using CSS for image size - since we now
+    use the image's native size if it is reasonable to do so,
+    there's no need for a theme to be involved.
+    Just hardcode a sane maximum and keep images that size or less.
+    It is not valid CSS (even though that's what we're using
+    min-height for here).
+
+-------------------------------------------------------------------

Old:
----
  cinnamon-screensaver-3.4.0.tar.gz

New:
----
  cinnamon-screensaver-3.4.1.tar.gz

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

Other differences:
------------------
++++++ cinnamon-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.FbwFw1/_old  2017-06-26 15:56:53.272533245 +0200
+++ /var/tmp/diff_new_pack.FbwFw1/_new  2017-06-26 15:56:53.276532680 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           cinnamon-screensaver
-Version:        3.4.0
+Version:        3.4.1
 Release:        0
 Summary:        Cinnamon screensaver and locker
 License:        GPL-2.0+
@@ -51,6 +51,7 @@
 Requires:       python3-gobject
 Requires:       python3-gobject-cairo
 Requires:       python3-setproctitle
+Requires:       python3-xapp
 Recommends:     cinnamon-translations
 Recommends:     xscreensaver-data
 Suggests:       xscreensaver-data-extra

++++++ cinnamon-screensaver-3.4.0.tar.gz -> cinnamon-screensaver-3.4.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/configure.ac 
new/cinnamon-screensaver-3.4.1/configure.ac
--- old/cinnamon-screensaver-3.4.0/configure.ac 2017-05-04 15:02:52.000000000 
+0200
+++ new/cinnamon-screensaver-3.4.1/configure.ac 2017-06-20 15:40:52.000000000 
+0200
@@ -2,7 +2,7 @@
 
 AC_PREREQ(2.60)
 AC_INIT([cinnamon-screensaver],
-        [3.4.0],
+        [3.4.1],
         [https://github.com/linuxmint/cinnamon-screensaver/issues])
 
 PKG_PROG_PKG_CONFIG([0.26])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/debian/changelog 
new/cinnamon-screensaver-3.4.1/debian/changelog
--- old/cinnamon-screensaver-3.4.0/debian/changelog     2017-05-04 
15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/debian/changelog     2017-06-20 
15:40:52.000000000 +0200
@@ -1,3 +1,24 @@
+cinnamon-screensaver (3.4.1) sonya; urgency=medium
+
+  [ Michael Webster ]
+  * stage.py: Kill any screensaver plugins when destroying all of the widgets 
- this will leave unfinished plugin processes.
+  * framedImage: render images at their native size using the theme value as 
the maximum size, rather than desired size.  This ensures the image displays at 
its best possible size for quality, but still makes sure an oversize image 
doesn't break anything.
+  * stage.py: Don't re-allocate the floating widgets unless necessary to 
prevent obscuring of the unlock widget.  This prevents the small jump of the 
clock when waking the computer, depending on settings.
+  * framedImage: Remove some dead lines, use the correct css property, update 
commenting.
+  * fix typo in 3.20 css file
+  * clock: Update to use new wall-clock api to set the correct update interval 
depending on the provided date/time format.
+
+  [ Clement Lefebvre ]
+  * Don't lock the screen in live or guest sessions
+
+  [ Michael Webster ]
+  * framedImage.py: Stop using CSS for image size - since we now use the 
image's native size if it is reasonable to do so, there's no need for a theme 
to be involved.  Just hardcode a sane maximum and keep images that size or 
less. is not valid CSS (even though that's what we're using min-height for here)
+
+  [ leigh123linux ]
+  * remove old webkit2-3.0 support
+
+ -- Clement Lefebvre <[email protected]>  Tue, 20 Jun 2017 15:39:58 +0200
+
 cinnamon-screensaver (3.4.0) sonya; urgency=medium
 
   [ leigh123linux ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/debian/control 
new/cinnamon-screensaver-3.4.1/debian/control
--- old/cinnamon-screensaver-3.4.0/debian/control       2017-05-04 
15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/debian/control       2017-06-20 
15:40:52.000000000 +0200
@@ -30,6 +30,7 @@
          python3-gi,
          python3-gi-cairo,
          python3-setproctitle,
+         python3-xapp (>= 1.0.1),
          gir1.2-cinnamondesktop-3.0,
          gir1.2-gkbd-3.0,
          gir1.2-glib-2.0,
@@ -67,7 +68,7 @@
 Architecture: all
 Pre-Depends: ${misc:Pre-Depends}
 Depends: cinnamon-screensaver (>= 3.1.0),
-         gir1.2-webkit2-4.0 | gir1.2-webkit2-3.0
+         gir1.2-webkit2-4.0
 Description: Webkit plugin for cinnamon-screensaver
 
 Package: libcscreensaver0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.4.0/screensavers/[email protected]/main 
new/cinnamon-screensaver-3.4.1/screensavers/[email protected]/main
--- old/cinnamon-screensaver-3.4.0/screensavers/[email protected]/main        
2017-05-04 15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/screensavers/[email protected]/main        
2017-06-20 15:40:52.000000000 +0200
@@ -2,11 +2,8 @@
 
 import gi
 gi.require_version('Gtk', '3.0')
+gi.require_version('WebKit2', '4.0')
 
-try:
-    gi.require_version('WebKit2', '4.0')
-except ValueError:
-    gi.require_version('WebKit2', '3.0')
 
 from gi.repository import Gtk, Gdk, GdkX11, WebKit2, Gio, GLib
 import sys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.14.css 
new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.14.css
--- old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.14.css 
2017-05-04 15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.14.css 
2017-06-20 15:40:52.000000000 +0200
@@ -22,8 +22,6 @@
     border: 2px solid;
     border-color: #eeeeee;
     box-shadow: 1px 1px alpha(black, 0.8);
-    /* substitute for min-height - replace with min-height in Gtk 3.20+*/
-    color: rgba(250, 0, 0, 0);
 }
 
 .csstage .toppanel {
@@ -77,12 +75,10 @@
     border-radius: 4px;
     border: 4px solid;
     border-color: @theme_selected_bg_color;
-    /* substitute for min-height - replace with min-height in Gtk 3.20+*/
-    color: rgba(150, 0, 0, 0);
 }
 
 .csstage .albumart {
-    color: rgba(300, 0, 0, 0);
+    color: rgba(320, 0, 0, 0);
 }
 
 .csstage .passwordentry {
@@ -211,4 +207,4 @@
 .csstage GtkViewport {
     background-color: transparent;
     background-image: none;
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.18.css 
new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.18.css
--- old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.18.css 
2017-05-04 15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.18.css 
2017-06-20 15:40:52.000000000 +0200
@@ -22,8 +22,6 @@
     border: 2px solid;
     border-color: #eeeeee;
     box-shadow: 1px 1px alpha(black, 0.8);
-    /* substitute for min-height - replace with min-height in Gtk 3.20+*/
-    color: rgba(250, 0, 0, 0);
 }
 
 .csstage .toppanel {
@@ -77,12 +75,9 @@
     border-radius: 4px;
     border: 4px solid;
     border-color: @theme_selected_bg_color;
-    /* substitute for min-height - replace with min-height in Gtk 3.20+*/
-    color: rgba(150, 0, 0, 0);
 }
 
 .csstage .albumart {
-    color: rgba(300, 0, 0, 0);
 }
 
 .csstage .passwordentry {
@@ -211,4 +206,4 @@
 .csstage GtkViewport {
     background-color: transparent;
     background-image: none;
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.20.css 
new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.20.css
--- old/cinnamon-screensaver-3.4.0/src/cinnamon-screensaver-gtk3.20.css 
2017-05-04 15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/cinnamon-screensaver-gtk3.20.css 
2017-06-20 15:40:52.000000000 +0200
@@ -60,7 +60,6 @@
     background-clip: border-box;
     border-color: @theme_selected_bg_color;
     box-shadow: 1px 1px alpha(black, 0.8);
-    min-height: 150px;
 }
 
 .csstage .passwordentry {
@@ -192,4 +191,4 @@
 .csstage GtkViewport {
     background-color: transparent;
     background-image: none;
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/src/clock.py 
new/cinnamon-screensaver-3.4.1/src/clock.py
--- old/cinnamon-screensaver-3.4.0/src/clock.py 2017-05-04 15:02:52.000000000 
+0200
+++ new/cinnamon-screensaver-3.4.1/src/clock.py 2017-06-20 15:40:52.000000000 
+0200
@@ -1,6 +1,6 @@
 #!/usr/bin/python3
 
-from gi.repository import CinnamonDesktop, GLib, Gtk, Gio
+from gi.repository import CinnamonDesktop, CDesktopEnums, GLib, Gtk, Gio
 
 from util import utils, trackers, settings
 from baseWindow import BaseWindow
@@ -33,6 +33,7 @@
         self.add(self.label)
 
         self.clock_tracker = CinnamonDesktop.WallClock()
+        self.set_clock_interval()
 
         trackers.con_tracker_get().connect(self.clock_tracker,
                                            "notify::clock",
@@ -45,8 +46,33 @@
                                            "changed",
                                            self.on_tz_changed)
 
+        trackers.con_tracker_get().connect(self,
+                                           "destroy",
+                                           self.on_destroy)
+
         self.update_clock()
 
+    def set_clock_interval(self):
+        interval = CDesktopEnums.ClockInterval.SETTING
+
+        if settings.get_use_custom_format():
+            date_format = settings.get_custom_date_format()
+            time_format = settings.get_custom_time_format()
+
+            use_seconds = False
+
+            for token in ("%S", "%c", "%T", "%X"):
+                if token in date_format or token in time_format:
+                    use_seconds = True
+                    break
+
+            if use_seconds:
+                interval = CDesktopEnums.ClockInterval.SECOND
+            else:
+                interval = CDesktopEnums.ClockInterval.MINUTE
+
+        self.clock_tracker.set_update_interval(interval)
+
     def on_clock_changed(self, clock, pspec):
         self.update_clock()
 
@@ -100,5 +126,19 @@
         self.away_message = msg
         self.update_clock()
 
+    def on_destroy(self, data=None):
+        trackers.con_tracker_get().disconnect(self.clock_tracker,
+                                              "notify::clock",
+                                              self.on_clock_changed)
+
+        trackers.con_tracker_get().disconnect(self.tz_monitor,
+                                              "changed",
+                                              self.on_tz_changed)
+
+        trackers.con_tracker_get().disconnect(self,
+                                              "destroy",
+                                              self.on_destroy)
 
+        self.clock_tracker = None
+        self.tz_monitor = None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/src/stage.py 
new/cinnamon-screensaver-3.4.1/src/stage.py
--- old/cinnamon-screensaver-3.4.0/src/stage.py 2017-05-04 15:02:52.000000000 
+0200
+++ new/cinnamon-screensaver-3.4.1/src/stage.py 2017-06-20 15:40:52.000000000 
+0200
@@ -707,6 +707,7 @@
         Destroy all MonitorViews
         """
         for monitor in self.monitors:
+            monitor.kill_plugin()
             monitor.destroy()
             del monitor
 
@@ -854,7 +855,13 @@
                 the left-center.  The albumart widget aligns right-center.
                 """
                 unlock_mw, unlock_nw = self.unlock_dialog.get_preferred_width()
-                region_w = (monitor_rect.width - unlock_nw) / 2
+                """
+                If, for whatever reason, we need more than 1/3 of the screen 
to fully display
+                the unlock dialog, reduce our available region width to 
accomodate it, reducing
+                the allocation for the floating widgets as required.
+                """
+                if (unlock_nw > region_w):
+                    region_w = (monitor_rect.width - unlock_nw) / 2
 
                 if isinstance(child, ClockWidget):
                     child.set_halign(Gtk.Align.START)
@@ -885,7 +892,7 @@
                             ca = ALIGNMENTS[random.randint(0, 2)]
                         child.set_valign(ca)
 
-            # Restrict the widget size to 1/3 width and height of the current 
monitor
+            # Restrict the widget size to the allowable region sizes if 
necessary.
             allocation.width = min(nat_rect.width, region_w)
             allocation.height = min(nat_rect.height, region_h)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/src/unlock.py 
new/cinnamon-screensaver-3.4.1/src/unlock.py
--- old/cinnamon-screensaver-3.4.0/src/unlock.py        2017-05-04 
15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/unlock.py        2017-06-20 
15:40:52.000000000 +0200
@@ -42,7 +42,6 @@
 
         self.set_halign(Gtk.Align.CENTER)
         self.set_valign(Gtk.Align.CENTER)
-        self.set_size_request(350, -1)
 
         self.real_name = None
         self.user_name = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.4.0/src/util/utils.py 
new/cinnamon-screensaver-3.4.1/src/util/utils.py
--- old/cinnamon-screensaver-3.4.0/src/util/utils.py    2017-05-04 
15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/util/utils.py    2017-06-20 
15:40:52.000000000 +0200
@@ -4,6 +4,7 @@
 import os
 import grp
 import subprocess
+import xapp.os
 
 import config
 import status
@@ -68,6 +69,10 @@
     except KeyError:
         pass
 
+    # Don't lock the screensaver in guest or live sessions
+    if xapp.os.is_live_session() or xapp.os.is_guest_session():
+        return False
+
     return True
 
 def process_is_running(name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.4.0/src/widgets/framedImage.py 
new/cinnamon-screensaver-3.4.1/src/widgets/framedImage.py
--- old/cinnamon-screensaver-3.4.0/src/widgets/framedImage.py   2017-05-04 
15:02:52.000000000 +0200
+++ new/cinnamon-screensaver-3.4.1/src/widgets/framedImage.py   2017-06-20 
15:40:52.000000000 +0200
@@ -8,10 +8,12 @@
 
 from util import utils, trackers
 
+MAX_IMAGE_SIZE = 320
+
 class FramedImage(Gtk.Image):
     """
-    Widget to hold the user face image.  It can be sized using CSS color.red 
value
-    (up to 255px) in Gtk 3.18, and using the min-height style property in gtk 
3.20+.
+    Widget to hold the user face image.  It attempts to display an image at
+    its native size, up to a max sane size.
     """
     __gsignals__ = {
         "pixbuf-changed": (GObject.SignalFlags.RUN_LAST, None, (object,))
@@ -24,24 +26,9 @@
 
         self.file = None
         self.path = None
-        self.loader = None
-
-        self.current_pixbuf = None
-        self.next_pixbuf = None
-
-        self.min_height = 50
 
         trackers.con_tracker_get().connect(self, "realize", self.on_realized)
 
-    def get_theme_height(self):
-        ctx = self.get_style_context()
-
-        if utils.have_gtk_version("3.20.0"):
-            return ctx.get_property("min-height", Gtk.StateFlags.NORMAL)
-        else:
-            color = ctx.get_color(Gtk.StateFlags.NORMAL)
-            return (color.red * 255) + (color.green * 255) + (color.blue * 255)
-
     def on_realized(self, widget):
         self.generate_image()
 
@@ -63,17 +50,34 @@
         if self.get_realized():
             self.generate_image()
 
-    def generate_image(self):
-        self.set_size_request(-1, self.get_theme_height())
+    def set_image_internal(self, path):
+        pixbuf = None
 
-        if self.path:
-            try:
-                pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(self.path, 
-1, self.get_theme_height(), True)
-                self.set_from_pixbuf(pixbuf)
-            except:
-                self.clear_image()
-            self.emit("pixbuf-changed", pixbuf)
+        try:
+            pixbuf = GdkPixbuf.Pixbuf.new_from_file(path)
+        except GLib.Error as e:
+            message = "Could not load pixbuf from '%s' for FramedImage: %s" % 
(path, e.message)
+            error = True
 
+        if pixbuf != None:
+            if pixbuf.get_height() > MAX_IMAGE_SIZE or pixbuf.get_width() > 
MAX_IMAGE_SIZE:
+                try:
+                    pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(path, 
MAX_IMAGE_SIZE, MAX_IMAGE_SIZE)
+                except GLib.Error as e:
+                    message = "Could not scale pixbuf from '%s' for 
FramedImage: %s" % (path, e.message)
+                    error = True
+
+        if pixbuf:
+            self.set_from_pixbuf(pixbuf)
+        else:
+            print(message)
+            self.clear_image()
+
+        self.emit("pixbuf-changed", pixbuf)
+
+    def generate_image(self):
+        if self.path:
+            self.set_image_internal(self.path)
         elif self.file:
             if self.cancellable != None:
                 self.cancellable.cancel()
@@ -103,11 +107,6 @@
     def on_file_written(self, file, result, data=None):
         try:
             if file.replace_contents_finish(result):
-                try:
-                    pixbuf = 
GdkPixbuf.Pixbuf.new_from_file_at_scale(file.get_path(), -1, 
self.get_theme_height(), True)
-                    self.set_from_pixbuf(pixbuf)
-                except:
-                    self.clear_image()
-                self.emit("pixbuf-changed", pixbuf)
+                self.set_image_internal(file.get_path())
         except GLib.Error:
-            pass
\ No newline at end of file
+            pass


Reply via email to