#ifdef ENABLE_DEBUG
TpDebugSender *debug_sender;
#endif
+
+ gboolean shell_running;
};
void (*dispose) (GObject *) =
G_OBJECT_CLASS (empathy_app_parent_class)->dispose;
- if (self->presence_mgr != NULL)
+ /* Only set our presence to offline when exiting if GNOME Shell is not
+ * running */
+ if (self->presence_mgr != NULL &&
+ !self->shell_running)
{
empathy_presence_manager_set_state (self->presence_mgr,
TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
GObject *weak_object)
{
EmpathyApp *self = (EmpathyApp *) weak_object;
- gboolean shell_running = FALSE;
guint i;
if (error != NULL)
{
if (!tp_strdiff (names[i], GNOME_SHELL_BUS_NAME))
{
- shell_running = TRUE;
+ self->shell_running = TRUE;
break;
}
}
out:
- if (shell_running)
+ if (self->shell_running)
{
DEBUG ("GNOMES Shell is running, don't create status icon");
}