From 1056c333e15adee4bce0678b8de1c52b7ed57bcc1ba508674bab95fc44c195cc Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 22 Jan 2013 09:15:46 +0000 Subject: [PATCH] Accepting request 149495 from home:Zaitor:branches:GNOME:Factory Add patches from upstream git, fixes 2 minor bugs. Wanted for 12.3 OBS-URL: https://build.opensuse.org/request/show/149495 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=138 --- g-s-honor-lock-delay-GSettings.patch | 41 ++++++++++++++++++++++++++++ g-s-use-the-right-getter.patch | 26 ++++++++++++++++++ gnome-shell.changes | 13 +++++++++ gnome-shell.spec | 6 ++++ 4 files changed, 86 insertions(+) create mode 100644 g-s-honor-lock-delay-GSettings.patch create mode 100644 g-s-use-the-right-getter.patch diff --git a/g-s-honor-lock-delay-GSettings.patch b/g-s-honor-lock-delay-GSettings.patch new file mode 100644 index 0000000..9d3817c --- /dev/null +++ b/g-s-honor-lock-delay-GSettings.patch @@ -0,0 +1,41 @@ +From db1aea210969e3c9558dd672620d8df2ebab0a4b Mon Sep 17 00:00:00 2001 +From: Giovanni Campagna +Date: Tue, 25 Dec 2012 00:13:52 +0000 +Subject: ScreenShield: honor lock-delay GSettings key + +org.gnome.desktop.screensaver.lock-delay contains the grace period +of the screensaver: if deactivated within that many seconds from the +start of the idle period, the shell should not prompt for a password. +This setting correspond to the "Lock screen after" combo in screen +and privacy panels. + +https://bugzilla.gnome.org/show_bug.cgi?id=690766 +--- +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 988e191..94fc2b5 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -26,6 +26,7 @@ const Util = imports.misc.util; + + const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver'; + const LOCK_ENABLED_KEY = 'lock-enabled'; ++const LOCK_DELAY_KEY = 'lock-delay'; + + const CURTAIN_SLIDE_TIME = 0.3; + // fraction of screen height the arrow must reach before completing +@@ -582,7 +583,11 @@ const ScreenShield = new Lang.Class({ + let lightboxWasShown = this._lightbox.shown; + this._lightbox.hide(); + +- let shouldLock = lightboxWasShown && this._settings.get_boolean(LOCK_ENABLED_KEY); ++ // GLib.get_monotonic_time() returns microseconds, convert to seconds ++ let elapsedTime = (GLib.get_monotonic_time() - this._activationTime) / 1000000; ++ let shouldLock = lightboxWasShown && ++ this._settings.get_boolean(LOCK_ENABLED_KEY) && ++ (elapsedTime >= this._settings.get_boolean(LOCK_DELAY_KEY)); + if (shouldLock || this._isLocked) { + this.lock(false); + } else if (this._isActive) { +-- +cgit v0.9.0.2 + diff --git a/g-s-use-the-right-getter.patch b/g-s-use-the-right-getter.patch new file mode 100644 index 0000000..0f872e9 --- /dev/null +++ b/g-s-use-the-right-getter.patch @@ -0,0 +1,26 @@ +From d339d2db09052b42960250ab713cc4f885f1155f Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sat, 05 Jan 2013 03:00:06 +0000 +Subject: Use the right getter + +org.gnome.desktop.screensaver lock-delay is an integer, not +a boolean, so don't use get_bool() on it. + +https://bugzilla.gnome.org/show_bug.cgi?id=691170 +--- +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 94fc2b5..d2754df 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -587,7 +587,7 @@ const ScreenShield = new Lang.Class({ + let elapsedTime = (GLib.get_monotonic_time() - this._activationTime) / 1000000; + let shouldLock = lightboxWasShown && + this._settings.get_boolean(LOCK_ENABLED_KEY) && +- (elapsedTime >= this._settings.get_boolean(LOCK_DELAY_KEY)); ++ (elapsedTime >= this._settings.get_int(LOCK_DELAY_KEY)); + if (shouldLock || this._isLocked) { + this.lock(false); + } else if (this._isActive) { +-- +cgit v0.9.0.2 + diff --git a/gnome-shell.changes b/gnome-shell.changes index fbca5b9..ba60d4b 100644 --- a/gnome-shell.changes +++ b/gnome-shell.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jan 21 23:03:02 UTC 2013 - zaitor@opensuse.org + +- Add g-s-honor-lock-delay-GSettings.patch, + org.gnome.desktop.screensaver.lock-delay contains the grace + period of the screensaver: if deactivated within that many + seconds from the start of the idle period, the shell should not + prompt for a password. This setting correspond to the "Lock + screen after" combo in screen and privacy panels. (bgo#690766). +- Add g-s-use-the-right-getter.patch, org.gnome.desktop.screensaver + lock-delay is an integer, so don't use get_bool() on it. + (bgo#691170). + ------------------------------------------------------------------- Tue Jan 15 20:06:04 UTC 2013 - mike.catanzaro@gmail.com diff --git a/gnome-shell.spec b/gnome-shell.spec index 92471f1..bd4b3a8 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -26,6 +26,10 @@ Url: http://live.gnome.org/GnomeShell Source: http://download.gnome.org/sources/gnome-shell/3.6/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM gnome-shell-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- create private connections if the user is not authorized Patch1: gnome-shell-private-connection.patch +# PATCH-FIX-UPSTREAM g-s-honor-lock-delay-GSettings.patch bgo#690766 zaitor@opensuse.org -- This setting correspond to the "Lock screen after" combo in screen and privacy panels. +Patch2: g-s-honor-lock-delay-GSettings.patch +# PATCH-FIX-UPSTREAM g-s-use-the-right-getter.patch bgo#691170 zaitor@opensuse.org -- org.gnome.desktop.screensaver lock-delay is an integer, not a boolean, so don't use get_bool() on it. +Patch3: g-s-use-the-right-getter.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: intltool BuildRequires: translation-update-upstream @@ -130,6 +134,8 @@ to enable, disable and install them. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 translation-update-upstream %build