[gnome-control-center] power: Don't print a message to .xsession-errors if it's not an error
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] power: Don't print a message to .xsession-errors if it's not an error
- Date: Thu, 1 Sep 2011 13:30:13 +0000 (UTC)
commit d9222bd5b52ed80cb6fb02fe729cae30604b3bc1
Author: Richard Hughes <richard hughsie com>
Date: Thu Sep 1 14:11:55 2011 +0100
power: Don't print a message to .xsession-errors if it's not an error
panels/power/cc-power-panel.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 6ff3e4c..e7d3efb 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -214,7 +214,8 @@ get_primary_device_cb (GObject *source_object, GAsyncResult *res, gpointer user_
result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error);
if (result == NULL)
{
- g_printerr ("Error getting primary device: %s\n", error->message);
+ if (g_strstr_len (error->message, -1, "no primary device") == NULL)
+ g_printerr ("Error getting primary device: %s\n", error->message);
g_error_free (error);
gtk_widget_hide (status_box);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]