~ubuntu-branches/ubuntu/precise/empathy/precise-proposed-201205180810

« back to all changes in this revision

Viewing changes to .pc/34_start_raised_execpt_in_session.patch/src/empathy-status-icon.c

  • Committer: Bazaar Package Importer
  • Author(s): Brian Curtis, Brian Curtis, Ken VanDine
  • Date: 2011-06-01 10:35:24 UTC
  • mfrom: (1.1.70 upstream) (6.3.44 experimental)
  • Revision ID: james.westby@ubuntu.com-20110601103524-wx3wgp71394730jt
Tags: 3.1.1-1ubuntu1
[ Brian Curtis ]
* Merge with Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Drop geoclue/mapping build-depends (they are in Universe)
  - Add Vcz-Bzr link
  - Add Suggests on telepathy-idle
  - Bump telepathy-butterfly, telepathy-haze to recommends
  - Don't recommend the freedesktop sound theme we have an ubuntu one
  - Add build depend for libunity-dev
* debian/rules:
  - Use autoreconf.mk
  - Disable map and location
* debian/empathy.install:
  - Install message indicator configuration
* debian/indicators/empathy:
  - Message indicator configuration
* debian/patches/01_lpi.patch:
  - Add Launchpad integration
* debian/patches/10_use_notify_osd_icons.patch:
  - Use the notify-osd image for new messages
* debian/patches/34_start_raised_execpt_in_session.patch
  - If not started with the session, we should always raise
* debian/patches/36_chat_window_default_size.patch:
  - Make the default chat window size larger
* debian/patches/37_facebook_default.patch:
  - Make facebook the default chat account type
* debian/patches/38_lp_569289.patch
  - Set freenode as default IRC network for new IRC accounts 
* debian/patches/41_unity_launcher_progress.patch
  - Display file transfer progress in the unity launcher

[ Ken VanDine ]
* debian/control
  - build depend on libgcr-3-dev instead of libgcr-dev
  - dropped build depends for libindicate, we will use telepathy-indicator
  - Depend on dconf-gsettings-backend | gsettings-backend
  - Added a Recommends for telepathy-indicator
* +debian/empathy.gsettings-override
  - Added an override for notifications-focus
* debian/patches/series
  - commented out 23_idomessagedialog_for_voip_and_ft.patch, until ido has 
    been ported to gtk3

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <gdk/gdkkeysyms.h>
30
30
#include <glib/gi18n.h>
31
31
 
32
 
#include <libnotify/notify.h>
33
 
#include <libnotify/notification.h>
34
 
#include <libnotify/notify.h>
35
 
 
36
32
#include <telepathy-glib/account-manager.h>
37
33
#include <telepathy-glib/util.h>
38
 
#include <telepathy-yell/telepathy-yell.h>
39
34
 
40
35
#include <libempathy/empathy-gsettings.h>
41
36
#include <libempathy/empathy-utils.h>
42
 
#include <libempathy/empathy-tp-streamed-media.h>
43
37
 
44
38
#include <libempathy-gtk/empathy-presence-chooser.h>
45
39
#include <libempathy-gtk/empathy-ui-utils.h>
46
40
#include <libempathy-gtk/empathy-images.h>
47
41
#include <libempathy-gtk/empathy-new-message-dialog.h>
48
42
#include <libempathy-gtk/empathy-new-call-dialog.h>
49
 
#include <libempathy-gtk/empathy-notify-manager.h>
50
43
 
51
44
#include "empathy-accounts-dialog.h"
52
45
#include "empathy-status-icon.h"
53
46
#include "empathy-preferences.h"
54
47
#include "empathy-event-manager.h"
55
48
 
56
 
#ifdef HAVE_LIBINDICATE
57
 
#include "empathy-indicator-manager.h"
58
 
#include <libindicate/server.h>
59
 
#include <libindicate/interests.h>
60
 
#endif
61
 
 
62
49
#define DEBUG_FLAG EMPATHY_DEBUG_DISPATCHER
63
50
#include <libempathy/empathy-debug.h>
64
51
 
