diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-15 22:00:54 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-15 22:00:54 +0800 |
commit | a88e050a3bc3178a146e259fa9e284c0980658d6 (patch) | |
tree | 4c6bb6112f271a33b3819f8bc333e876d6aaea9a /libempathy-gtk | |
parent | c965d3f5c7d48e4f577817eb369ab0e771bb9c2a (diff) | |
download | gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar.gz gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar.bz2 gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar.lz gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar.xz gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.tar.zst gsoc2013-empathy-a88e050a3bc3178a146e259fa9e284c0980658d6.zip |
Prevent to start a chat when activating a row with an event
svn path=/trunk/; revision=1255
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 582ce696e..ddb5d24e6 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -506,10 +506,9 @@ contact_list_view_key_press_event_cb (EmpathyContactListView *view, } static void -contact_list_view_row_activated_cb (EmpathyContactListView *view, - GtkTreePath *path, - GtkTreeViewColumn *col, - gpointer user_data) +contact_list_view_row_activated (GtkTreeView *view, + GtkTreePath *path, + GtkTreeViewColumn *column) { EmpathyContactListViewPriv *priv = GET_PRIV (view); EmpathyContact *contact; @@ -528,6 +527,7 @@ contact_list_view_row_activated_cb (EmpathyContactListView *view, /* There is no event for the contact, default action is starting a chat */ if (priv->contact_features & EMPATHY_CONTACT_FEATURE_CHAT) { + DEBUG ("Starting a chat"); empathy_dispatcher_chat_with_contact (contact); } @@ -1027,8 +1027,9 @@ contact_list_view_set_property (GObject *object, static void empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GtkTreeViewClass *tree_view_class = GTK_TREE_VIEW_CLASS (klass); object_class->finalize = contact_list_view_finalize; object_class->get_property = contact_list_view_get_property; @@ -1041,6 +1042,8 @@ empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass) widget_class->drag_end = contact_list_view_drag_end; widget_class->drag_motion = contact_list_view_drag_motion; + tree_view_class->row_activated = contact_list_view_row_activated; + signals[DRAG_CONTACT_RECEIVED] = g_signal_new ("drag-contact-received", G_OBJECT_CLASS_TYPE (klass), @@ -1099,9 +1102,6 @@ empathy_contact_list_view_init (EmpathyContactListView *view) g_signal_connect (view, "key-press-event", G_CALLBACK (contact_list_view_key_press_event_cb), NULL); - g_signal_connect (view, "row-activated", - G_CALLBACK (contact_list_view_row_activated_cb), - NULL); g_signal_connect (view, "row-expanded", G_CALLBACK (contact_list_view_row_expand_or_collapse_cb), GINT_TO_POINTER (TRUE)); |