diff options
Diffstat (limited to 'mate-extra/mate-power-manager')
9 files changed, 1280 insertions, 15 deletions
diff --git a/mate-extra/mate-power-manager/ChangeLog b/mate-extra/mate-power-manager/ChangeLog index 85f5be6326ff..dfde9eba74b6 100644 --- a/mate-extra/mate-power-manager/ChangeLog +++ b/mate-extra/mate-power-manager/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for mate-extra/mate-power-manager # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mate-extra/mate-power-manager/ChangeLog,v 1.6 2014/05/04 14:54:55 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/mate-extra/mate-power-manager/ChangeLog,v 1.7 2014/05/06 17:44:47 tomwij Exp $ + +*mate-power-manager-1.8.0-r1 (06 May 2014) + + 06 May 2014; Tom Wijsman <TomWij@gentoo.org> + +files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch, +files/mat + e-power-manager-1.8.0-r1-dbus_interface_keyboard_backlight_controls.patch, + +files/mate-power-manager-1.8.0-r1-improve-UPower1-support.patch, +files/mate- + power-manager-1.8.0-r1-other-round-of-fixes-for-UPower-0.99-API-changes.patch, + +files/mate-power-manager-1.8.0-r1-port-to-upower-0.99-API.patch, + +files/mate-power-manager-1.8.0-r1-remove-battery-recall-logic.patch, + +mate-power-manager-1.8.0-r1.ebuild: + Revision bump, backported and/or upstreamed patches; imported from the mate- + overlay, by infirit. 04 May 2014; Agostino Sarubbo <ago@gentoo.org> mate-power-manager-1.6.3.ebuild: diff --git a/mate-extra/mate-power-manager/Manifest b/mate-extra/mate-power-manager/Manifest index ce8932772710..3d40f0c7ff9b 100644 --- a/mate-extra/mate-power-manager/Manifest +++ b/mate-extra/mate-power-manager/Manifest @@ -2,26 +2,27 @@ Hash: SHA256 AUX mate-power-manager-1.6-libsecret.patch 5563 SHA256 58b16367b2c9accb51a582a506a062615bc3f4acce5b0975537c2934d78df5b1 SHA512 96bca058d5b1cf1dba3453096bc0899bfd5459bbe141e15cff769ee352d629cceeaf9a0467022601e4127f753412eda0feed36e1f6302f9b166077b239307e28 WHIRLPOOL 4e3314f02e88f961feb029a4d1663257deaca88cee098f9174c91c531e60a38edab0302d996fee6ac7d0c430835656c299fe5289d2b1df14190743a1f428e1e2 +AUX mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch 588 SHA256 dd6c00f1fb55aaf028c3aac812c0091975a36a1c7c71a2fca27888e37a57b406 SHA512 3ae07dc504fa8251f2fe33ade563ca8073664240c0c9ec84726094477f9cd9c9e27be01f10484442ca7ddd507889c8252f9445702b7163ef7874d5a7a5003551 WHIRLPOOL fb0c1b6a07c85c1b43517f462e0dee6e7ed25c9084809d69b8dabbcf4880fd4a03471bbb3933dd2260952a527d138194daf60e2ba23742ccc51217cf4767d686 +AUX mate-power-manager-1.8.0-r1-dbus_interface_keyboard_backlight_controls.patch 6642 SHA256 bdee76c39f9b3a8363494f9475dc398587133f85bdad3d544ecb63e2e5f67dbf SHA512 8ab9606de1ff0f763c11954f2c0ad43e920fb4dee2964eea188e83a27186d1e2e7cf3422fbe106f54049ec3fee867980258c03f20de43427df6a82efed1a2632 WHIRLPOOL 1ffd8164e990e943f18ecbc2758b36f0609c7cca816d3bab849d05998df1dd4301dc1280cbf89a2a15f88db4cae38160aace257fc707e984b85dc288970d6be0 +AUX mate-power-manager-1.8.0-r1-improve-UPower1-support.patch 3627 SHA256 ad4648ef22c73ac9eedad6ed6513d11e718309d6f0431593469c577f81663e31 SHA512 13e7add5f61fca590ee2268aed82920c0e0c5441c64b2fba90a71848fd97b3096ffabb348e87a5284e5ddda68cd71c1d4f59b44e636aa482ec0851ef293cdb69 WHIRLPOOL f3c8f298add9517ef64203dfd6f7712931fb6290e2378882c88cd5b6d2b094f1ac2094a575004c1c4d1887005ff5c33be70a1dca801ed4f0f1e3ba9405c59190 +AUX mate-power-manager-1.8.0-r1-other-round-of-fixes-for-UPower-0.99-API-changes.patch 7041 SHA256 31643f4258b1764cfe2291a20af2b5f46840a2f9f6efb175d26b11df094e8d2d SHA512 76ca9d7a7474deeab40780726b8ba451cf823a896943bcdbc447834187560cc9125723258cb2b9d7a375a1ffc2eb798c1d4401265d851dbb780ee017fb116ceb WHIRLPOOL a19a20368c47e2c8a2f335b2a63ea1e48afe4926bc2b8441ebc720212329670c8d5a773c6d188afe181bb4335bdac6011daebff7d6d2de814f6addf33d3b16c1 +AUX mate-power-manager-1.8.0-r1-port-to-upower-0.99-API.patch 12875 SHA256 8171d8e38e4ecd10a63af5b9765208f6db92451132ebc436a7567959506c126f SHA512 a2bc47142c024804638f916788f006edd4fb575c6e1a39a76dbae4c6e0455ab8f23170167296ca3b3aca9a9617665c9800e048ae668cec0600ab9080b47107f9 WHIRLPOOL 1b3bfd608e6d5de7f9d265bbff2be7564bf373241c5d9d5b445d3dbd0e432c4b08898e8c3feda18c19c0d9e4404c52b612e74d78517ec82771f8341f28059bf6 +AUX mate-power-manager-1.8.0-r1-remove-battery-recall-logic.patch 9292 SHA256 c20e8b1274f7779b559179eceba9cc4c16eee2f903e44338d8e9891d6ac87007 SHA512 53872f88bf882cafa9dd6f91d2fb9923940d8a23e95577dacf4d7fdf299c8a1ccc7f9e0add802f22f5134d24e84e71d47b847b1e2aa6a26502b31fcaf680a503 WHIRLPOOL e6b641e787f42d8b4050b7e6d93ae40f80487d240fe19bd93e3cd2225fae4e868e1d9924ed34c58ec703964daf4050d3c9c6bf38f3a67602e0f450053dd5412e DIST mate-power-manager-1.6.3.tar.xz 3362188 SHA256 465b8d88d25333c9a5f0dd9a34720cac6024e21e574378d1d49326e1ff1d253b SHA512 dfc17688a60aa19109af39f1436ed3f8a5acbfa1a89b128c4619356574a5df73e058366ca53626be04bed6ff37d2ebefa8a04b4efca7d3ce96e5753594e14769 WHIRLPOOL 8993f97df88ebd1d71da7480d1c09529c8df924f0d33f268b3f84f1d81914eca278a2eebb1e5465fb59937e875ec970cbd7ee5c307aa92120c8441b270ac1640 DIST mate-power-manager-1.8.0.tar.xz 3339588 SHA256 3d83b7736b0b6256242db3b9efaa18530b4ba6d80b146eafaf511230ae926d9f SHA512 f91b195e384138ce0881f53f4d3e8924d422445ac258de2138da16ab29999cd367b2e37c226e5d56e698bc54b82c8996b3263a638702f45b2f96ffabbceca479 WHIRLPOOL 31a423d25abd488bceb13354cabc3f80844f791060339ea38d4fa12f8ac80d1d4a4c94c8e07af7ba489fd5da98f7bbdfbf4edebe339926e91e0d39747ddb3a34 EBUILD mate-power-manager-1.6.3.ebuild 2409 SHA256 9bcaf412d266dfa8e42a9ce850819800cf1520c7de1000dff9869ffeadc01b4e SHA512 1e367e3828a1eb07fb78ec624766aa4cfd02a2a70d25cbaf58399453c6a396c62bfb11711e31989dffc84761cc8bf7f03761029c9f25f5c6d447d27d2e695b5d WHIRLPOOL 27daa737a68a3b468dfcb1dede11851dca1b9eb62e8be7b1f4e1018053622b32fb40c04ac43b3c93dba164252a7fad9f20f07ff97e0a394480084207b531d1df +EBUILD mate-power-manager-1.8.0-r1.ebuild 3074 SHA256 75a969fc46d94fd8077a32f162689d551ff0b7a93baee9900b990dcb3e5067c4 SHA512 c4728ff9908b4ea3d0fd8fc29b51be23082a66588147df62aefeb236975858b2c2df256eea5c7bfeb2d3e9d19c46b0bf9409a73fdaa034745613fbc6b3cf2c73 WHIRLPOOL 53c16206ee439aa006f9dbee6467ccb91ec18d3779bee551c2cfb5e70c64bfacc146367ad48135a9ede69183e2676e99ec56b52d206c700c8b02be9497fc34ff EBUILD mate-power-manager-1.8.0.ebuild 2330 SHA256 ec0d73b260f59b9a264b9847d6011a8b046a95c79c7dc57774e8af0c742d8611 SHA512 82d29c7ab14f429322e9b577a389f0eca41f49fa0758d517807e36a6bb1866e771803e7fb4ba21a2a6e59d9e694b0d91de92edac091e7b98aaaa241ed84a6cf6 WHIRLPOOL 949378b99d67f454733f88082c39faf8d843fec1813965e2b0db13f30679ec8b8eface5f0cc72c2549573cd550b4f4bdc98b26ea290ae4e2fb8409894de7ac64 -MISC ChangeLog 1332 SHA256 f491f1ffbfa20e18927ae594f3fd3e3a8cd7656cf458c23cc87a90496735e50e SHA512 d5a160a41ef09b504b4873dc5c3e540aced8687e1b40b6b1e0b75c9bd7206d1e2a59bc943e778b3486e15a44af4c25ec6e4f3cdc3964f349895d3e6c769ff60f WHIRLPOOL 6fa6e8982ff9bebf5031b7feb4dadc1a7f1acf18fa6c40513760248429b33c6972a5ad9db2c1ea102d5db248eb279914ad93c714753b0fee95161c6b94003e72 +MISC ChangeLog 2028 SHA256 99e89c29e736c89542bf1bf8ae608adcc03fff61ab267067d81474379d17c6da SHA512 5c77bb6d2aa7746d167f4f2c78cbc9c5d8352a2630fcc32612bc4a281c2eade55d39a4c0c18cd86e4bbeed26261317da03706a010170e23567b2431468965b5d WHIRLPOOL 6565e17d59fc8e7c7cdba740fac42e7c5bcf6ecab3aaa76293f95aef6db66b2429ba80190e58925f45db673ebfa2a6581c66b8d6bb2b222368ed92ab92497f7c MISC metadata.xml 468 SHA256 138877fb0154af1e9e2ed98f927a16daa6f49d3a8312b8e469fc92fa54232ae8 SHA512 318497639aa45f81e65e89d59820977fe89a618dff7844c13bf3a1d875ac9407f8b190c6ea6d4e9aed6f97b1bc96b7f821d1222fc605729af8c783f620c1358b WHIRLPOOL 2112944a997e20ed2609f0e9d1f99ae80c2dca2f57631d953fdc38f68a19905dd137584a756f07dcf79b26dc16b8780dced00f2f87e394a46cc641ac0d9c377f -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQIcBAEBCAAGBQJTZlTAAAoJELp701BxlEWftzsP/RTZV70wz4B8+2uv4BWdjg0E -yzGH8kvAEi2+9QPLAO64VpROaLZE8W/irvUm0YG5+2Ast94tnAKISngH+0nv40oM -+dt6/KXlIEALK2GeXrfGW+vuovIY5A46qOX3GvuWtyK+15zk70kNq5a+CRT9WRvu -TkZEVtM4dpB9B/VW+WqfArxQlocdc/jhj7l8UL8VHiOYiAW0sJJeNqRcy8lDKqKA -2w9htUE+xcWXSXyPdi22wVQ1NGXPdwjyos/99Mk+EhG2NcmzodAw1bQ+EBOXNGr0 -5E/0m+OPC9YY/83QplXZ5m2Sw/xil39cadoHBiciDpUOY+vDpg3jD/sOLkCrh1rq -hKzo0oRMpNNwjNQI6lEmyUeK23HaLkxW9OSkqf1pI0WVw4zM4To/Dmf88lkuteKc -pYi23i+uYi3mYhrDThy8Gt7j+tf5jAkfOY6Pn13i7VKif0pV5ikdify+rV8KzXmR -nrA0/zqRG8n5seEo4i1UnSNy2jcg5h5Z2v9DtlSPOxbIZ5jTOx2sNvCF6ovJNtbJ -ymyiiIf7UAjgSf0HUJ0oLFP8RqQnZ0VSyYrP+r6yES4vJB51BDG7T+Msh/nzKu4c -86VMIkfwyZPc2+jjv2vQefMLVlGmIoc7QaeE2lyILpiu9GreOLqz7rfupJDJsRM5 -vDAAiWte8N1tV/AYHg4c -=AVCp +iQEcBAEBCAAGBQJTaR+WAAoJEJWyH81tNOV9hnYIAK6vvJglCGMV6LAIYru6IBJo +9h0hSuRlHnzZDeloFE4YnAL/fM5beEz6ZIH8vTaBmam5tQzaPxGkAkyrssnj732i +MrvukmI7CQmeZdjFBFajU/Thz/4tm1ofdlWy2aHE10f5B29VMKMoA+Dcg3b8mN6t +EiekM6+djeK9i7UqsICansojVRaihPC6VyAmIJUNY42XmS0Tgf008SJG8zEJ4BLI +4x/xrD4WIpwjYhHUXTFR73FSetyM9n772aHcnih+eIdfkdGnhh5amspv/XUd2hVf +8hJ9h+hWlBfL0otahWu3D3zC+2Slgm1huCB/Gv9V9CpflL2xz2tLdKr67+peNQI= +=THXx -----END PGP SIGNATURE----- diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch new file mode 100644 index 000000000000..9bccb5c95354 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-avoid-levels-is-0-warning.patch @@ -0,0 +1,15 @@ +diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c +index 0ac6801..a439e94 100644 +--- a/src/gpm-kbd-backlight.c ++++ b/src/gpm-kbd-backlight.c +@@ -113,6 +113,9 @@ gpm_kbd_backlight_set (GpmKbdBacklight *backlight, + guint goal; + + g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE); ++ /* avoid warnings if no keyboard brightness is available */ ++ if (backlight->priv->max_brightness < 1) ++ return FALSE; + /* if we're setting the same we are, don't bother */ + //g_return_val_if_fail (backlight->priv->brightness_percent != percentage, FALSE); + + diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-dbus_interface_keyboard_backlight_controls.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-dbus_interface_keyboard_backlight_controls.patch new file mode 100644 index 000000000000..689192ff9e59 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-dbus_interface_keyboard_backlight_controls.patch @@ -0,0 +1,160 @@ +diff -uprN mate-power-manager-orig/src/gpm-common.h mate-power-manager/src/gpm-common.h +--- mate-power-manager-orig/src/gpm-common.h 2013-10-03 13:56:55.000000000 +0200 ++++ mate-power-manager/src/gpm-common.h 2013-10-13 19:54:10.649901214 +0200 +@@ -33,6 +33,7 @@ G_BEGIN_DECLS + #define GPM_DBUS_SERVICE "org.mate.PowerManager" + #define GPM_DBUS_INTERFACE "org.mate.PowerManager" + #define GPM_DBUS_INTERFACE_BACKLIGHT "org.mate.PowerManager.Backlight" ++#define GPM_DBUS_INTERFACE_KBD_BACKLIGHT "org.mate.PowerManager.KbdBacklight" + #define GPM_DBUS_PATH "/org/mate/PowerManager" + #define GPM_DBUS_PATH_BACKLIGHT "/org/mate/PowerManager/Backlight" + #define GPM_DBUS_PATH_KBD_BACKLIGHT "/org/mate/PowerManager/KbdBacklight" +diff -uprN mate-power-manager-orig/src/gpm-kbd-backlight.c mate-power-manager/src/gpm-kbd-backlight.c +--- mate-power-manager-orig/src/gpm-kbd-backlight.c 2013-10-03 13:56:55.000000000 +0200 ++++ mate-power-manager/src/gpm-kbd-backlight.c 2013-10-13 19:58:07.154258855 +0200 +@@ -31,21 +31,6 @@ + #include "gpm-kbd-backlight.h" + #include "gsd-media-keys-window.h" + +-static const gchar *kbd_backlight_introspection = "" +-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>""<node name=\"/\">" +- "<interface name=\"org.mate.PowerManager.Backlight\">" +- "<method name=\"GetBrightness\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>" +- "</method>" +- "<method name=\"SetBrightness\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"in\"/>" +- "</method>" +- "<signal name=\"BrightnessChanged\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>" +- "</signal>" +- "</interface>" +-"</node>"; +- + #define GPM_KBD_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightPrivate)) + + struct GpmKbdBacklightPrivate +@@ -430,40 +415,6 @@ gpm_kbd_backlight_dbus_property_set (GDB + return FALSE; + } + +-/** +- * gpm_kbd_backlight_register_dbus: +- * @backlight: +- * @connection: +- * @error: +- **/ +-void +-gpm_kbd_backlight_register_dbus (GpmKbdBacklight *backlight, +- GDBusConnection *connection, +- GError **error) +-{ +- GDBusNodeInfo *node_info; +- GDBusInterfaceInfo *interface_info; +- GDBusInterfaceVTable interface_vtable = { +- gpm_kbd_backlight_dbus_method_call, +- gpm_kbd_backlight_dbus_property_get, +- gpm_kbd_backlight_dbus_property_set +- }; +- +- node_info = g_dbus_node_info_new_for_xml (kbd_backlight_introspection, NULL); +- interface_info = g_dbus_node_info_lookup_interface (node_info, GPM_DBUS_INTERFACE_BACKLIGHT); +- +- backlight->priv->bus_connection = g_object_ref (connection); +- backlight->priv->bus_object_id = +- g_dbus_connection_register_object (connection, +- GPM_DBUS_PATH_KBD_BACKLIGHT, +- interface_info, +- &interface_vtable, +- backlight, +- NULL, +- error); +- g_dbus_node_info_unref (node_info); +-} +- + static gboolean + gpm_kbd_backlight_evaluate_power_source_and_set (GpmKbdBacklight *backlight) + { +diff -uprN mate-power-manager-orig/src/gpm-manager.c mate-power-manager/src/gpm-manager.c +--- mate-power-manager-orig/src/gpm-manager.c 2013-10-03 13:56:55.000000000 +0200 ++++ mate-power-manager/src/gpm-manager.c 2013-10-13 20:05:11.449488592 +0200 +@@ -63,6 +63,7 @@ + #include "gpm-disks.h" + + #include "org.mate.PowerManager.Backlight.h" ++#include "org.mate.PowerManager.KbdBacklight.h" + + static void gpm_manager_finalize (GObject *object); + +@@ -1986,12 +1987,13 @@ gpm_manager_init (GpmManager *manager) + G_OBJECT (manager->priv->backlight)); + } + +- manager->priv->kbd_backlight = gpm_kbd_backlight_new (); +- if (manager->priv->kbd_backlight != NULL) { +- gpm_kbd_backlight_register_dbus (manager->priv->kbd_backlight, +- g_connection, +- NULL); +- } ++ manager->priv->kbd_backlight = gpm_kbd_backlight_new (); ++ if (manager->priv->kbd_backlight != NULL) { ++ dbus_g_object_type_install_info (GPM_TYPE_KBD_BACKLIGHT, ++ &dbus_glib_gpm_kbd_backlight_object_info); ++ dbus_g_connection_register_g_object (connection, GPM_DBUS_PATH_KBD_BACKLIGHT, ++ G_OBJECT (manager->priv->kbd_backlight)); ++ } + + manager->priv->idle = gpm_idle_new (); + g_signal_connect (manager->priv->idle, "idle-changed", +diff -uprN mate-power-manager-orig/src/Makefile.am mate-power-manager/src/Makefile.am +--- mate-power-manager-orig/src/Makefile.am 2013-10-03 13:56:55.000000000 +0200 ++++ mate-power-manager/src/Makefile.am 2013-10-13 20:10:17.374533688 +0200 +@@ -6,6 +6,7 @@ NULL = + EXTRA_DIST = \ + org.mate.PowerManager.xml \ + org.mate.PowerManager.Backlight.xml \ ++ org.mate.PowerManager.KbdBacklight.xml \ + gpm-marshal.list \ + $(NULL) + +@@ -270,6 +271,7 @@ endif + BUILT_SOURCES = \ + org.mate.PowerManager.h \ + org.mate.PowerManager.Backlight.h \ ++ org.mate.PowerManager.KbdBacklight.h \ + gpm-marshal.c \ + gpm-marshal.h \ + $(NULL) +@@ -295,6 +297,13 @@ org.mate.PowerManager.Backlight.h: org.m + --output=org.mate.PowerManager.Backlight.h \ + $(srcdir)/org.mate.PowerManager.Backlight.xml + ++org.mate.PowerManager.KbdBacklight.h: org.mate.PowerManager.KbdBacklight.xml ++ libtool --mode=execute dbus-binding-tool \ ++ --prefix=gpm_kbd_backlight \ ++ --mode=glib-server \ ++ --output=org.mate.PowerManager.KbdBacklight.h \ ++ $(srcdir)/org.mate.PowerManager.KbdBacklight.xml ++ + clean-local: + rm -f *~ + rm -f gpm-marshal.c gpm-marshal.h +diff -uprN mate-power-manager-orig/src/org.mate.PowerManager.KbdBacklight.xml mate-power-manager/src/org.mate.PowerManager.KbdBacklight.xml +--- mate-power-manager-orig/src/org.mate.PowerManager.KbdBacklight.xml 2013-10-13 20:12:11.556667787 +0200 ++++ mate-power-manager/src/org.mate.PowerManager.KbdBacklight.xml 2013-10-13 20:11:45.972413654 +0200 +@@ -0,0 +1,15 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<node name="/"> ++ <interface name="org.mate.PowerManager.KbdBacklight"> ++ <method name="GetBrightness"> ++ <arg type="u" name="percentage_brightness" direction="out"/> ++ </method> ++ <method name="SetBrightness"> ++ <arg type="u" name="percentage_brightness" direction="in"/> ++ </method> ++ <signal name="BrightnessChanged"> ++ <arg type="u" name="percentage_brightness" direction="out"/> ++ </signal> ++ </interface> ++</node> ++ diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-improve-UPower1-support.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-improve-UPower1-support.patch new file mode 100644 index 000000000000..d3e9d855ef23 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-improve-UPower1-support.patch @@ -0,0 +1,102 @@ +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index e6c6bf2..fe458e3 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -82,6 +82,9 @@ G_DEFINE_TYPE (GpmEngine, gpm_engine, G_TYPE_OBJECT) + + static UpDevice *gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device); + static UpDevice *gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device); ++#if UP_CHECK_VERSION (0, 99, 0) ++static void gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine); ++#endif + + typedef enum { + GPM_ENGINE_WARNING_NONE = 0, +@@ -757,6 +760,13 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + g_object_get (composite, "state", &state, NULL); + g_object_set_data (G_OBJECT(composite), "engine-state-old", GUINT_TO_POINTER(state)); + } ++ ++#if UP_CHECK_VERSION (0, 99, 0) ++ if (kind == UP_DEVICE_KIND_BATTERY || kind == UP_DEVICE_KIND_UPS || kind == UP_DEVICE_KIND_LINE_POWER) ++ return; ++ g_signal_connect (device, "notify", G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#endif ++ + } + + /** +@@ -851,19 +861,20 @@ gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + **/ + static void + #if UP_CHECK_VERSION(0, 99, 0) +-gpm_engine_device_changed_cb (UpClient *client, GParamSpec *pspec, GpmEngine *engine) +-{ +- gpm_engine_recalculate_state (engine); +-} ++gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine) + #else + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) ++#endif + { ++#if !UP_CHECK_VERSION(0, 99, 0) + UpDeviceKind kind; ++#endif + UpDeviceState state; + UpDeviceState state_old; + GpmEngineWarning warning_old; + GpmEngineWarning warning; + ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get device properties */ + g_object_get (device, + "kind", &kind, +@@ -874,6 +885,7 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + egg_debug ("updating because %s changed", up_device_get_object_path (device)); + device = gpm_engine_update_composite_device (engine, device); + } ++#endif + + /* get device properties (may be composite) */ + g_object_get (device, +@@ -917,7 +929,6 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + + gpm_engine_recalculate_state (engine); + } +-#endif + + /** + * gpm_engine_get_devices: +@@ -1042,10 +1053,7 @@ gpm_engine_init (GpmEngine *engine) + G_CALLBACK (gpm_engine_device_added_cb), engine); + g_signal_connect (engine->priv->client, "device-removed", + G_CALLBACK (gpm_engine_device_removed_cb), engine); +-#if UP_CHECK_VERSION(0, 99, 0) +- g_signal_connect (engine->priv->client, "notify", +- G_CALLBACK (gpm_engine_device_changed_cb), engine); +-#else ++#if !UP_CHECK_VERSION(0, 99, 0) + g_signal_connect (engine->priv->client, "device-changed", + G_CALLBACK (gpm_engine_device_changed_cb), engine); + #endif +@@ -1075,6 +1083,11 @@ gpm_engine_init (GpmEngine *engine) + #endif + + /* create a fake virtual composite battery */ ++#if UP_CHECK_VERSION(0, 99, 0) ++ engine->priv->battery_composite = up_client_get_display_device (engine->priv->client); ++ g_signal_connect (engine->priv->client, "notify", ++ G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#else + engine->priv->battery_composite = up_device_new (); + g_object_set (engine->priv->battery_composite, + "kind", UP_DEVICE_KIND_BATTERY, +@@ -1083,6 +1096,7 @@ gpm_engine_init (GpmEngine *engine) + "power-supply", TRUE, + "is-present", TRUE, + NULL); ++#endif + + engine->priv->previous_icon = NULL; + engine->priv->previous_summary = NULL; + diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-other-round-of-fixes-for-UPower-0.99-API-changes.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-other-round-of-fixes-for-UPower-0.99-API-changes.patch new file mode 100644 index 000000000000..83447294b61f --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-other-round-of-fixes-for-UPower-0.99-API-changes.patch @@ -0,0 +1,217 @@ +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index fe458e3..56d19e2 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -84,7 +84,29 @@ static UpDevice *gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *o + static UpDevice *gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device); + #if UP_CHECK_VERSION (0, 99, 0) + static void gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine); +-#endif ++ ++#define GPM_ENGINE_WARNING_NONE UP_DEVICE_LEVEL_NONE ++#define GPM_ENGINE_WARNING_DISCHARGING UP_DEVICE_LEVEL_DISCHARGING ++#define GPM_ENGINE_WARNING_LOW UP_DEVICE_LEVEL_LOW ++#define GPM_ENGINE_WARNING_CRITICAL UP_DEVICE_LEVEL_CRITICAL ++#define GPM_ENGINE_WARNING_ACTION UP_DEVICE_LEVEL_ACTION ++ ++/** ++ * gpm_engine_get_warning: ++ * ++ * This gets the possible engine state for the device according to the ++ * policy, which could be per-percent, or per-time. ++ * ++ * Return value: A GpmEngine state, e.g. GPM_ENGINE_WARNING_DISCHARGING ++ **/ ++static UpDeviceLevel ++gpm_engine_get_warning (GpmEngine *engine, UpDevice *device) ++{ ++ UpDeviceLevel warning; ++ g_object_get (device, "warning-level", &warning, NULL); ++ return warning; ++} ++#else + + typedef enum { + GPM_ENGINE_WARNING_NONE = 0, +@@ -226,6 +248,7 @@ gpm_engine_get_warning (GpmEngine *engine, UpDevice *device) + out: + return warning_type; + } ++#endif + + /** + * gpm_engine_get_summary: +@@ -282,12 +305,20 @@ gpm_engine_get_summary (GpmEngine *engine) + * Returns the icon + **/ + static gchar * ++#if UP_CHECK_VERSION (0, 99, 0) ++gpm_engine_get_icon_priv (GpmEngine *engine, UpDeviceKind device_kind, UpDeviceLevel warning, gboolean use_state) ++#else + gpm_engine_get_icon_priv (GpmEngine *engine, UpDeviceKind device_kind, GpmEngineWarning warning, gboolean use_state) ++#endif + { + guint i; + GPtrArray *array; + UpDevice *device; ++#if UP_CHECK_VERSION (0, 99, 0) ++ UpDeviceLevel warning_temp; ++#else + GpmEngineWarning warning_temp; ++#endif + UpDeviceKind kind; + UpDeviceState state; + gboolean is_present; +@@ -572,6 +603,9 @@ gpm_engine_device_check_capacity (GpmEngine *engine, UpDevice *device) + static UpDevice * + gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ return engine->priv->battery_composite; ++#else + guint battery_devices = 0; + GPtrArray *array; + UpDevice *device; +@@ -601,6 +635,7 @@ gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + out: + /* return composite device or original device */ + return device; ++#endif + } + + /** +@@ -609,6 +644,18 @@ gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + static UpDevice * + gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ gchar *text; ++ ++ text = up_device_to_text (engine->priv->battery_composite); ++ egg_debug ("composite:\n%s", text); ++ g_free (text); ++ ++ /* force update of icon */ ++ gpm_engine_recalculate_state_icon (engine); ++ ++ return engine->priv->battery_composite; ++#else + guint i; + gdouble percentage = 0.0; + gdouble energy = 0.0; +@@ -720,6 +767,7 @@ gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device + out: + /* return composite device or original device */ + return device; ++#endif + } + + /** +@@ -728,7 +776,11 @@ gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device + static void + gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ UpDeviceLevel warning; ++#else + GpmEngineWarning warning; ++#endif + UpDeviceState state; + UpDeviceKind kind; + UpDevice *composite; +@@ -762,9 +814,9 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + } + + #if UP_CHECK_VERSION (0, 99, 0) +- if (kind == UP_DEVICE_KIND_BATTERY || kind == UP_DEVICE_KIND_UPS || kind == UP_DEVICE_KIND_LINE_POWER) +- return; + g_signal_connect (device, "notify", G_CALLBACK (gpm_engine_device_changed_cb), engine); ++ g_ptr_array_add (engine->priv->array, g_object_ref (device)); ++ gpm_engine_recalculate_state (engine); + #endif + + } +@@ -820,10 +872,14 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + static void + gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ gpm_engine_device_add (engine, device); ++#else + /* add to list */ + g_ptr_array_add (engine->priv->array, g_object_ref (device)); + + gpm_engine_recalculate_state (engine); ++#endif + } + + /** +@@ -866,15 +922,17 @@ gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *en + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + #endif + { +-#if !UP_CHECK_VERSION(0, 99, 0) + UpDeviceKind kind; +-#endif + UpDeviceState state; + UpDeviceState state_old; ++#if UP_CHECK_VERSION(0, 99, 0) ++ UpDeviceLevel warning_old; ++ UpDeviceLevel warning; ++#else + GpmEngineWarning warning_old; + GpmEngineWarning warning; ++#endif + +-#if !UP_CHECK_VERSION(0, 99, 0) + /* get device properties */ + g_object_get (device, + "kind", &kind, +@@ -885,7 +943,6 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + egg_debug ("updating because %s changed", up_device_get_object_path (device)); + device = gpm_engine_update_composite_device (engine, device); + } +-#endif + + /* get device properties (may be composite) */ + g_object_get (device, +@@ -1070,22 +1127,10 @@ gpm_engine_init (GpmEngine *engine) + g_signal_connect (engine->priv->phone, "device-refresh", + G_CALLBACK (phone_device_refresh_cb), engine); + +-#if UP_CHECK_VERSION(0, 99, 0) +- /* coldplug */ +- array = up_client_get_devices(engine->priv->client); +- if (array) { +- for (i = 0; i < array->len; i++) { +- UpDevice *device = g_ptr_array_index (array, i); +- gpm_engine_device_added_cb(engine->priv->client, device, engine); +- } +- g_ptr_array_free (array, TRUE); +- } +-#endif +- + /* create a fake virtual composite battery */ + #if UP_CHECK_VERSION(0, 99, 0) + engine->priv->battery_composite = up_client_get_display_device (engine->priv->client); +- g_signal_connect (engine->priv->client, "notify", ++ g_signal_connect (engine->priv->battery_composite, "notify", + G_CALLBACK (gpm_engine_device_changed_cb), engine); + #else + engine->priv->battery_composite = up_device_new (); +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index df84cac..09bd0c0 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -1858,7 +1858,9 @@ gpm_manager_init (GpmManager *manager) + G_CALLBACK (gpm_manager_settings_changed_cb), manager); + manager->priv->client = up_client_new (); + #if UP_CHECK_VERSION(0, 99, 0) +- g_signal_connect (manager->priv->client, "notify", ++ g_signal_connect (manager->priv->client, "notify::lid-is-closed", ++ G_CALLBACK (gpm_manager_client_changed_cb), manager); ++ g_signal_connect (manager->priv->client, "notify::on-battery", + G_CALLBACK (gpm_manager_client_changed_cb), manager); + #else + g_signal_connect (manager->priv->client, "changed", + diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-port-to-upower-0.99-API.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-port-to-upower-0.99-API.patch new file mode 100644 index 000000000000..720257583596 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-port-to-upower-0.99-API.patch @@ -0,0 +1,390 @@ +diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c +index 1f1d834..d2938a4 100644 +--- a/src/gpm-backlight.c ++++ b/src/gpm-backlight.c +@@ -410,7 +410,11 @@ gpm_settings_key_changed_cb (GSettings *settings, const gchar *key, GpmBacklight + * Does the actions when the ac power source is inserted/removed. + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_backlight_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmBacklight *backlight) ++#else + gpm_backlight_client_changed_cb (UpClient *client, GpmBacklight *backlight) ++#endif + { + gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE); + } +@@ -727,8 +731,13 @@ gpm_backlight_init (GpmBacklight *backlight) + + /* we use up_client for the ac-adapter-changed signal */ + backlight->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (backlight->priv->client, "notify", ++ G_CALLBACK (gpm_backlight_client_changed_cb), backlight); ++#else + g_signal_connect (backlight->priv->client, "changed", + G_CALLBACK (gpm_backlight_client_changed_cb), backlight); ++#endif + + /* gets caps */ + backlight->priv->can_dim = gpm_brightness_has_hw (backlight->priv->brightness); +diff --git a/src/gpm-button.c b/src/gpm-button.c +index 1e38173..b331cf6 100644 +--- a/src/gpm-button.c ++++ b/src/gpm-button.c +@@ -324,7 +324,11 @@ gpm_button_reset_time (GpmButton *button) + * gpm_button_client_changed_cb + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_button_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmButton *button) ++#else + gpm_button_client_changed_cb (UpClient *client, GpmButton *button) ++#endif + { + gboolean lid_is_closed; + +@@ -363,9 +367,13 @@ gpm_button_init (GpmButton *button) + + button->priv->client = up_client_new (); + button->priv->lid_is_closed = up_client_get_lid_is_closed (button->priv->client); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (button->priv->client, "notify", ++ G_CALLBACK (gpm_button_client_changed_cb), button); ++#else + g_signal_connect (button->priv->client, "changed", + G_CALLBACK (gpm_button_client_changed_cb), button); +- ++#endif + /* register the brightness keys */ + gpm_button_xevent_key (button, XF86XK_PowerOff, GPM_BUTTON_POWER); + #ifdef HAVE_XF86XK_SUSPEND +diff --git a/src/gpm-control.c b/src/gpm-control.c +index ec50136..0562d38 100644 +--- a/src/gpm-control.c ++++ b/src/gpm-control.c +@@ -289,10 +289,11 @@ gpm_control_suspend (GpmControl *control, GError **error) + } + g_object_unref(proxy); + } ++#if !UP_CHECK_VERSION(0, 99, 0) + else { + ret = up_client_suspend_sync (control->priv->client, NULL, error); + } +- ++#endif + egg_debug ("emitting resume"); + g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_SUSPEND); + +@@ -399,10 +400,11 @@ gpm_control_hibernate (GpmControl *control, GError **error) + ret = TRUE; + } + } ++#if !UP_CHECK_VERSION(0, 99, 0) + else { + ret = up_client_hibernate_sync (control->priv->client, NULL, error); + } +- ++#endif + egg_debug ("emitting resume"); + g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_HIBERNATE); + +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index 96a043e..e6c6bf2 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -768,12 +768,14 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + guint i; + GPtrArray *array = NULL; + UpDevice *device; ++#if !UP_CHECK_VERSION(0, 99, 0) + gboolean ret; + GError *error = NULL; ++#endif + + g_return_val_if_fail (engine != NULL, FALSE); + g_return_val_if_fail (GPM_IS_ENGINE (engine), FALSE); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get devices from UPower */ + ret = up_client_enumerate_devices_sync (engine->priv->client, NULL, &error); + if (!ret) { +@@ -781,7 +783,7 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + g_error_free (error); + goto out; + } +- ++#endif + /* connected mobile phones */ + gpm_phone_coldplug (engine->priv->phone); + +@@ -793,7 +795,9 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + device = g_ptr_array_index (array, i); + gpm_engine_device_add (engine, device); + } ++#if !UP_CHECK_VERSION(0, 99, 0) + out: ++#endif + if (array != NULL) + g_ptr_array_unref (array); + /* never repeat */ +@@ -816,6 +820,22 @@ gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engin + * gpm_engine_device_removed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_engine_device_removed_cb (UpClient *client, const char *object_path, GpmEngine *engine) ++{ ++ guint i; ++ ++ for (i = 0; i < engine->priv->array->len; i++) { ++ UpDevice *device = g_ptr_array_index (engine->priv->array, i); ++ ++ if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0) { ++ g_ptr_array_remove_index (engine->priv->array, i); ++ break; ++ } ++ } ++ gpm_engine_recalculate_state (engine); ++} ++#else + gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { + gboolean ret; +@@ -824,12 +844,18 @@ gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + return; + gpm_engine_recalculate_state (engine); + } +- ++#endif + + /** + * gpm_engine_device_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_engine_device_changed_cb (UpClient *client, GParamSpec *pspec, GpmEngine *engine) ++{ ++ gpm_engine_recalculate_state (engine); ++} ++#else + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { + UpDeviceKind kind; +@@ -891,6 +917,7 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + + gpm_engine_recalculate_state (engine); + } ++#endif + + /** + * gpm_engine_get_devices: +@@ -1003,7 +1030,10 @@ phone_device_refresh_cb (GpmPhone *phone, guint idx, GpmEngine *engine) + static void + gpm_engine_init (GpmEngine *engine) + { +- ++#if UP_CHECK_VERSION(0, 99, 0) ++ GPtrArray *array = NULL; ++ guint i; ++#endif + engine->priv = GPM_ENGINE_GET_PRIVATE (engine); + + engine->priv->array = g_ptr_array_new_with_free_func (g_object_unref); +@@ -1012,8 +1042,13 @@ gpm_engine_init (GpmEngine *engine) + G_CALLBACK (gpm_engine_device_added_cb), engine); + g_signal_connect (engine->priv->client, "device-removed", + G_CALLBACK (gpm_engine_device_removed_cb), engine); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (engine->priv->client, "notify", ++ G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#else + g_signal_connect (engine->priv->client, "device-changed", + G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#endif + + engine->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); + g_signal_connect (engine->priv->settings, "changed", +@@ -1027,6 +1062,18 @@ gpm_engine_init (GpmEngine *engine) + g_signal_connect (engine->priv->phone, "device-refresh", + G_CALLBACK (phone_device_refresh_cb), engine); + ++#if UP_CHECK_VERSION(0, 99, 0) ++ /* coldplug */ ++ array = up_client_get_devices(engine->priv->client); ++ if (array) { ++ for (i = 0; i < array->len; i++) { ++ UpDevice *device = g_ptr_array_index (array, i); ++ gpm_engine_device_added_cb(engine->priv->client, device, engine); ++ } ++ g_ptr_array_free (array, TRUE); ++ } ++#endif ++ + /* create a fake virtual composite battery */ + engine->priv->battery_composite = up_device_new (); + g_object_set (engine->priv->battery_composite, +diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c +index a439e94..3a0f6e6 100644 +--- a/src/gpm-kbd-backlight.c ++++ b/src/gpm-kbd-backlight.c +@@ -486,6 +486,9 @@ gpm_kbd_backlight_control_resume_cb (GpmControl *control, + **/ + static void + gpm_kbd_backlight_client_changed_cb (UpClient *client, ++#if UP_CHECK_VERSION(0, 99, 0) ++ GParamSpec *pspec, ++#endif + GpmKbdBacklight *backlight) + { + gpm_kbd_backlight_evaluate_power_source_and_set (backlight); +@@ -755,8 +758,13 @@ gpm_kbd_backlight_init (GpmKbdBacklight *backlight) + + /* Use upower for ac changed signal */ + backlight->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (backlight->priv->client, "notify", ++ G_CALLBACK (gpm_kbd_backlight_client_changed_cb), backlight); ++#else + g_signal_connect (backlight->priv->client, "changed", + G_CALLBACK (gpm_kbd_backlight_client_changed_cb), backlight); ++#endif + + backlight->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); + //g_signal_connect (backlight->priv->settings, "changed", G_CALLBACK (gpm_settings_key_changed_cb), backlight); +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index c4d0530..df84cac 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -971,7 +971,11 @@ gpm_manager_get_spindown_timeout (GpmManager *manager) + * gpm_manager_client_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_manager_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmManager *manager) ++#else + gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager) ++#endif + { + gboolean event_when_closed; + gint timeout; +@@ -1853,8 +1857,13 @@ gpm_manager_init (GpmManager *manager) + g_signal_connect (manager->priv->settings, "changed", + G_CALLBACK (gpm_manager_settings_changed_cb), manager); + manager->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (manager->priv->client, "notify", ++ G_CALLBACK (gpm_manager_client_changed_cb), manager); ++#else + g_signal_connect (manager->priv->client, "changed", + G_CALLBACK (gpm_manager_client_changed_cb), manager); ++#endif + + /* use libmatenotify */ + notify_init (GPM_NAME); +diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c +index 7a2662d..6abb792 100644 +--- a/src/gpm-prefs-core.c ++++ b/src/gpm-prefs-core.c +@@ -811,7 +811,9 @@ gpm_prefs_init (GpmPrefs *prefs) + UpDevice *device; + UpDeviceKind kind; + GpmBrightness *brightness; ++#if !UP_CHECK_VERSION(0, 99, 0) + gboolean ret; ++#endif + guint i; + + GDBusProxy *proxy; +@@ -897,9 +899,11 @@ gpm_prefs_init (GpmPrefs *prefs) + else { + /* are we allowed to shutdown? */ + egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL); ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get values from UpClient */ + prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client); + prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client); ++#endif + } + + if (LOGIND_RUNNING()) { +@@ -953,14 +957,14 @@ gpm_prefs_init (GpmPrefs *prefs) + brightness = gpm_brightness_new (); + prefs->priv->has_lcd = gpm_brightness_has_hw (brightness); + g_object_unref (brightness); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get device list */ + ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error); + if (!ret) { + egg_warning ("failed to get device list: %s", error->message); + g_error_free (error); + } +- ++#endif + devices = up_client_get_devices (prefs->priv->client); + for (i=0; i<devices->len; i++) { + device = g_ptr_array_index (devices, i); +diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c +index 98b5632..13489dc 100644 +--- a/src/gpm-statistics.c ++++ b/src/gpm-statistics.c +@@ -1236,6 +1236,12 @@ gpm_stats_device_added_cb (UpClient *client, UpDevice *device, gpointer user_dat + * gpm_stats_device_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_stats_device_changed_cb (UpClient *client, GParamSpec *pspec, gpointer user_data) ++{ ++ gpm_stats_button_update_ui(); ++} ++#else + gpm_stats_device_changed_cb (UpClient *client, UpDevice *device, gpointer user_data) + { + const gchar *object_path; +@@ -1246,6 +1252,7 @@ gpm_stats_device_changed_cb (UpClient *client, UpDevice *device, gpointer user_d + if (g_strcmp0 (current_device, object_path) == 0) + gpm_stats_update_info_data (device); + } ++#endif + + /** + * gpm_stats_device_removed_cb: +@@ -1794,11 +1801,12 @@ main (int argc, char *argv[]) + + wakeups = up_wakeups_new (); + g_signal_connect (wakeups, "data-changed", G_CALLBACK (gpm_stats_data_changed_cb), NULL); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* coldplug */ + ret = up_client_enumerate_devices_sync (client, NULL, NULL); + if (!ret) + goto out; ++#endif + devices = up_client_get_devices (client); + + /* add devices in visually pleasing order */ +@@ -1814,7 +1822,11 @@ main (int argc, char *argv[]) + /* connect now the coldplug is done */ + g_signal_connect (client, "device-added", G_CALLBACK (gpm_stats_device_added_cb), NULL); + g_signal_connect (client, "device-removed", G_CALLBACK (gpm_stats_device_removed_cb), NULL); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (client, "notify", G_CALLBACK (gpm_stats_device_changed_cb), NULL); ++#else + g_signal_connect (client, "device-changed", G_CALLBACK (gpm_stats_device_changed_cb), NULL); ++#endif + + /* set current device */ + if (devices->len > 0) { +@@ -1854,8 +1866,9 @@ main (int argc, char *argv[]) + gtk_widget_show (widget); + + gtk_main (); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + out: ++#endif + g_object_unref (settings); + g_object_unref (client); + g_object_unref (wakeups); + diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-remove-battery-recall-logic.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-remove-battery-recall-logic.patch new file mode 100644 index 000000000000..6d462b937ce7 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.8.0-r1-remove-battery-recall-logic.patch @@ -0,0 +1,263 @@ +diff --git a/data/org.mate.power-manager.gschema.xml.in b/data/org.mate.power-manager.gschema.xml.in +index adecce0..ca009b5 100644 +--- a/data/org.mate.power-manager.gschema.xml.in ++++ b/data/org.mate.power-manager.gschema.xml.in +@@ -211,11 +211,6 @@ + <_summary>Seconds of inactivity to spin down when on battery</_summary> + <_description>The number of seconds of inactivity to spin down the disks when on battery power.</_description> + </key> +- <key name="notify-perhaps-recall" type="b"> +- <default>true</default> +- <_summary>If we should show the recalled battery warning for a broken battery</_summary> +- <_description>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</_description> +- </key> + <key name="notify-low-capacity" type="b"> + <default>true</default> + <_summary>If we should show the low capacity warning for a broken battery</_summary> +diff --git a/src/gpm-common.h b/src/gpm-common.h +index ef20f88..303bdd1 100644 +--- a/src/gpm-common.h ++++ b/src/gpm-common.h +@@ -98,7 +98,6 @@ G_BEGIN_DECLS + #define GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT "spindown-timeout-battery" + + /* notify */ +-#define GPM_SETTINGS_NOTIFY_PERHAPS_RECALL "notify-perhaps-recall" + #define GPM_SETTINGS_NOTIFY_LOW_CAPACITY "notify-low-capacity" + #define GPM_SETTINGS_NOTIFY_DISCHARGING "notify-discharging" + #define GPM_SETTINGS_NOTIFY_FULLY_CHARGED "notify-fully-charged" +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index 0f9d0c1..96a043e 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -72,7 +72,6 @@ enum { + CHARGE_ACTION, + DISCHARGING, + LOW_CAPACITY, +- PERHAPS_RECALL, + LAST_SIGNAL + }; + +@@ -761,42 +760,6 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + } + + /** +- * gpm_engine_check_recall: +- **/ +-static gboolean +-gpm_engine_check_recall (GpmEngine *engine, UpDevice *device) +-{ +- UpDeviceKind kind; +- gboolean recall_notice = FALSE; +- gchar *recall_vendor = NULL; +- gchar *recall_url = NULL; +- +- /* get device properties */ +- g_object_get (device, +- "kind", &kind, +- "recall-notice", &recall_notice, +- "recall-vendor", &recall_vendor, +- "recall-url", &recall_url, +- NULL); +- +- /* not battery */ +- if (kind != UP_DEVICE_KIND_BATTERY) +- goto out; +- +- /* no recall data */ +- if (!recall_notice) +- goto out; +- +- /* emit signal for manager */ +- egg_debug ("** EMIT: perhaps-recall"); +- g_signal_emit (engine, signals [PERHAPS_RECALL], 0, device, recall_vendor, recall_url); +-out: +- g_free (recall_vendor); +- g_free (recall_url); +- return recall_notice; +-} +- +-/** + * gpm_engine_coldplug_idle_cb: + **/ + static gboolean +@@ -829,7 +792,6 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + for (i=0;i<array->len;i++) { + device = g_ptr_array_index (array, i); + gpm_engine_device_add (engine, device); +- gpm_engine_check_recall (engine, device); + } + out: + if (array != NULL) +@@ -846,7 +808,6 @@ gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engin + { + /* add to list */ + g_ptr_array_add (engine->priv->array, g_object_ref (device)); +- gpm_engine_check_recall (engine, device); + + gpm_engine_recalculate_state (engine); + } +@@ -1134,14 +1095,6 @@ gpm_engine_class_init (GpmEngineClass *klass) + G_STRUCT_OFFSET (GpmEngineClass, low_capacity), + NULL, NULL, g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); +- signals [PERHAPS_RECALL] = +- g_signal_new ("perhaps-recall", +- G_TYPE_FROM_CLASS (object_class), +- G_SIGNAL_RUN_LAST, +- G_STRUCT_OFFSET (GpmEngineClass, perhaps_recall), +- NULL, NULL, gpm_marshal_VOID__POINTER_STRING_STRING, +- G_TYPE_NONE, +- 3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); + signals [FULLY_CHARGED] = + g_signal_new ("fully-charged", + G_TYPE_FROM_CLASS (object_class), +diff --git a/src/gpm-engine.h b/src/gpm-engine.h +index be1ccd6..43f8956 100644 +--- a/src/gpm-engine.h ++++ b/src/gpm-engine.h +@@ -49,10 +49,6 @@ typedef struct + gchar *icon); + void (* summary_changed) (GpmEngine *engine, + gchar *status); +- void (* perhaps_recall) (GpmEngine *engine, +- UpDevice *device, +- const gchar *oem_vendor, +- const gchar *website); + void (* low_capacity) (GpmEngine *engine, + UpDevice *device); + void (* charge_low) (GpmEngine *engine, +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index 6ca9dea..c4d0530 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -68,7 +68,6 @@ + static void gpm_manager_finalize (GObject *object); + + #define GPM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_MANAGER, GpmManagerPrivate)) +-#define GPM_MANAGER_RECALL_DELAY 30 /* seconds */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_NEVER 0 /* ms */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_SHORT 10 * 1000 /* ms */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_LONG 30 * 1000 /* ms */ +@@ -1092,111 +1091,6 @@ gpm_manager_settings_changed_cb (GSettings *settings, const gchar *key, GpmManag + } + + /** +- * gpm_manager_perhaps_recall_response_cb: +- */ +-static void +-gpm_manager_perhaps_recall_response_cb (GtkDialog *dialog, gint response_id, GpmManager *manager) +-{ +- GdkScreen *screen; +- GtkWidget *dialog_error; +- GError *error = NULL; +- gboolean ret; +- const gchar *website; +- +- /* don't show this again */ +- if (response_id == GTK_RESPONSE_CANCEL) { +- g_settings_set_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL, FALSE); +- goto out; +- } +- +- /* visit recall website */ +- if (response_id == GTK_RESPONSE_OK) { +- screen = gdk_screen_get_default(); +- website = (const gchar *) g_object_get_data (G_OBJECT (manager), "recall-oem-website"); +- ret = gtk_show_uri (screen, website, gtk_get_current_event_time (), &error); +- if (!ret) { +- dialog_error = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, +- "Failed to show url %s", error->message); +- gtk_dialog_run (GTK_DIALOG (dialog_error)); +- g_error_free (error); +- } +- goto out; +- } +-out: +- gtk_widget_destroy (GTK_WIDGET (dialog)); +- return; +-} +- +-/** +- * gpm_manager_perhaps_recall_delay_cb: +- */ +-static gboolean +-gpm_manager_perhaps_recall_delay_cb (GpmManager *manager) +-{ +- const gchar *oem_vendor; +- gchar *title = NULL; +- gchar *message = NULL; +- GtkWidget *dialog; +- +- oem_vendor = (const gchar *) g_object_get_data (G_OBJECT (manager), "recall-oem-vendor"); +- +- /* TRANSLATORS: the battery may be recalled by it's vendor */ +- title = g_strdup_printf ("%s: %s", GPM_NAME, _("Battery may be recalled")); +- message = g_strdup_printf (_("A battery in your computer may have been " +- "recalled by %s and you may be at risk.\n\n" +- "For more information visit the battery recall website."), oem_vendor); +- dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, +- "<span size='larger'><b>%s</b></span>", title); +- +- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message); +- +- /* TRANSLATORS: button text, visit the manufacturers recall website */ +- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Visit recall website"), GTK_RESPONSE_OK); +- +- /* TRANSLATORS: button text, do not show this bubble again */ +- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Do not show me this again"), GTK_RESPONSE_CANCEL); +- +- /* wait async for response */ +- gtk_widget_show (dialog); +- g_signal_connect (dialog, "response", G_CALLBACK (gpm_manager_perhaps_recall_response_cb), manager); +- +- g_free (title); +- g_free (message); +- +- /* never repeat */ +- return FALSE; +-} +- +-/** +- * gpm_manager_engine_perhaps_recall_cb: +- */ +-static void +-gpm_manager_engine_perhaps_recall_cb (GpmEngine *engine, UpDevice *device, gchar *oem_vendor, gchar *website, GpmManager *manager) +-{ +- gboolean ret; +- +- /* don't show when running under GDM */ +- if (g_getenv ("RUNNING_UNDER_GDM") != NULL) { +- egg_debug ("running under gdm, so no notification"); +- return; +- } +- +- /* already shown, and dismissed */ +- ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); +- if (!ret) { +- egg_debug ("Gsettings prevents notification: %s", GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); +- return; +- } +- +- g_object_set_data_full (G_OBJECT (manager), "recall-oem-vendor", (gpointer) g_strdup (oem_vendor), (GDestroyNotify) g_free); +- g_object_set_data_full (G_OBJECT (manager), "recall-oem-website", (gpointer) g_strdup (website), (GDestroyNotify) g_free); +- +- /* delay by a few seconds so the panel can load */ +- g_timeout_add_seconds (GPM_MANAGER_RECALL_DELAY, (GSourceFunc) gpm_manager_perhaps_recall_delay_cb, manager); +-} +- +-/** + * gpm_manager_engine_icon_changed_cb: + */ + static void +@@ -2023,8 +1917,6 @@ gpm_manager_init (GpmManager *manager) + gpm_manager_sync_policy_sleep (manager); + + manager->priv->engine = gpm_engine_new (); +- g_signal_connect (manager->priv->engine, "perhaps-recall", +- G_CALLBACK (gpm_manager_engine_perhaps_recall_cb), manager); + g_signal_connect (manager->priv->engine, "low-capacity", + G_CALLBACK (gpm_manager_engine_low_capacity_cb), manager); + g_signal_connect (manager->priv->engine, "icon-changed", + diff --git a/mate-extra/mate-power-manager/mate-power-manager-1.8.0-r1.ebuild b/mate-extra/mate-power-manager/mate-power-manager-1.8.0-r1.ebuild new file mode 100644 index 000000000000..7b887a377ceb --- /dev/null +++ b/mate-extra/mate-power-manager/mate-power-manager-1.8.0-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mate-extra/mate-power-manager/mate-power-manager-1.8.0-r1.ebuild,v 1.1 2014/05/06 17:44:47 tomwij Exp $ + +EAPI="5" + +GCONF_DEBUG="no" + +inherit autotools gnome2 versionator + +MATE_BRANCH="$(get_version_component_range 1-2)" + +SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz" +DESCRIPTION="A session daemon for MATE that makes it easy to manage your laptop or desktop system" +HOMEPAGE="http://mate-desktop.org" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="+applet gnome-keyring man policykit test unique" + +# Interactive testsuite. +RESTRICT="test" + +COMMON_DEPEND="app-text/rarian:0 + >=dev-libs/dbus-glib-0.70:0 + >=dev-libs/glib-2.13:2 + >=media-libs/libcanberra-0.10:0[gtk] + >=sys-apps/dbus-1:0 + >=sys-power/upower-0.9.1:0 + >=x11-apps/xrandr-1.2:0 + >=x11-libs/cairo-1:0 + >=x11-libs/gdk-pixbuf-2.11:2 + >=x11-libs/gtk+-2.17.7:2 + x11-libs/libX11:0 + x11-libs/libXext:0 + x11-libs/libXrandr:0 + >=x11-libs/libnotify-0.7:0 + x11-libs/pango:0 + applet? ( >=mate-base/mate-panel-1.6:0 ) + gnome-keyring? ( >=gnome-base/gnome-keyring-3:0 ) + unique? ( >=dev-libs/libunique-0.9.4:1 )" + +RDEPEND="${COMMON_DEPEND} + policykit? ( >=mate-extra/mate-polkit-1.6:0 )" + +DEPEND="${COMMON_DEPEND} + app-text/docbook-xml-dtd:4.3 + >=app-text/scrollkeeper-dtd-1:1.0 + app-text/yelp-tools:0 + >=dev-util/intltool-0.35:* + x11-proto/randrproto:0 + >=x11-proto/xproto-7.0.15:0 + sys-devel/gettext:* + virtual/pkgconfig:* + man? ( app-text/docbook-sgml-utils:0 + >=app-text/docbook-sgml-dtd-4.3 )" + +src_prepare() { + # Upstreamed patches + epatch "${FILESDIR}"/${PF}-dbus_interface_keyboard_backlight_controls.patch + epatch "${FILESDIR}"/${PF}-avoid-levels-is-0-warning.patch + + # Upower 1.0 fixes + # https://github.com/mate-desktop/mate-power-manager/commit/220a4e0 + epatch "${FILESDIR}"/${PF}-remove-battery-recall-logic.patch + # https://github.com/mate-desktop/mate-power-manager/commit/d59f4b8 + epatch "${FILESDIR}"/${PF}-port-to-upower-0.99-API.patch + # https://github.com/mate-desktop/mate-power-manager/commit/1fb2870 + epatch "${FILESDIR}"/${PF}-improve-UPower1-support.patch + # https://github.com/mate-desktop/mate-power-manager/commit/8f734c6 + epatch "${FILESDIR}"/${PF}-other-round-of-fixes-for-UPower-0.99-API-changes.patch + + eautoreconf + gnome2_src_prepare + + # This needs to be after eautoreconf to prevent problems like bug #356277 + # Remove the docbook2man rules here since it's not handled by a proper + # parameter in configure.in. + if ! use man; then + sed -e 's:@HAVE_DOCBOOK2MAN_TRUE@.*::' -i man/Makefile.in \ + || die "docbook sed failed" + fi +} + +src_configure() { + gnome2_src_configure \ + $(use_enable applet applets) \ + $(use_enable test tests) \ + $(use_enable unique) \ + $(use_with gnome-keyring keyring) \ + --enable-compile-warnings=minimum \ + --enable-unique \ + --with-gtk=2.0 +} + +DOCS="AUTHORS HACKING NEWS README TODO" + +src_test() { + unset DBUS_SESSION_BUS_ADDRESS + + dbus-launch Xemake check || die "Test phase failed" +} |