69
56
typedef struct {
70
57
        GtkStatusIcon       *icon;
71
58
        TpAccountManager    *account_manager;
72
 
        EmpathyNotifyManager *notify_mgr;
73
59
        gboolean             showing_event_icon;
74
60
        guint                blink_timeout;
75
61
        EmpathyEventManager *event_manager;
76
62
        EmpathyEvent        *event;
77
 
        NotifyNotification  *notification;
78
63
        GSettings           *gsettings_ui;
79
64
 
80
65
        GtkWindow           *window;
83
68
        GtkAction           *show_window_item;
84
69
        GtkAction           *new_message_item;
85
70
        GtkAction           *status_item;
86
 
#ifdef HAVE_LIBINDICATE
87
 
        EmpathyIndicatorManager *indicator_manager;
88
 
        IndicateServer      *indicate_server;
89
 
#endif
90
71
} EmpathyStatusIconPriv;
91
72
 
92
73
G_DEFINE_TYPE (EmpathyStatusIcon, empathy_status_icon, G_TYPE_OBJECT);
93
74
 
94
75
static void
95
 
status_icon_notification_closed_cb (NotifyNotification *notification,
96
 
                                    EmpathyStatusIcon  *icon)
97
 
{
98
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
99
 
 
100
 
        g_object_unref (notification);
101
 
 
102
 
        if (priv->notification == notification) {
103
 
                priv->notification = NULL;
104
 
        }
105
 
 
106
 
        if (!priv->event) {
107
 
                return;
108
 
        }
109
 
 
110
 
        /* inhibit other updates for this event */
111
 
        empathy_event_inhibit_updates (priv->event);
112
 
}
113
 
 
114
 
static void
115
 
notification_close_helper (EmpathyStatusIconPriv *priv)
116
 
{
117
 
        if (priv->notification != NULL) {
118
 
                notify_notification_close (priv->notification, NULL);
119
 
                priv->notification = NULL;
120
 
        }
121
 
}
122
 
 
123
 
static void
124
 
notification_approve_no_video_cb (NotifyNotification *notification,
125
 
                        gchar              *action,
126
 
                        EmpathyStatusIcon  *icon)
127
 
{
128
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
129
 
 
130
 
        if (priv->event) {
131
 
                tpy_call_channel_send_video (
132
 
                        TPY_CALL_CHANNEL (priv->event->handler_instance),
133
 
                        FALSE);
134
 
                empathy_event_approve (priv->event);
135
 
        }
136
 
}
137
 
 
138
 
static void
139
 
notification_approve_cb (NotifyNotification *notification,
140
 
                        gchar              *action,
141
 
                        EmpathyStatusIcon  *icon)
142
 
{
143
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
144
 
 
145
 
        if (priv->event)
146
 
                empathy_event_approve (priv->event);
147
 
}
148
 
 
149
 
static void
150
 
notification_decline_cb (NotifyNotification *notification,
151
 
                        gchar              *action,
152
 
                        EmpathyStatusIcon  *icon)
153
 
{
154
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
155
 
 
156
 
        if (priv->event)
157
 
                empathy_event_decline (priv->event);
158
 
}
159
 
 
160
 
static void
161
 
add_notification_actions (EmpathyStatusIcon *self,
162
 
                          NotifyNotification *notification)
163
 
