gnome-docker r12 - trunk/src
- From: hmacht svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-docker r12 - trunk/src
- Date: Wed, 14 May 2008 14:27:29 +0100 (BST)
Author: hmacht
Date: Wed May 14 13:27:29 2008
New Revision: 12
URL: http://svn.gnome.org/viewvc/gnome-docker?rev=12&view=rev
Log:
error checking and tooltip support
Modified:
trunk/src/gd-dbus.c
trunk/src/gd-tray.h
trunk/src/gd-xrandr.c
Modified: trunk/src/gd-dbus.c
==============================================================================
--- trunk/src/gd-dbus.c (original)
+++ trunk/src/gd-dbus.c Wed May 14 13:27:29 2008
@@ -111,7 +111,7 @@
gd_warn("Empty message member for path %s", path);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
- printf("message with path: %s\n", path);
+
if (!g_strrstr(path, "platform_dock"))
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -150,20 +150,24 @@
if (!strcmp(key, "info.docked")) {
int docked;
- liblazy_hal_get_property_bool(path, "info.docked", &docked);
+ if (liblazy_hal_get_property_bool(path, "info.docked", &docked)) {
+ gd_error("Could not get dock status from DBusMessage");
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
if (docked) {
gd_notify_info(_("Docked"),
_("Your computer has been docked"));
- gd_tray_icon_set_visible(TRUE);
+ gd_tray_icon_update_status(TRUE);
} else {
gd_notify_info(_("Undocked"),
_("Your computer has been undocked"));
- gd_tray_icon_set_visible(FALSE);
+ gd_tray_icon_update_status(FALSE);
}
gd_xrandr_adjust_displays();
}
- gd_info("Received: key: %s , removed: %d , added: %d\n",
+ gd_info("Received: key: %s , removed: %d , added: %d",
key, removed,added);
}
Modified: trunk/src/gd-tray.h
==============================================================================
--- trunk/src/gd-tray.h (original)
+++ trunk/src/gd-tray.h Wed May 14 13:27:29 2008
@@ -14,4 +14,6 @@
void gd_tray_icon_set_visible(gboolean visible);
+void gd_tray_icon_update_status(gboolean docked);
+
#endif /* GNOME_DOCKER_TRAY_H */
Modified: trunk/src/gd-xrandr.c
==============================================================================
--- trunk/src/gd-xrandr.c (original)
+++ trunk/src/gd-xrandr.c Wed May 14 13:27:29 2008
@@ -44,7 +44,7 @@
ret_code = WEXITSTATUS(status);
}
- gd_info("xrandr returned with code: %d\n", ret_code);
+ gd_info("xrandr returned with code: %d", ret_code);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]