summaryrefslogtreecommitdiff
path: root/app-laptop/batti/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-laptop/batti/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-laptop/batti/files')
-rw-r--r--app-laptop/batti/files/batti-0.3.8-upower-0.99.patch34
-rw-r--r--app-laptop/batti/files/batti-0.3.8-upower-capital.patch32
2 files changed, 66 insertions, 0 deletions
diff --git a/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch
new file mode 100644
index 000000000000..6f313a594c94
--- /dev/null
+++ b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch
@@ -0,0 +1,34 @@
+diff -Naur batti-0.3.8.orig/src/PowerBackend.py batti-0.3.8/src/PowerBackend.py
+--- batti-0.3.8.orig/src/PowerBackend.py 2014-04-15 19:30:34.123260000 +0200
++++ batti-0.3.8/src/PowerBackend.py 2014-04-15 19:32:11.859168509 +0200
+@@ -180,17 +180,6 @@
+
+ properties = dbus.Interface(iface, 'org.freedesktop.DBus.Properties')
+
+- if properties.Get(self.dbus_interface, 'CanSuspend'):
+- self.__can_suspend = True
+- else:
+- self.__can_suspend = False
+-
+- if properties.Get(self.dbus_interface, 'CanHibernate'):
+- self.__can_hibernate = True
+- else:
+- self.__can_hibernate = False
+-
+-
+ def __get_interface(self):
+ dkit_obj = self.__bus.get_object(self.dbus_service, self.dbus_object)
+ return dbus.Interface(dkit_obj, self.dbus_interface)
+@@ -201,12 +190,6 @@
+ self.__mc_action(widget, event, data)
+
+
+- def can_suspend(self):
+- return self.__can_suspend and self.__get_interface().SuspendAllowed()
+-
+- def can_hibernate(self):
+- return self.__can_hibernate and self.__get_interface().HibernateAllowed()
+-
+ def suspend(self):
+ self.__get_interface().Suspend()
+
diff --git a/app-laptop/batti/files/batti-0.3.8-upower-capital.patch b/app-laptop/batti/files/batti-0.3.8-upower-capital.patch
new file mode 100644
index 000000000000..e7f62761661c
--- /dev/null
+++ b/app-laptop/batti/files/batti-0.3.8-upower-capital.patch
@@ -0,0 +1,32 @@
+From 1e0fe57a93ed3996bad295e20eeda81f6af483af Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Wed, 20 Jul 2016 20:14:32 +0200
+Subject: [PATCH] The type property (in recent UPower at least) needs to have a
+ capital T - "Type"
+
+---
+ src/PowerBackend.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/PowerBackend.py b/src/PowerBackend.py
+index e020b98..56bcb61 100644
+--- a/src/PowerBackend.py
++++ b/src/PowerBackend.py
+@@ -165,7 +165,7 @@ def __init__(self):
+ self.__batteries = {}
+ for dev in devices:
+ (prop_iface, dev_iface) = self.__get_battery(dev)
+- type = prop_iface.Get(self.device_interface, 'type')
++ type = prop_iface.Get(self.device_interface, 'Type')
+ if type == self.bat_type:
+ power_bat = UPowerBattery(prop_iface, dev_iface)
+ self.__batteries[dev] = power_bat
+@@ -228,7 +228,7 @@ def set_right_popup_menu_action(self, action):
+ def __device_added(self, udi):
+ (prop_iface, dev_iface) = self.__get_battery(udi)
+ try:
+- type = prop_iface.Get(self.device_interface, 'type')
++ type = prop_iface.Get(self.device_interface, 'Type')
+ if type == self.bat_type:
+ power_bat = UPowerBattery(prop_iface, dev_iface)
+ power_bat.set_left_popup_menu_action(self.__mc_action)