{
164
 
        EmpathyStatusIconPriv *priv = GET_PRIV (self);
165
 
        gboolean video;
166
 
 
167
 
        switch (priv->event->type) {
168
 
                case EMPATHY_EVENT_TYPE_CHAT:
169
 
                        notify_notification_add_action (notification,
170
 
                                "respond", _("Respond"), (NotifyActionCallback) notification_approve_cb,
171
 
                                        self, NULL);
172
 
                        break;
173
 
 
174
 
                case EMPATHY_EVENT_TYPE_VOIP:
175
 
                case EMPATHY_EVENT_TYPE_CALL:
176
 
                        if (priv->event->type == EMPATHY_EVENT_TYPE_VOIP)
177
 
                                video = empathy_tp_streamed_media_has_initial_video (
178
 
                                        EMPATHY_TP_STREAMED_MEDIA (priv->event->handler_instance));
179
 
                        else
180
 
                                video = tpy_call_channel_has_initial_video (
181
 
                                        TPY_CALL_CHANNEL (priv->event->handler_instance));
182
 
 
183
 
                        notify_notification_add_action (notification,
184
 
                                "reject", _("Reject"), (NotifyActionCallback) notification_decline_cb,
185
 
                                        self, NULL);
186
 
 
187
 
 
188
 
                        if (video && priv->event->type == EMPATHY_EVENT_TYPE_CALL)
189
 
                                notify_notification_add_action (notification,
190
 
                                        "answer-no-video", _("Answer"), (NotifyActionCallback)
191
 
                                                notification_approve_no_video_cb,
192
 
                                                self, NULL);
193
 
 
194
 
                        notify_notification_add_action (notification,
195
 
                                "answer", video ? _("Answer with video") : _("Answer"),
196
 
                                        (NotifyActionCallback) notification_approve_cb,
197
 
                                        self, NULL);
198
 
                        break;
199
 
 
200
 
                case EMPATHY_EVENT_TYPE_TRANSFER:
201
 
                case EMPATHY_EVENT_TYPE_INVITATION:
202
 
                        notify_notification_add_action (notification,
203
 
                                "decline", _("Decline"), (NotifyActionCallback) notification_decline_cb,
204
 
                                        self, NULL);
205
 
 
206
 
                        notify_notification_add_action (notification,
207
 
                                "accept", _("Accept"), (NotifyActionCallback) notification_approve_cb,
208
 
                                        self, NULL);
209
 
                        break;
210
 
 
211
 
                default:
212
 
                        break;
213
 
        }
214
 
}
215
 
 
216
 
static void
217
 
status_icon_update_notification (EmpathyStatusIcon *icon)
218
 
{
219
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
220
 
        GdkPixbuf *pixbuf = NULL;
221
 
 
222
 
        if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
223
 
                /* always close the notification if this happens */
224
 
                notification_close_helper (priv);
225
 
                return;
226
 
        }
227
 
 
228
 
        if (priv->event) {
229
 
                if (priv->event->type == EMPATHY_EVENT_TYPE_VOIP
230
 
                                || priv->event->type == EMPATHY_EVENT_TYPE_CALL
231
 
                                || priv->event->type == EMPATHY_EVENT_TYPE_TRANSFER) {
232
 
                        empathy_event_activate (priv->event);
233
 
                        return;
234
 
                }
235
 
                gchar *message_esc = NULL;
236
 
                gboolean has_x_canonical_append;
237
 
                NotifyNotification *notification = priv->notification;
238
 
 
239
 
                if (priv->event->message != NULL)
240
 
                        message_esc = g_markup_escape_text (priv->event->message, -1);
241
 
 
242
 
                has_x_canonical_append =
243
 
                                empathy_notify_manager_has_capability (priv->notify_mgr,
244
 
                                        EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND);
245
 
 
246
 
                if (notification != NULL && ! has_x_canonical_append) {
247
 
                        /* if the notification server supports x-canonical-append, it is
248
 
                           better to not use notify_notification_update to avoid
249
 
                           overwriting the current notification message */
250
 
                        notify_notification_update (notification,
251
 
                                                    priv->event->header, message_esc,
252
 
                                                    NULL);
253
 
                } else {
254
 
                        /* if the notification server supports x-canonical-append,
255
 
                           the hint will be added, so that the message from the
256
 
                           just created notification will be automatically appended
257
 
                           to an existing notification with the same title.
258
 
                           In this way the previous message will not be lost: the new
259
 
                           message will appear below it, in the same notification */
260
 
                        notification = notify_notification_new
261
 
                                (priv->event->header, message_esc, NULL);
262
 
 
263
 
                        if (priv->notification == NULL) {
264
 
                                priv->notification = notification;
265
 
                        }
266
 
 
267
 
                        notify_notification_set_timeout (notification,
268
 
                                                         NOTIFY_EXPIRES_DEFAULT);
269
 
 
270
 
                        if (has_x_canonical_append) {
271
 
                                notify_notification_set_hint_string (notification,
272
 
                                        EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, "");
273
 
                        }
274
 
 
275
 
                        if (empathy_notify_manager_has_capability (priv->notify_mgr,
276
 
                                   EMPATHY_NOTIFY_MANAGER_CAP_ACTIONS))
277
 
                                add_notification_actions (icon, notification);
278
 
 
279
 
                        g_signal_connect (notification, "closed",
280
 
                                          G_CALLBACK (status_icon_notification_closed_cb), icon);
281
 
                }
282
 
 
283
 
                pixbuf = empathy_notify_manager_get_pixbuf_for_notification (
284
 
                                                                   priv->notify_mgr, priv->event->contact,
285
 
                                                                   priv->event->icon_name);
286
 
 
287
 
                if (pixbuf != NULL) {
288
 
                        notify_notification_set_icon_from_pixbuf (notification, pixbuf);
289
 
                        g_object_unref (pixbuf);
290
 
                }
291
 
 
292
 
                notify_notification_show (notification, NULL);
293
 
 
294
 
                g_free (message_esc);
295
 
        } else {
296
 
                notification_close_helper (priv);
297
 
        }
