[empathy/gnome-3-12: 6/12] Honor autoaway setting even in GNOME Shell
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-12: 6/12] Honor autoaway setting even in GNOME Shell
- Date: Fri, 25 Aug 2017 22:21:41 +0000 (UTC)
commit 581be902720691c4b134526afdb32c4b8a61090a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Jul 21 20:28:51 2016 -0500
Honor autoaway setting even in GNOME Shell
GNOME stopped handling presence ages ago... I think it was GNOME 3.8.
Based on work by Christoph Lenggenhager.
https://bugzilla.gnome.org/show_bug.cgi?id=742720
src/empathy.c | 28 ++++++++++++----------------
1 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/src/empathy.c b/src/empathy.c
index e36c459..0ee4219 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -245,29 +245,13 @@ out:
{
DEBUG ("GNOME Shell is running, don't create status icon");
- /* Rely on GNOME Shell to watch session state */
- empathy_presence_manager_set_auto_away (self->presence_mgr, FALSE);
-
empathy_roster_window_set_shell_running (
EMPATHY_ROSTER_WINDOW (self->window), TRUE);
}
else
{
- gboolean autoaway;
-
self->icon = empathy_status_icon_new (GTK_WINDOW (self->window),
self->start_hidden);
-
- /* Allow Empathy to watch session state */
- autoaway = g_settings_get_boolean (self->gsettings,
- EMPATHY_PREFS_AUTOAWAY);
-
- g_signal_connect (self->gsettings,
- "changed::" EMPATHY_PREFS_AUTOAWAY,
- G_CALLBACK (empathy_presence_manager_set_auto_away_cb),
- self->presence_mgr);
-
- empathy_presence_manager_set_auto_away (self->presence_mgr, autoaway);
}
/* Now that we have been started, reset this flag so future invocation will
@@ -284,6 +268,7 @@ empathy_app_activate (GApplication *app)
{
GError *error = NULL;
TpDBusDaemon *dbus;
+ gboolean autoaway;
empathy_gtk_init ();
@@ -316,6 +301,17 @@ empathy_app_activate (GApplication *app)
"win." EMPATHY_PREFS_UI_SHOW_OFFLINE,
NULL);
+ /* Allow Empathy to watch session state */
+ autoaway = g_settings_get_boolean (self->gsettings,
+ EMPATHY_PREFS_AUTOAWAY);
+
+ g_signal_connect (self->gsettings,
+ "changed::" EMPATHY_PREFS_AUTOAWAY,
+ G_CALLBACK (empathy_presence_manager_set_auto_away_cb),
+ self->presence_mgr);
+
+ empathy_presence_manager_set_auto_away (self->presence_mgr, autoaway);
+
/* check if Shell is running */
dbus = tp_dbus_daemon_dup (&error);
g_assert_no_error (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]