~ubuntu-branches/ubuntu/natty/gnome-do-plugins/natty

« back to all changes in this revision

Viewing changes to debian/patches/02_gnomesession_lock_screen.patch

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2010-02-07 18:09:35 UTC
  • mfrom: (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100207180935-tcl08qwq8dpgcy4m
Tags: 0.8.2.1+dfsg-2ubuntu1
* Merge from Debian unstable for -cil-dev transition fixes.  Remaining Ubuntu
  changes:
  + debian/patches/02_gnomesession_lock_screen.dpatch:
    - Lock screen prior to suspending or hibernating (LP: #460303)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 02_gnomesession_lock_screen.dpatch by  <hyperair@ubuntu.com>
 
3
##
 
4
## DP: The GNOME-Session plugin now uses Devkit-Power instead of GNOME Power
 
5
## DP: Manager, if it exists, but Devkit-Power does not handle locking of the
 
6
## DP: screen, so we have to manually lock the screen prior to calling
 
7
## DP:  DevKit-Power.
 
8
 
 
9
@DPATCH@
 
10
diff -urNad gnome-do-plugins-0.8.2.1+dfsg~/GNOME-Session/src/PowerManagement.cs gnome-do-plugins-0.8.2.1+dfsg/GNOME-Session/src/PowerManagement.cs
 
11
--- gnome-do-plugins-0.8.2.1+dfsg~/GNOME-Session/src/PowerManagement.cs 2009-10-13 05:29:48.000000000 +0800
 
12
+++ gnome-do-plugins-0.8.2.1+dfsg/GNOME-Session/src/PowerManagement.cs  2009-10-25 17:41:41.375708963 +0800
 
13
@@ -81,9 +81,10 @@
 
14
                {
 
15
                        try {
 
16
                                object instance = BusInstance;
 
17
-                               if (instance is IDeviceKitPower)
 
18
+                               if (instance is IDeviceKitPower) {
 
19
+                    ScreenSaver.Lock ();
 
20
                                        (instance as IDeviceKitPower).Hibernate ();
 
21
-                               else if (instance is IPowerManagement)
 
22
+                               } else if (instance is IPowerManagement)
 
23
                                        (instance as IPowerManagement).Hibernate ();
 
24
                        } catch (Exception e) {
 
25
                                Log<PowerManagement>.Error ("Could not hibernate: {0}", e.Message);
 
26
@@ -95,9 +96,10 @@
 
27
                {
 
28
                        try {
 
29
                                object instance = BusInstance;
 
30
-                               if (instance is IDeviceKitPower)
 
31
+                               if (instance is IDeviceKitPower) {
 
32
+                    ScreenSaver.Lock ();
 
33
                                        (instance as IDeviceKitPower).Suspend ();
 
34
-                               else if (instance is IPowerManagement)
 
35
+                } else if (instance is IPowerManagement)
 
36
                                        (instance as IPowerManagement).Suspend ();
 
37
                        } catch (Exception e) {
 
38
                                Log<PowerManagement>.Error ("Could not suspend: {0}", e.Message);