From 3bfa1c305fbba42c48ed7338e5064745bb122a91 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 22 Jul 2011 11:59:15 +0100 Subject: suspend plugged back in plus both it and hibernate menuitems should now be sensitive to changes coming from upower --- src/device-menu-mgr.c | 40 ++++++++++++++++++++++++++-------------- src/session-service.c | 4 ++-- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index b13b2fa..22e970f 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -58,7 +58,7 @@ static DBusGProxyCall * suspend_call = NULL; static DBusGProxyCall * hibernate_call = NULL; static DbusmenuMenuitem * hibernate_mi = NULL; -//static DbusmenuMenuitem * suspend_mi = NULL; +static DbusmenuMenuitem * suspend_mi = NULL; static DbusmenuMenuitem * logout_mi = NULL; static DbusmenuMenuitem * restart_mi = NULL; static DbusmenuMenuitem * shutdown_mi = NULL; @@ -86,11 +86,11 @@ static void machine_sleep_from_hibernate (DbusmenuMenuitem * mi, guint timestamp, gpointer userdata); -/*static void +static void machine_sleep_from_suspend (DbusmenuMenuitem * mi, guint timestamp, gpointer userdata); -*/ + G_DEFINE_TYPE (DeviceMenuMgr, device_menu_mgr, G_TYPE_OBJECT); static void @@ -106,7 +106,6 @@ device_menu_mgr_init (DeviceMenuMgr *self) static void device_menu_mgr_finalize (GObject *object) { - /* TODO: Add deinitalization code here */ G_OBJECT_CLASS (device_menu_mgr_parent_class)->finalize (object); } @@ -115,7 +114,6 @@ static void device_menu_mgr_class_init (DeviceMenuMgrClass *klass) { GObjectClass* object_class = G_OBJECT_CLASS (klass); - //GObjectClass* parent_class = G_OBJECT_CLASS (klass); object_class->finalize = device_menu_mgr_finalize; } @@ -187,15 +185,14 @@ sleep_response (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data) return; } - -/*static void +static void machine_sleep_from_suspend (DbusmenuMenuitem * mi, guint timestamp, gpointer userdata) { DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); machine_sleep_with_context (self, "Suspend"); -}*/ +} static void machine_sleep_from_hibernate (DbusmenuMenuitem * mi, @@ -229,9 +226,6 @@ machine_sleep_with_context (DeviceMenuMgr* self, gchar* type) } /* A response to getting the suspend property */ -// TODO -// Is this needed anymore - static void suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) { @@ -252,14 +246,14 @@ suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) if (local_can_suspend != can_suspend) { can_suspend = local_can_suspend; // TODO figure out what needs updating on the menu + // And add or remove it but just don't rebuild the whole menu + // a waste device_menu_mgr_rebuild_items(self); } return; } /* Response to getting the hibernate property */ -// TODO -// Is this needed anymore static void hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) { @@ -630,6 +624,18 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout"); + if (can_suspend && allow_suspend) { + suspend_mi = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set (suspend_mi, + DBUSMENU_MENUITEM_PROP_LABEL, + _("Suspend")); + dbusmenu_menuitem_child_append (self->root_item, suspend_mi); + g_signal_connect( G_OBJECT(suspend_mi), + DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(machine_sleep_from_suspend), + self); + } + if (can_hibernate && allow_hibernate) { hibernate_mi = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (hibernate_mi, @@ -672,7 +678,13 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) static void device_menu_mgr_rebuild_items (DeviceMenuMgr* self) { -} + dbusmenu_menuitem_property_set_bool (hibernate_mi, + DBUSMENU_MENUITEM_PROP_VISIBLE, + can_hibernate && allow_hibernate); + dbusmenu_menuitem_property_set_bool (suspend_mi, + DBUSMENU_MENUITEM_PROP_VISIBLE, + can_suspend && allow_suspend); +} /* When the directory changes we need to figure out how our menu item should look. */ diff --git a/src/session-service.c b/src/session-service.c index bb473e9..74fe5b0 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -71,11 +71,11 @@ static GMainLoop * mainloop = NULL; void service_shutdown (IndicatorService * service, gpointer user_data) { - if (mainloop != NULL) { + /*if (mainloop != NULL) { g_debug("Service shutdown"); g_main_loop_quit(mainloop); } - return; + return;*/ } /* Main, is well, main. It brings everything up and throws -- cgit v1.2.3 From bc829db4eb65f7373b2ff13cd5dc8ce96a469af3 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 22 Jul 2011 13:37:16 +0100 Subject: transaction object now properly disposed of --- src/apt-transaction.c | 40 +++++++++++++++++++++++++++++++++++----- src/apt-watcher.c | 13 +++++++++---- src/dbus-shared-names.h | 3 +-- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/apt-transaction.c b/src/apt-transaction.c index e613507..4f800ad 100644 --- a/src/apt-transaction.c +++ b/src/apt-transaction.c @@ -54,14 +54,16 @@ apt_transaction_init (AptTransaction *self) { self->proxy = NULL; self->id = NULL; - } static void apt_transaction_finalize (GObject *object) { - /* TODO: Add deinitalization code here */ AptTransaction* self = APT_TRANSACTION(object); + g_signal_handlers_disconnect_by_func (G_OBJECT (self->proxy), + G_CALLBACK (apt_transaction_receive_signal), + self); + if (self->proxy != NULL){ g_object_unref (self->proxy); self->proxy = NULL; @@ -91,7 +93,7 @@ apt_transaction_investigate(AptTransaction* self) GError * error = NULL; self->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + G_DBUS_PROXY_FLAGS_NONE, NULL, /* GDBusInterfaceInfo */ "org.debian.apt", self->id, @@ -127,14 +129,42 @@ apt_transaction_receive_signal (GDBusProxy * proxy, gpointer user_data) { g_return_if_fail (APT_IS_TRANSACTION (user_data)); - AptTransaction* self = APT_TRANSACTION(user_data); - + AptTransaction* self = APT_TRANSACTION(user_data); + + GVariant* role = g_dbus_proxy_get_cached_property (self->proxy, + "Role"); + g_debug ("Role variant type = %s", g_variant_get_type_string (role)); + if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){ + gchar* current_role = NULL; + g_variant_get (role, "s", ¤t_role); + g_debug ("Current transaction role = %s", current_role); + if (g_strcmp0 (current_role, "role-commit-packages") == 0 || + g_strcmp0 (current_role, "role-upgrade-system") == 0){ + g_debug ("UPGRADE IN PROGRESS"); + g_signal_emit (self, + signals[UPDATE], + 0, + UPGRADE_IN_PROGRESS); + // Return from here because an upgrade is in progress so + // any other information is irrelevant. + return; + } + } + if (g_strcmp0(signal_name, "PropertyChanged") == 0) { gchar* prop_name= NULL; GVariant* value = NULL; g_variant_get (parameters, "(sv)", &prop_name, &value); + g_debug ("transaction prop update - prop = %s", prop_name); + + if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING) == TRUE){ + gchar* key = NULL; + g_variant_get (value, "s", &key); + g_debug ("transaction prop update - value = %s", key); + } + if (g_strcmp0 (prop_name, "Dependencies") == 0){ diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 546c733..c7238ec 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -235,18 +235,23 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans, AptState state = (AptState)update; - if ( state == UP_TO_DATE ){ + if (state == UP_TO_DATE){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, _("Software Up to Date")); } - else if ( state == UPDATES_AVAILABLE ){ + else if (state == UPDATES_AVAILABLE){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, _("Updates Available…")); + } + else if (state == UPGRADE_IN_PROGRESS){ + dbusmenu_menuitem_property_set (self->apt_item, + DBUSMENU_MENUITEM_PROP_LABEL, + _("Updates Installing…")); } self->current_state = state; - g_object_unref (self->current_transaction); + g_object_unref (G_OBJECT(self->current_transaction)); self->current_transaction = NULL; } @@ -255,7 +260,7 @@ apt_watcher_manage_transactions (AptWatcher* self, gchar* transaction_id) { if (self->current_transaction == NULL){ self->current_transaction = apt_transaction_new (transaction_id); - g_object_ref (self->current_transaction); + //g_object_ref (self->current_transaction); g_signal_connect (G_OBJECT(self->current_transaction), "state-update", G_CALLBACK(apt_watcher_transaction_state_update_cb), self); diff --git a/src/dbus-shared-names.h b/src/dbus-shared-names.h index 13ad227..7c6c14f 100644 --- a/src/dbus-shared-names.h +++ b/src/dbus-shared-names.h @@ -24,8 +24,7 @@ typedef enum { UP_TO_DATE, CHECKING_FOR_UPDATES, UPDATES_AVAILABLE, - FINISHED_CHECKING, - UPDATING, + UPGRADE_IN_PROGRESS, RESTART_NEEDED }AptState; -- cgit v1.2.3 From 13452b541f9aabf229f16a029a4c823c76e2b1f0 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 22 Jul 2011 15:36:59 +0100 Subject: apt progress now reflected dynamically in the menu --- src/apt-transaction.c | 107 +++++++++++++++++++++++++----------------------- src/apt-transaction.h | 5 ++- src/apt-watcher.c | 60 +++++++++++++++++++-------- src/dbus-shared-names.h | 13 ++++-- src/device-menu-mgr.c | 14 ++++++- src/session-service.c | 4 +- 6 files changed, 123 insertions(+), 80 deletions(-) diff --git a/src/apt-transaction.c b/src/apt-transaction.c index 4f800ad..61868a3 100644 --- a/src/apt-transaction.c +++ b/src/apt-transaction.c @@ -34,10 +34,10 @@ static void apt_transaction_receive_signal (GDBusProxy * proxy, struct _AptTransaction { - GObject parent_instance; - GDBusProxy * proxy; - gchar* id; - AptState current_state; + GObject parent_instance; + GDBusProxy * proxy; + gchar* id; + TransactionType type; }; enum { @@ -63,11 +63,10 @@ apt_transaction_finalize (GObject *object) g_signal_handlers_disconnect_by_func (G_OBJECT (self->proxy), G_CALLBACK (apt_transaction_receive_signal), self); - if (self->proxy != NULL){ g_object_unref (self->proxy); self->proxy = NULL; - } + } g_free (self->id); G_OBJECT_CLASS (apt_transaction_parent_class)->finalize (object); } @@ -111,14 +110,16 @@ apt_transaction_investigate(AptTransaction* self) G_CALLBACK (apt_transaction_receive_signal), self); - g_dbus_proxy_call (self->proxy, - "Simulate", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - apt_transaction_simulate_transaction_cb, - self); + if (self->type == SIMULATION){ + g_dbus_proxy_call (self->proxy, + "Simulate", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + apt_transaction_simulate_transaction_cb, + self); + } } static void @@ -130,33 +131,13 @@ apt_transaction_receive_signal (GDBusProxy * proxy, { g_return_if_fail (APT_IS_TRANSACTION (user_data)); AptTransaction* self = APT_TRANSACTION(user_data); + AptState current_state = UP_TO_DATE; - GVariant* role = g_dbus_proxy_get_cached_property (self->proxy, - "Role"); - g_debug ("Role variant type = %s", g_variant_get_type_string (role)); - if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){ - gchar* current_role = NULL; - g_variant_get (role, "s", ¤t_role); - g_debug ("Current transaction role = %s", current_role); - if (g_strcmp0 (current_role, "role-commit-packages") == 0 || - g_strcmp0 (current_role, "role-upgrade-system") == 0){ - g_debug ("UPGRADE IN PROGRESS"); - g_signal_emit (self, - signals[UPDATE], - 0, - UPGRADE_IN_PROGRESS); - // Return from here because an upgrade is in progress so - // any other information is irrelevant. - return; - } - } - - if (g_strcmp0(signal_name, "PropertyChanged") == 0) + if (g_strcmp0(signal_name, "PropertyChanged") == 0 && self->type == SIMULATION) { gchar* prop_name= NULL; GVariant* value = NULL; - g_variant_get (parameters, "(sv)", &prop_name, &value); - + g_variant_get (parameters, "(sv)", &prop_name, &value); g_debug ("transaction prop update - prop = %s", prop_name); if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING) == TRUE){ @@ -166,8 +147,7 @@ apt_transaction_receive_signal (GDBusProxy * proxy, } if (g_strcmp0 (prop_name, "Dependencies") == 0){ - - + gchar** install = NULL; gchar** reinstall = NULL; gchar** remove = NULL; @@ -177,8 +157,7 @@ apt_transaction_receive_signal (GDBusProxy * proxy, gchar** keep = NULL; g_variant_get (value, "(asasasasasasas)", &install, &reinstall, &remove, &purge, &upgrade, &downgrade, - &keep); - + &keep); //g_debug ("Seemed to uppack dependencies without any warnings"); //g_debug ("Upgrade quantity : %u", g_strv_length(upgrade)); gboolean upgrade_needed = (g_strv_length(upgrade) > 0) || @@ -187,20 +166,39 @@ apt_transaction_receive_signal (GDBusProxy * proxy, (g_strv_length(remove) > 0) || (g_strv_length(purge) > 0); if (upgrade_needed == TRUE){ - g_signal_emit (self, - signals[UPDATE], - 0, - UPDATES_AVAILABLE); - + current_state = UPDATES_AVAILABLE; } else{ - g_signal_emit (self, - signals[UPDATE], - 0, - UP_TO_DATE); + current_state = UP_TO_DATE; + } + } + } + else if (g_strcmp0(signal_name, "PropertyChanged") == 0 && + self->type == REAL) + { + GVariant* role = g_dbus_proxy_get_cached_property (self->proxy, + "Role"); + if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){ + gchar* current_role = NULL; + g_variant_get (role, "s", ¤t_role); + g_debug ("Current transaction role = %s", current_role); + if (g_strcmp0 (current_role, "role-commit-packages") == 0 || + g_strcmp0 (current_role, "role-upgrade-system") == 0){ + g_debug ("UPGRADE IN PROGRESS"); + current_state = UPGRADE_IN_PROGRESS; } } + } + else if (g_strcmp0(signal_name, "Finished") == 0) + { + g_debug ("TRANSACTION Finished"); + current_state = FINISHED; } + // Finally send out the state update + g_signal_emit (self, + signals[UPDATE], + 0, + current_state); } static void @@ -209,18 +207,23 @@ apt_transaction_simulate_transaction_cb (GObject * obj, gpointer user_data) { GError * error = NULL; - if (error != NULL) { g_warning ("unable to complete the simulate call"); g_error_free (error); return; } } +TransactionType +apt_transaction_get_transaction_type (AptTransaction* self) +{ + return self->type; +} -AptTransaction* apt_transaction_new (gchar* transaction_id) +AptTransaction* apt_transaction_new (gchar* transaction_id, TransactionType t) { AptTransaction* tr = g_object_new (APT_TYPE_TRANSACTION, NULL); tr->id = transaction_id; + tr->type = t; g_debug ("Apt transaction new id = %s", tr->id); apt_transaction_investigate (tr); return tr; diff --git a/src/apt-transaction.h b/src/apt-transaction.h index dec62ef..9e4370d 100644 --- a/src/apt-transaction.h +++ b/src/apt-transaction.h @@ -21,6 +21,7 @@ with this program. If not, see . #define _APT_TRANSACTION_H_ #include +#include "dbus-shared-names.h" G_BEGIN_DECLS @@ -39,8 +40,8 @@ struct _AptTransactionClass GObjectClass parent_class; }; -AptTransaction* apt_transaction_new (gchar* transaction_id); - +AptTransaction* apt_transaction_new (gchar* transaction_id, TransactionType t); +TransactionType apt_transaction_get_transaction_type (AptTransaction* self); GType apt_transaction_get_type (void) G_GNUC_CONST; G_END_DECLS diff --git a/src/apt-watcher.c b/src/apt-watcher.c index c7238ec..285eb81 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -20,7 +20,6 @@ with this program. If not, see . #include #include #include "apt-watcher.h" -#include "dbus-shared-names.h" #include "apt-transaction.h" static guint watcher_id; @@ -238,33 +237,53 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans, if (state == UP_TO_DATE){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, - _("Software Up to Date")); + _("Software Up to Date")); + // Simulations don't send a finished signal for some reason + // Anyway from a simulation we just need one state update + // (updates available or not) + if (apt_transaction_get_transaction_type (self->current_transaction) + == SIMULATION){ + g_object_unref (G_OBJECT(self->current_transaction)); + self->current_transaction = NULL; + } } else if (state == UPDATES_AVAILABLE){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, _("Updates Available…")); + // Simulations don't send a finished signal for some reason + // Anyway from a simulation we just need one state update + // (updates available or not) + if (apt_transaction_get_transaction_type (self->current_transaction) + == SIMULATION){ + g_object_unref (G_OBJECT(self->current_transaction)); + self->current_transaction = NULL; + } } else if (state == UPGRADE_IN_PROGRESS){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, _("Updates Installing…")); } + else if (state == FINISHED){ + dbusmenu_menuitem_property_set (self->apt_item, + DBUSMENU_MENUITEM_PROP_LABEL, + _("Software Up to Date")); + g_object_unref (G_OBJECT(self->current_transaction)); + self->current_transaction = NULL; + } self->current_state = state; - g_object_unref (G_OBJECT(self->current_transaction)); - self->current_transaction = NULL; } static void apt_watcher_manage_transactions (AptWatcher* self, gchar* transaction_id) { if (self->current_transaction == NULL){ - self->current_transaction = apt_transaction_new (transaction_id); - //g_object_ref (self->current_transaction); + self->current_transaction = apt_transaction_new (transaction_id, SIMULATION); g_signal_connect (G_OBJECT(self->current_transaction), "state-update", G_CALLBACK(apt_watcher_transaction_state_update_cb), self); - } + } } // TODO - Ask MVO about this. @@ -284,17 +303,22 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, if (g_strcmp0(signal_name, "ActiveTransactionsChanged") == 0){ gchar* input = NULL; g_variant_get(value, "s", & input); - - g_debug ("Active Transactions signal - input is null = %i", input == NULL); - // TODO don't call on null terminated input - g_dbus_proxy_call (self->proxy, - "UpgradeSystem", - g_variant_new("(b)", TRUE), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - apt_watcher_upgrade_system_cb, - user_data); + if (g_str_has_prefix (input, "/org/debian/apt/transaction/") == TRUE){ + g_debug ("Active Transactions signal - input is null = %i", input == NULL); + + if (self->current_transaction != NULL) + { + g_object_unref (G_OBJECT(self->current_transaction)); + self->current_transaction = NULL; + } + + self->current_transaction = apt_transaction_new (input, REAL); + g_signal_connect (G_OBJECT(self->current_transaction), + "state-update", + G_CALLBACK(apt_watcher_transaction_state_update_cb), self); + + + } } g_variant_unref (parameters); } diff --git a/src/dbus-shared-names.h b/src/dbus-shared-names.h index 7c6c14f..2114332 100644 --- a/src/dbus-shared-names.h +++ b/src/dbus-shared-names.h @@ -20,17 +20,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifndef __DBUS_SHARED_NAMES_H__ +#define __DBUS_SHARED_NAMES_H__ + typedef enum { UP_TO_DATE, CHECKING_FOR_UPDATES, UPDATES_AVAILABLE, - UPGRADE_IN_PROGRESS, + UPGRADE_IN_PROGRESS, + FINISHED, RESTART_NEEDED }AptState; - -#ifndef __DBUS_SHARED_NAMES_H__ -#define __DBUS_SHARED_NAMES_H__ 1 +typedef enum { + SIMULATION, + REAL +}TransactionType; #define INDICATOR_USERS_DBUS_NAME INDICATOR_SESSION_DBUS_NAME #define INDICATOR_USERS_DBUS_OBJECT "/com/canonical/indicator/users/menu" diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index 22e970f..324b3f1 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -499,13 +499,13 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) login_settings_menuitem = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (login_settings_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, - _("Login Items...")); + _("Startup Applications...")); g_signal_connect (G_OBJECT(login_settings_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_session_properties), "login"); dbusmenu_menuitem_child_add_position(self->root_item, - login_settings_menuitem, + login_settings_menuitem, 3); software_updates_menuitem = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (software_updates_menuitem, @@ -555,6 +555,11 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) dbusmenu_menuitem_child_add_position (self->root_item, scanners_menuitem, 8); + //tmp + dbusmenu_menuitem_property_set_bool (scanners_menuitem, + DBUSMENU_MENUITEM_PROP_VISIBLE, + FALSE); + webcam_menuitem = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (webcam_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, @@ -566,6 +571,11 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) dbusmenu_menuitem_child_add_position (self->root_item, webcam_menuitem, 10); + //tmp + dbusmenu_menuitem_property_set_bool (webcam_menuitem, + DBUSMENU_MENUITEM_PROP_VISIBLE, + FALSE); + DbusmenuMenuitem * separator3 = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (separator3, DBUSMENU_MENUITEM_PROP_TYPE, diff --git a/src/session-service.c b/src/session-service.c index 74fe5b0..bb473e9 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -71,11 +71,11 @@ static GMainLoop * mainloop = NULL; void service_shutdown (IndicatorService * service, gpointer user_data) { - /*if (mainloop != NULL) { + if (mainloop != NULL) { g_debug("Service shutdown"); g_main_loop_quit(mainloop); } - return;*/ + return; } /* Main, is well, main. It brings everything up and throws -- cgit v1.2.3