298
 
}
299
 
 
300
 
static void
301
76
status_icon_update_tooltip (EmpathyStatusIcon *icon)
302
77
{
303
78
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
381
156
                return;
382
157
        }
383
158
 
384
 
        if (event->type == EMPATHY_EVENT_TYPE_AUTH) {
385
 
                return;
386
 
        }
387
 
 
388
159
        DEBUG ("New event %p", event);
389
160
 
390
161
        priv->event = event;
393
164
                status_icon_update_icon (icon);
394
165
                status_icon_update_tooltip (icon);
395
166
        }
396
 
        status_icon_update_notification (icon);
397
167
 
398
168
        if (!priv->blink_timeout && priv->showing_event_icon) {
399
169
                priv->blink_timeout = g_timeout_add (BLINK_TIMEOUT,
413
183
                return;
414
184
        }
415
185
 
416
 
        if (event->type == EMPATHY_EVENT_TYPE_AUTH) {
417
 
                return;
418
 
        }
419
 
 
420
186
        priv->event = empathy_event_manager_get_top_event (priv->event_manager);
421
187
 
422
188
        status_icon_update_tooltip (icon);
423
189
        status_icon_update_icon (icon);
424
190
 
425
 
        /* update notification anyway, as it's safe and we might have been
426
 
         * changed presence in the meanwhile
427
 
         */
428
 
        status_icon_update_notification (icon);
429
 
 
430
191
        if (!priv->event && priv->blink_timeout) {
431
192
                g_source_remove (priv->blink_timeout);
432
193
                priv->blink_timeout = 0;
444
205
                return;
445
206
        }
446
207
 
447
 
        if (event->type == EMPATHY_EVENT_TYPE_AUTH) {
448
 
                return;
449
 
        }
450
 
 
451
 
        if (empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
452
 
                status_icon_update_notification (icon);
453
 
        }
454
 
 
455
208
        status_icon_update_tooltip (icon);
456
209
}
457
210
 
474
227
                empathy_window_present (GTK_WINDOW (priv->window));
475
228
        }
476
229
}
477
 
#ifdef HAVE_LIBINDICATE
478
 
static void
479
 
empathy_status_icon_set_visible (gboolean show_icon, EmpathyStatusIcon *icon)
480
 
{
481
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
482
 
        gtk_status_icon_set_visible (priv->icon, show_icon);
483
 
}
484
 
 
485
 
static void
486
 
empathy_indicator_interest_status_icon (gboolean icon_visibility,
487
 
        EmpathyStatusIcon *icon)
488
 
{
489
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
490
 
        EmpathyIndicatorManager *manager;
491
 
        gboolean use_libindicate;
492
 
 
493
 
        manager = empathy_indicator_manager_dup_singleton();
494
 
        use_libindicate = g_settings_get_boolean (priv->gsettings_ui,
495
 
                                                  EMPATHY_PREFS_UI_USE_LIBINDICATE);
496
 
 
497
 
        if (use_libindicate && !icon_visibility) {
498
 
                empathy_indicator_manager_set_server_visible (manager, TRUE);
499
 
                /* Hide the status icon so there are not two ways to access
500
 
                 * empathy.
501
 
                 */
502
 
                DEBUG ("Hiding the icon, we are shown in the indicator");
503
 
                empathy_status_icon_set_visible (FALSE, icon);
504
 
        } else {
505
 
                empathy_indicator_manager_set_server_visible (manager,
506
 
                                FALSE);
507
 
                DEBUG ("Show the icon, we are not shown in the indicator");
508
 
                empathy_status_icon_set_visible (TRUE, icon);
509
 
        }
510
 
}
511
 
 
512
 
static void
513
 
