[gnome-power-manager] Don't query the capabilities of the notification daemon



commit 487fb08873d425b4afd339ba2019916b99186e4e
Author: Chris Coulson <chrisccoulson googlemail com>
Date:   Wed Mar 17 10:49:34 2010 +0000

    Don't query the capabilities of the notification daemon
    
    The capabilities aren't used anywhere, so there is no need to query them

 src/gpm-manager.c |   33 ---------------------------------
 1 files changed, 0 insertions(+), 33 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 7815fa6..1dcc6ef 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -97,7 +97,6 @@ struct GpmManagerPrivate
 	gboolean		 on_battery;
 	gboolean		 just_resumed;
 	GtkStatusIcon		*status_icon;
-	gboolean		 supports_notification_actions;
 	NotifyNotification	*notification_general;
 	NotifyNotification	*notification_warning_low;
 	NotifyNotification	*notification_discharging;
@@ -1880,37 +1879,6 @@ gpm_manager_console_kit_active_changed_cb (EggConsoleKit *console, gboolean acti
 }
 
 /**
- * gpm_manager_supports_notification_actions:
- **/
-static gboolean
-gpm_manager_supports_notification_actions ()
-{
-	gboolean ret = FALSE;
-	GList *caps;
-	GList *c;
-
-	/* get capabilities from the server */
-	caps = notify_get_server_caps ();
-	if (caps == NULL) {
-		egg_warning ("failed to get capabilities of notification daemon");
-		goto out;
-	}
-
-	/* find the actions parameter */
-	for (c = caps; c != NULL; c = c->next) {
-		if (g_strcmp0 ((gchar*)c->data, "actions") == 0 ) {
-			ret = TRUE;
-			break;
-		}
-	}
-
-	g_list_foreach (caps, (GFunc)g_free, NULL);
-	g_list_free (caps);
-out:
-	return ret;
-}
-
-/**
  * gpm_manager_init:
  * @manager: This class instance
  **/
@@ -1957,7 +1925,6 @@ gpm_manager_init (GpmManager *manager)
 
 	/* use libnotify */
 	notify_init (GPM_NAME);
-	manager->priv->supports_notification_actions = gpm_manager_supports_notification_actions ();
 
 	/* watch gnome-power-manager keys */
 	gconf_client_add_dir (manager->priv->conf, GPM_CONF_DIR,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]