From a7497869e9014f6c7e13d7c1f2bb929b738fef38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 28 Jun 2011 16:03:17 +0100 Subject: Remove power service for now We are going to use gnome-settings-daemon directly --- src/indicator-power.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/indicator-power.c') diff --git a/src/indicator-power.c b/src/indicator-power.c index f54f689..8685d80 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -34,16 +34,7 @@ with this program. If not, see . #include #include #include - -/* DBusMenu */ #include -#if GTK_CHECK_VERSION(3, 0, 0) -#include -#include -#else -#include -#include -#endif #include "dbus-shared-names.h" @@ -79,8 +70,7 @@ struct _IndicatorPowerPrivate { IndicatorServiceManager *service; - DbusmenuGtkMenu *menu; - DbusmenuGtkClient *client; + GtkMenu *menu; GtkLabel *label; GtkImage *status_image; @@ -202,7 +192,6 @@ indicator_power_init (IndicatorPower *self) /* Init variables */ priv->service = NULL; priv->menu = NULL; - priv->client = NULL; /* Do stuff with them */ priv->service = indicator_service_manager_new_version (INDICATOR_POWER_DBUS_NAME, @@ -214,16 +203,10 @@ indicator_power_init (IndicatorPower *self) self); */ - /* Builds the dbusmenu for the service. */ - priv->menu = dbusmenu_gtkmenu_new (INDICATOR_POWER_DBUS_NAME, - INDICATOR_POWER_DBUS_OBJECT); - priv->client = dbusmenu_gtkmenu_get_client (priv->menu); + priv->menu = GTK_MENU (gtk_menu_new ()); + gtk_menu_set_title (priv->menu, _("Power")); -/* - dbusmenu_client_add_type_handler (DBUSMENU_CLIENT (client), - DBUSMENU_ENTRY_MENUITEM_TYPE, - new_entry_item); -*/ + gtk_menu_popup (priv->menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ()); priv->service_proxy_cancel = g_cancellable_new(); -- cgit v1.2.3