empathy_indicator_interest_added (IndicateServer * server,
514
 
        IndicateInterests interest, EmpathyStatusIcon *icon)
515
 
{
516
 
        if (interest != INDICATE_INTEREST_SERVER_SIGNAL) {
517
 
                return;
518
 
        }
519
 
        DEBUG ("Indicator received interest-added signal");
520
 
        empathy_indicator_interest_status_icon(FALSE, icon);
521
 
}
522
 
 
523
 
static void
524
 
empathy_indicator_interest_removed (IndicateServer * server,
525
 
        IndicateInterests interest, EmpathyStatusIcon *icon)
526
 
{
527
 
        if (interest != INDICATE_INTEREST_SERVER_SIGNAL) {
528
 
                return;
529
 
        }
530
 
 
531
 
        DEBUG ("Indicator received interest-removed signal");
532
 
        empathy_indicator_interest_status_icon(TRUE, icon);
533
 
}
534
 
 
535
 
static void
536
 
status_icon_set_use_libindicate (EmpathyStatusIcon *icon,
537
 
                            gboolean use_libindicate)
538
 
{
539
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
540
 
 
541
 
        if (use_libindicate) {
542
 
                empathy_indicator_manager_set_server_visible (priv->indicator_manager, TRUE);
543
 
        } else {
544
 
                empathy_indicator_manager_set_server_visible (priv->indicator_manager, FALSE);
545
 
                empathy_status_icon_set_visible(TRUE, icon);
546
 
        }
547
 
}
548
 
 
549
 
static void
550
 
status_icon_notify_libindicate_cb (GSettings *gsettings,
551
 
                                  const gchar *key,
552
 
                                  gpointer     user_data)
553
 
{
554
 
        EmpathyStatusIcon *icon = user_data;
555
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
556
 
        gboolean           use_libindicate;
557
 
 
558
 
        use_libindicate = g_settings_get_boolean (priv->gsettings_ui,
559
 
                                                  EMPATHY_PREFS_UI_USE_LIBINDICATE);
560
 
        status_icon_set_use_libindicate (icon, use_libindicate);
561
 
}
562
 
#endif
563
230
 
564
231
static void
565
232
status_icon_notify_visibility_cb (GSettings   *gsettings,
579
246
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
580
247
        gboolean               visible;
581
248
 
582
 
 
583
249
        visible = gtk_window_is_active (priv->window);
584
 
#ifdef HAVE_LIBINDICATE
585
 
        gboolean               use_libindicate;
586
 
        use_libindicate = g_settings_get_boolean (priv->gsettings_ui,
587
 
                                                  EMPATHY_PREFS_UI_USE_LIBINDICATE);
588
 
        if (use_libindicate) {
589
 
                /* If indicators are used then we may very well not be active
590
 
                 * when toggled, as they are usually windows themselves. This
591
 
                 * makes it damn hard to toggle, so we just look at whether
592
 
                 * we are visible.
593
 
                 */
594
 
                visible = GTK_WIDGET_VISIBLE (priv->window);
595
 
                status_icon_set_visibility (icon, TRUE, TRUE);
596
 
                return;
597
 
        }
598
 
#endif
599
 
 
600
250
        status_icon_set_visibility (icon, !visible, TRUE);
601
251
}
602
252
 
603
 
#ifdef HAVE_LIBINDICATE
604
 
static void
605
 
indicate_server_activate_cb (EmpathyIndicatorManager *manager,
606
 
                                guint timestamp, EmpathyStatusIcon *icon)
607
 
{
608
 
        status_icon_toggle_visibility (icon);
609
 
}
610
 
#endif
611
 
 
612
253
static void
613
254
status_icon_presence_changed_cb (EmpathyStatusIcon *icon)
614
255
{
615
 
        EmpathyStatusIconPriv *priv = GET_PRIV (icon);
616
 
 
617
256
        status_icon_update_icon (icon);
618
257
        status_icon_update_tooltip (icon);
619
 
 
620
 
        if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
621
 
                /* dismiss the outstanding notification if present */
622
 
 
623
 
                if (priv->notification) {
624
 
                        notify_notification_close (priv->notification, NULL);
625
 
                        priv->notification = NULL;
626
 
                }
627
 
        }
628
258
}
629
259
 
630
260
static gboolean
641
271
                                 GdkEventKey *event,
