diff --git a/0001-Add-interactive-debug-startup-switch.-This-turns-on-.patch b/0001-Add-interactive-debug-startup-switch.-This-turns-on-.patch deleted file mode 100644 index 7807744..0000000 --- a/0001-Add-interactive-debug-startup-switch.-This-turns-on-.patch +++ /dev/null @@ -1,219 +0,0 @@ -From 2b96fb31c8f1a00e2309fe6f7d6f31a2da5b0639 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Sun, 8 Jan 2017 23:33:03 -0500 -Subject: [PATCH 1/4] Add --interactive-debug startup switch. This turns on - GtkInspector, restricts the screensaver stage to a single monitor, and some - other things to allow interaction with ui elements using the inspector tools. - ---- - src/cinnamon-screensaver-gtk3.20.css | 8 ++++-- - src/cinnamon-screensaver-main.py | 3 ++ - src/stage.py | 54 +++++++++++++++++++++++++++--------- - src/status.py | 7 ++++- - src/util/utils.py | 17 +++++++----- - 5 files changed, 65 insertions(+), 24 deletions(-) - -diff --git a/src/cinnamon-screensaver-gtk3.20.css b/src/cinnamon-screensaver-gtk3.20.css -index cd56570..f3c22ae 100644 ---- a/src/cinnamon-screensaver-gtk3.20.css -+++ b/src/cinnamon-screensaver-gtk3.20.css -@@ -64,7 +64,7 @@ - } - - .csstage .passwordentry { -- font-size: 11px; -+ font-size: 15px; - box-shadow: none; - border-color: alpha(white, .2); - border-style: solid; -@@ -72,6 +72,8 @@ - background-image: none; - background-color: transparent; - border-width: 1px; -+ padding: 0 0 0 5px; -+ box-shadow: none; - } - - .csstage .passwordentry.progressbar { -@@ -86,8 +88,8 @@ - background-color: transparent; - } - --.csstage .passwordentry.image.left { -- padding: 0 10px 0 0; -+.csstage .passwordentry image.left { -+ padding-right: 10px; - } - - .csstage .transparentbutton { -diff --git a/src/cinnamon-screensaver-main.py b/src/cinnamon-screensaver-main.py -index a6df413..e56a9c0 100755 ---- a/src/cinnamon-screensaver-main.py -+++ b/src/cinnamon-screensaver-main.py -@@ -31,6 +31,8 @@ class Main: - parser = argparse.ArgumentParser(description='Cinnamon Screensaver') - parser.add_argument('--debug', dest='debug', action='store_true', - help='Print out some extra debugging info') -+ parser.add_argument('--interactive-debug', dest='interactive', action='store_true', -+ help='If multiple monitors are in use, only cover one monitor, and launch GtkInspector') - parser.add_argument('--disable-locking', dest='lock_disabled', action='store_true', - help='Disable the lock screen') - parser.add_argument('--version', dest='version', action='store_true', -@@ -45,6 +47,7 @@ class Main: - - status.LockEnabled = not args.lock_disabled - status.Debug = args.debug -+ status.InteractiveDebug = args.interactive - - if args.lock_disabled: - print("Locking disabled") -diff --git a/src/stage.py b/src/stage.py -index 560b9b3..fba0aa1 100644 ---- a/src/stage.py -+++ b/src/stage.py -@@ -32,10 +32,16 @@ class Stage(Gtk.Window): - ScreensaverManager. - """ - def __init__(self, screen, manager, away_message): -- Gtk.Window.__init__(self, -- type=Gtk.WindowType.POPUP, -- decorated=False, -- skip_taskbar_hint=True) -+ if status.InteractiveDebug: -+ Gtk.Window.__init__(self, -+ type=Gtk.WindowType.TOPLEVEL, -+ decorated=True, -+ skip_taskbar_hint=False) -+ else: -+ Gtk.Window.__init__(self, -+ type=Gtk.WindowType.POPUP, -+ decorated=False, -+ skip_taskbar_hint=True) - - self.get_style_context().add_class("csstage") - -@@ -116,6 +122,9 @@ class Stage(Gtk.Window): - "grab-broken-event", - self.on_grab_broken_event) - -+ if status.InteractiveDebug: -+ self.set_interactive_debugging(True) -+ - def on_screen_changed(self, screen, data=None): - self.update_geometry() - self.size_to_screen() -@@ -245,9 +254,15 @@ class Stage(Gtk.Window): - """ - self.monitors = [] - -- n = self.screen.get_n_monitors() -+ if status.InteractiveDebug: -+ monitors = (self.screen.get_primary_monitor(),) -+ else: -+ n = self.screen.get_n_monitors() -+ monitors = () -+ for i in range(n): -+ monitors += (i,) - -- for index in range(n): -+ for index in monitors: - monitor = MonitorView(self.screen, index) - - image = Gtk.Image() -@@ -415,7 +430,7 @@ class Stage(Gtk.Window): - """ - Start or stop the dialog timer - """ -- if active: -+ if active and not status.InteractiveDebug: - trackers.timer_tracker_get().start("wake-timeout", - c.UNLOCK_TIMEOUT * 1000, - self.on_wake_timeout) -@@ -620,13 +635,26 @@ class Stage(Gtk.Window): - def update_geometry(self): - """ - Override BaseWindow.update_geometry() - the Stage should always be the -- GdkScreen size -+ GdkScreen size, unless status.InteractiveDebug is True - """ -- self.rect = Gdk.Rectangle() -- self.rect.x = 0 -- self.rect.y = 0 -- self.rect.width = self.screen.get_width() -- self.rect.height = self.screen.get_height() -+ -+ if status.InteractiveDebug: -+ # Gdk 3.22 introduces GdkMonitor objects, and GdkScreen-reported -+ # monitor info is no-longer reliable -+ -+ if utils.have_gtk_version("3.22.0"): -+ monitor = Gdk.Display.get_default().get_primary_monitor() -+ self.rect = monitor.get_geometry() -+ else: -+ monitor_n = self.screen.get_primary_monitor() -+ self.rect = self.screen.get_monitor_geometry(monitor_n) -+ else: -+ self.rect = Gdk.Rectangle() -+ -+ self.rect.x = 0 -+ self.rect.y = 0 -+ self.rect.width = self.screen.get_width() -+ self.rect.height = self.screen.get_height() - - hints = Gdk.Geometry() - hints.min_width = self.rect.width -diff --git a/src/status.py b/src/status.py -index 015ee4f..cf54ab9 100644 ---- a/src/status.py -+++ b/src/status.py -@@ -12,10 +12,15 @@ focusWidgets = [] - # You get all sorts of artifacts trying to draw widgets over the x plugins - PluginRunning = False - --# Set at startup, assisted by cs_init_utils_initialize_locking() -+# Set by command line args -+ - # This is different than the preference that turns off locking - that only prevents idle locking. The - # user can still lock explicitly. The function checks for the existence of correct PAM files, - # as well as adjusting the UID if this process is started as root. - LockEnabled = True - -+# Enables extra PAM/authentication debugging - Debug = False -+ -+# Forces the Stage to only cover a single monitor and launch a GtkInspector window. -+InteractiveDebug = False -diff --git a/src/util/utils.py b/src/util/utils.py -index 3b574b1..e0a644e 100644 ---- a/src/util/utils.py -+++ b/src/util/utils.py -@@ -126,16 +126,19 @@ def override_user_time(window): - def debug_allocation(alloc): - print("x:%d, y:%d, width:%d, height:%d" % (alloc.x, alloc.y, alloc.width, alloc.height)) - --def get_mouse_monitor(): -- manager = Gdk.Display.get_default().get_device_manager() -- pointer = manager.get_client_pointer() -+def get_primary_monitor(): -+ return Gdk.Screen.get_default().get_primary_monitor() - -- screen, x, y = pointer.get_position() -+def get_mouse_monitor(): -+ if status.InteractiveDebug: -+ return get_primary_monitor() -+ else: -+ manager = Gdk.Display.get_default().get_device_manager() -+ pointer = manager.get_client_pointer() - -- return Gdk.Screen.get_default().get_monitor_at_point(x, y) -+ screen, x, y = pointer.get_position() - --def get_primary_monitor(): -- return Gdk.Screen.get_default().get_primary_monitor() -+ return Gdk.Screen.get_default().get_monitor_at_point(x, y) - - def lookup_plugin_path(name): - if name == "": --- -2.9.3 - diff --git a/0002-mediaPlayerWatcher.py-catch-SyntaxError-exception-wh.patch b/0002-mediaPlayerWatcher.py-catch-SyntaxError-exception-wh.patch deleted file mode 100644 index 2f5b7ea..0000000 --- a/0002-mediaPlayerWatcher.py-catch-SyntaxError-exception-wh.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0063d84028ba393ee2ab0b403047699c50b5b9fa Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Mon, 9 Jan 2017 15:06:16 -0500 -Subject: [PATCH 2/4] mediaPlayerWatcher.py: catch SyntaxError exception when - evaluating PlaybackStatus property. - -Fixes #196 ---- - src/dbusdepot/mediaPlayerWatcher.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/dbusdepot/mediaPlayerWatcher.py b/src/dbusdepot/mediaPlayerWatcher.py -index e7ee018..056119a 100644 ---- a/src/dbusdepot/mediaPlayerWatcher.py -+++ b/src/dbusdepot/mediaPlayerWatcher.py -@@ -56,7 +56,7 @@ class MprisClient(BaseClient): - - try: - status = PlaybackStatus(eval("PlaybackStatus." + str_prop)) -- except (ValueError, TypeError): -+ except (ValueError, TypeError, SyntaxError): - pass - - return status --- -2.9.3 - diff --git a/0003-framedImage.py-Just-silently-fail-if-a-downloaded-im.patch b/0003-framedImage.py-Just-silently-fail-if-a-downloaded-im.patch deleted file mode 100644 index 52eea6c..0000000 --- a/0003-framedImage.py-Just-silently-fail-if-a-downloaded-im.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 935cde46aeed5b4865a0494017f7415f46da4a09 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Mon, 9 Jan 2017 15:13:41 -0500 -Subject: [PATCH 3/4] framedImage.py: Just silently fail if a downloaded image - fails to be loaded into a pixbuf. - -see: https://bugzilla.redhat.com/show_bug.cgi?id=1399731 ---- - src/widgets/framedImage.py | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/src/widgets/framedImage.py b/src/widgets/framedImage.py -index ca9010b..433dc04 100644 ---- a/src/widgets/framedImage.py -+++ b/src/widgets/framedImage.py -@@ -67,8 +67,11 @@ class FramedImage(Gtk.Image): - self.set_size_request(-1, self.get_theme_height()) - - if self.path: -- pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(self.path, -1, self.get_theme_height(), True) -- self.set_from_pixbuf(pixbuf) -+ 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) - - elif self.file: -@@ -100,8 +103,11 @@ class FramedImage(Gtk.Image): - def on_file_written(self, file, result, data=None): - try: - if file.replace_contents_finish(result): -- pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(file.get_path(), -1, self.get_theme_height(), True) -- self.set_from_pixbuf(pixbuf) -+ 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) - except GLib.Error: - pass -\ No newline at end of file --- -2.9.3 - diff --git a/0004-some-theme-fixes-for-gtk-3.20.patch b/0004-some-theme-fixes-for-gtk-3.20.patch deleted file mode 100644 index 753e9b6..0000000 --- a/0004-some-theme-fixes-for-gtk-3.20.patch +++ /dev/null @@ -1,91 +0,0 @@ -From df610bfb3e0d4df1e2fefe3831af983733ad3e34 Mon Sep 17 00:00:00 2001 -From: Michael Webster -Date: Mon, 9 Jan 2017 22:46:46 -0500 -Subject: [PATCH 4/4] some theme fixes for gtk 3.20+ - ---- - src/cinnamon-screensaver-gtk3.20.css | 16 +++++++++++----- - src/passwordEntry.py | 5 +++++ - 2 files changed, 16 insertions(+), 5 deletions(-) - -diff --git a/src/cinnamon-screensaver-gtk3.20.css b/src/cinnamon-screensaver-gtk3.20.css -index f3c22ae..a76100e 100644 ---- a/src/cinnamon-screensaver-gtk3.20.css -+++ b/src/cinnamon-screensaver-gtk3.20.css -@@ -44,12 +44,12 @@ - } - - .csstage .auth-message { -- font-size: 12px; -+ font-size: 15px; - color: red; - } - - .csstage .caps-message { -- font-size: 12px; -+ font-size: 15px; - color: orange; - } - -@@ -72,11 +72,10 @@ - background-image: none; - background-color: transparent; - border-width: 1px; -- padding: 0 0 0 5px; - box-shadow: none; - } - --.csstage .passwordentry.progressbar { -+.csstage .passwordentry progress { - margin: 2px; - padding: 0; - border-radius: 0; -@@ -84,7 +83,7 @@ - border-color: alpha(@theme_selected_bg_color, .7); - } - --.csstage .passwordentry.progressbar:focus { -+.csstage .passwordentry progress:focus { - background-color: transparent; - } - -@@ -92,6 +91,13 @@ - padding-right: 10px; - } - -+/* Use :backdrop for alt-text keyboard layout */ -+.csstage .passwordentry:backdrop { -+ font-family: monospace; -+ font-size: 14px; -+ color: @theme_selected_bg_color; -+} -+ - .csstage .transparentbutton { - -gtk-icon-style: requested; - border-color: alpha(white, .2); -diff --git a/src/passwordEntry.py b/src/passwordEntry.py -index 9fb5809..22bb8d1 100644 ---- a/src/passwordEntry.py -+++ b/src/passwordEntry.py -@@ -94,6 +94,9 @@ class PasswordEntry(Gtk.Entry): - name = name.upper() - - ctx = widget.get_style_context() -+ ctx.save() -+ -+ ctx.set_state(Gtk.StateFlags.BACKDROP) - font_size = ctx.get_property("font-size", Gtk.StateFlags.BACKDROP) - family = ctx.get_property("font-family", Gtk.StateFlags.BACKDROP) - cr.select_font_face(family[0], cairo.FONT_WEIGHT_NORMAL, cairo.FONT_SLANT_NORMAL) -@@ -118,6 +121,8 @@ class PasswordEntry(Gtk.Entry): - - cr.show_text(name) - -+ ctx.restore() -+ - return False - - def start_progress(self): --- -2.9.3 - diff --git a/cinnamon-screensaver.spec b/cinnamon-screensaver.spec index c24e0d4..697ddc1 100644 --- a/cinnamon-screensaver.spec +++ b/cinnamon-screensaver.spec @@ -1,14 +1,15 @@ +%global commit 5561f3c4c1373a5c1ca55d91c722d19ce8d4abd7 +%global date 20170124 +%global shortcommit0 %(c=%{commit}; echo ${c:0:7}) + Summary: Cinnamon Screensaver Name: cinnamon-screensaver -Version: 3.2.13 -Release: 2%{?dist} +Version: 3.2.14 +Release: 0.1%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} License: GPLv2+ and LGPLv2+ URL: http://cinnamon.linuxmint.com -Source0: https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: 0001-Add-interactive-debug-startup-switch.-This-turns-on-.patch -Patch1: 0002-mediaPlayerWatcher.py-catch-SyntaxError-exception-wh.patch -Patch2: 0003-framedImage.py-Just-silently-fail-if-a-downloaded-im.patch -Patch3: 0004-some-theme-fixes-for-gtk-3.20.patch +#Source0: https://github.com/linuxmint/%%{name}/archive/%%{version}.tar.gz#/%%{name}-%%{version}.tar.gz +Source0: https://github.com/linuxmint/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit0}.tar.gz BuildRequires: autoconf BuildRequires: automake @@ -63,7 +64,7 @@ you may need to use the Esc key to get the unlock screen. %endif %prep -%autosetup -p1 +%autosetup -p1 -n %{name}-%{commit} NOCONFIGURE=1 ./autogen.sh %build @@ -137,6 +138,9 @@ fi %endif %changelog +* Tue Jan 24 2017 Leigh Scott - 3.2.14-0.1.20170124git5561f3c +- update to git snapshot + * Tue Jan 10 2017 leigh scott - 3.2.13-2 - add some upstream commits (fixes rhbz 1399731) diff --git a/sources b/sources index 44195cf..3419032 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cinnamon-screensaver-3.2.13.tar.gz) = f0c8b533416d5ec9e80f1220a54a8f87839dfd24ac6c00b1b4166c893f0c75519b14f19e9fa91b7c1d71864002d256787d66926042efa9e19b18b7f9f270e8c4 +SHA512 (cinnamon-screensaver-5561f3c.tar.gz) = b33fc0f06cad4cc9d0af0e4cd9b0f6452193a68c9c8ae0c05521dbd26e4949593b2de5525b9c2663e4c858c58d9022f60a2cf498d7c0ff73bc73bb28327d3532