diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-15 22:00:43 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-15 22:00:43 +0800 |
commit | 85f1114dfde72df49d377eb56e4703213243f661 (patch) | |
tree | 46a118563245e7c8463450ae8ced909d5764a7c5 | |
parent | 284af952a6644b052dad4aa131175c14658312f7 (diff) | |
download | gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar.gz gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar.bz2 gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar.lz gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar.xz gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.tar.zst gsoc2013-empathy-85f1114dfde72df49d377eb56e4703213243f661.zip |
Activate the event when clicking on the contact list.
svn path=/trunk/; revision=1248
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index f8942cbb3..4760b4253 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -671,21 +671,36 @@ contact_list_view_row_activated_cb (EmpathyContactListView *view, GtkTreeModel *model; GtkTreeIter iter; - if (!(priv->contact_features & EMPATHY_CONTACT_FEATURE_CHAT)) { - return; - } - - model = gtk_tree_view_get_model (GTK_TREE_VIEW (view)); - + model = GTK_TREE_MODEL (priv->store); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); - if (contact) { + if (!contact) { + return; + } + + if (priv->event_manager) { + GSList *events, *l; + + events = empathy_event_manager_get_events (priv->event_manager); + for (l = events; l; l = l->next) { + EmpathyEvent *event = l->data; + + if (event->contact == contact) { + empathy_event_activate (event); + goto OUT; + } + } + } + + if (priv->contact_features & EMPATHY_CONTACT_FEATURE_CHAT) { empathy_dispatcher_chat_with_contact (contact); - g_object_unref (contact); } + +OUT: + g_object_unref (contact); } static void |