aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-30 18:10:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-30 18:18:26 +0800
commitadb1971f4779df5e8b77b8fe7550ec8455aac8c7 (patch)
tree406dcd4dadd8fb7a9ce0e69121fe836218fb49dd /src
parent5cdfd1e0d6c5df35f07530b9cdcdbd6c74d33247 (diff)
downloadgsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar.gz
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar.bz2
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar.lz
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar.xz
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.tar.zst
gsoc2013-empathy-adb1971f4779df5e8b77b8fe7550ec8455aac8c7.zip
Don't set presence to offline when Shell is running
https://bugzilla.gnome.org/show_bug.cgi?id=656632
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/empathy.c b/src/empathy.c
index ea0db5182..e99250f93 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -128,6 +128,8 @@ struct _EmpathyApp
#ifdef ENABLE_DEBUG
TpDebugSender *debug_sender;
#endif
+
+ gboolean shell_running;
};
@@ -140,7 +142,10 @@ empathy_app_dispose (GObject *object)
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);
@@ -250,7 +255,6 @@ list_names_cb (TpDBusDaemon *bus_daemon,
GObject *weak_object)
{
EmpathyApp *self = (EmpathyApp *) weak_object;
- gboolean shell_running = FALSE;
guint i;
if (error != NULL)
@@ -260,13 +264,13 @@ list_names_cb (TpDBusDaemon *bus_daemon,
{
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");
}