gnome-power-manager r2744 - in branches/gnome-2-22: . src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r2744 - in branches/gnome-2-22: . src
- Date: Wed, 26 Mar 2008 09:11:31 +0000 (GMT)
Author: rhughes
Date: Wed Mar 26 09:11:31 2008
New Revision: 2744
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=2744&view=rev
Log:
2008-03-19 Richard Hughes <richard hughsie com>
* src/gpm-brightness-kbd.c: (gpm_brightness_kbd_get_hw):
GetBrightness returns a INT not a UINT, so fix the keyboard brightness.
Patch by Sjoerd Simons <sjoerd luon net>, many thanks.
Fixes #523152
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/src/gpm-brightness-kbd.c
Modified: branches/gnome-2-22/src/gpm-brightness-kbd.c
==============================================================================
--- branches/gnome-2-22/src/gpm-brightness-kbd.c (original)
+++ branches/gnome-2-22/src/gpm-brightness-kbd.c Wed Mar 26 09:11:31 2008
@@ -93,6 +93,7 @@
GError *error = NULL;
gboolean ret;
DBusGProxy *proxy;
+ gint brightness_level;
g_return_val_if_fail (brightness != NULL, FALSE);
g_return_val_if_fail (GPM_IS_BRIGHTNESS_KBD (brightness), FALSE);
@@ -105,7 +106,7 @@
ret = dbus_g_proxy_call (proxy, "GetBrightness", &error,
G_TYPE_INVALID,
- G_TYPE_UINT, brightness_level_hw,
+ G_TYPE_INT, &brightness_level,
G_TYPE_INVALID);
if (error) {
gpm_debug ("ERROR: %s", error->message);
@@ -115,7 +116,9 @@
/* abort as the DBUS method failed */
gpm_warning ("GetBrightness failed!");
return FALSE;
- }
+ }
+
+ *brightness_level_hw = (guint)brightness_level;
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]