642
272
                                 EmpathyStatusIcon *icon)
643
273
{
644
 
        if (event->keyval == GDK_Escape) {
 
274
        if (event->keyval == GDK_KEY_Escape) {
645
275
                status_icon_set_visibility (icon, FALSE, TRUE);
646
276
        }
647
277
        return FALSE;
779
409
                g_source_remove (priv->blink_timeout);
780
410
        }
781
411
 
782
 
        if (priv->notification) {
783
 
                notify_notification_close (priv->notification, NULL);
784
 
                g_object_unref (priv->notification);
785
 
                priv->notification = NULL;
786
 
        }
787
 
 
788
412
        g_object_unref (priv->icon);
789
413
        g_object_unref (priv->account_manager);
790
414
        g_object_unref (priv->event_manager);
791
415
        g_object_unref (priv->ui_manager);
792
 
        g_object_unref (priv->notify_mgr);
793
416
        g_object_unref (priv->gsettings_ui);
794
417
        g_object_unref (priv->window);
795
 
#ifdef HAVE_LIBINDICATE
796
 
        g_object_unref (priv->indicator_manager);
797
 
#endif
798
418
}
799
419
 
800
420
static void
855
475
                          G_CALLBACK (status_icon_notify_visibility_cb),
856
476
                          icon);
857
477
 
858
 
#ifdef HAVE_LIBINDICATE
859
 
        g_signal_connect (priv->gsettings_ui,
860
 
                          "changed::" EMPATHY_PREFS_UI_USE_LIBINDICATE,
861
 
                          G_CALLBACK (status_icon_notify_libindicate_cb),
862
 
                          icon);
863
 
#endif
864
 
 
865
478
        status_icon_create_menu (icon);
866
479
 
867
480
        g_signal_connect_swapped (priv->account_manager,
883
496
        g_signal_connect (priv->icon, "popup-menu",
884
497
                          G_CALLBACK (status_icon_popup_menu_cb),
885
498
                          icon);
886
 
 
887
 
        priv->notification = NULL;
888
 
        priv->notify_mgr = empathy_notify_manager_dup_singleton ();
889
499
}
890
500
 
891
501
EmpathyStatusIcon *
894
504
        EmpathyStatusIconPriv *priv;
895
505
        EmpathyStatusIcon     *icon;
896
506
        gboolean               should_hide;
897
 
#ifdef HAVE_LIBINDICATE
898
 
        gboolean               use_libindicate;
899
 
#endif
900
507
 
901
508
        g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
902
509
 
904
511
        priv = GET_PRIV (icon);
905
512
 
906
513
        priv->window = g_object_ref (window);
907
 
#ifdef HAVE_LIBINDICATE
908
 
        priv->indicator_manager = empathy_indicator_manager_dup_singleton ();
909
 
        priv->indicate_server = indicate_server_ref_default ();
910
 
 
911
 
        g_signal_connect (priv->indicator_manager, "server-activate",
912
 
                          G_CALLBACK (indicate_server_activate_cb),
913
 
                          icon);
914
 
 
915
 
        g_signal_connect (priv->indicate_server,
916
 
                          INDICATE_SERVER_SIGNAL_INTEREST_ADDED,
917
 
                          G_CALLBACK(empathy_indicator_interest_added),
918
 
                          icon);
919
 
 
920
 
        g_signal_connect (priv->indicate_server,
921
 
                          INDICATE_SERVER_SIGNAL_INTEREST_REMOVED,
922
 
                          G_CALLBACK(empathy_indicator_interest_removed),
923
 
                          icon);
924
 
#endif
925
514
 
926
515
        g_signal_connect_after (priv->window, "key-press-event",
927
516
                          G_CALLBACK (status_icon_key_press_event_cb),
938
527
                should_hide = TRUE;
939
528
        }
940
529
 
941
 
#ifdef HAVE_LIBINDICATE
942
 
        use_libindicate = g_settings_get_boolean (priv->gsettings_ui,
943
 
                                                  EMPATHY_PREFS_UI_USE_LIBINDICATE);
944
 
        status_icon_set_use_libindicate (icon, use_libindicate);
945
 
#endif
946
 
 
947
530
        status_icon_set_visibility (icon, !should_hide, FALSE);
948
531
 
949
532
        return icon;