Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-laptop/batti/files: batti-0.3.8-upower-0.99.patch
Date: Sat, 31 May 2014 18:06:25
Message-Id: 20140531180622.2D0702004E@flycatcher.gentoo.org
1 pacho 14/05/31 18:06:22
2
3 Added: batti-0.3.8-upower-0.99.patch
4 Log:
5 Use patch from ArchLinux to support upower-0.99 (x11-misc/cbatticon is another alternative to this package that has dead upstream since 2011)
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
8
9 Revision Changes Path
10 1.1 app-laptop/batti/files/batti-0.3.8-upower-0.99.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch?rev=1.1&content-type=text/plain
14
15 Index: batti-0.3.8-upower-0.99.patch
16 ===================================================================
17 diff -Naur batti-0.3.8.orig/src/PowerBackend.py batti-0.3.8/src/PowerBackend.py
18 --- batti-0.3.8.orig/src/PowerBackend.py 2014-04-15 19:30:34.123260000 +0200
19 +++ batti-0.3.8/src/PowerBackend.py 2014-04-15 19:32:11.859168509 +0200
20 @@ -180,17 +180,6 @@
21
22 properties = dbus.Interface(iface, 'org.freedesktop.DBus.Properties')
23
24 - if properties.Get(self.dbus_interface, 'CanSuspend'):
25 - self.__can_suspend = True
26 - else:
27 - self.__can_suspend = False
28 -
29 - if properties.Get(self.dbus_interface, 'CanHibernate'):
30 - self.__can_hibernate = True
31 - else:
32 - self.__can_hibernate = False
33 -
34 -
35 def __get_interface(self):
36 dkit_obj = self.__bus.get_object(self.dbus_service, self.dbus_object)
37 return dbus.Interface(dkit_obj, self.dbus_interface)
38 @@ -201,12 +190,6 @@
39 self.__mc_action(widget, event, data)
40
41
42 - def can_suspend(self):
43 - return self.__can_suspend and self.__get_interface().SuspendAllowed()
44 -
45 - def can_hibernate(self):
46 - return self.__can_hibernate and self.__get_interface().HibernateAllowed()
47 -
48 def suspend(self):
49 self.__get_interface().Suspend()