#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
#include <libempathy/empathy-debug.h>
-/* Flashing delay for icons (milliseconds). */
-#define FLASH_TIMEOUT 500
-
/* Active users are those which have recently changed state
* (e.g. online, offline or from normal to a busy state).
*/
GtkTreePath *path;
/* FIXME: We need GTK version >= 2.12.10. See GNOME bug #504087 */
- if (100 * gtk_minor_version + gtk_micro_version < 1210) {
+ if (gtk_check_version (2, 12, 10)) {
return FALSE;
}
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;
+ }
+
+ /* There is no event for the contact, default action is starting a chat */
+ if (priv->contact_features & EMPATHY_CONTACT_FEATURE_CHAT) {
empathy_dispatcher_chat_with_contact (contact);
- g_object_unref (contact);
}
+
+ g_object_unref (contact);
}
static void
G_N_ELEMENTS (drag_types_dest),
GDK_ACTION_MOVE | GDK_ACTION_COPY);
} else {
- /* FIXME: URI could still be droped depending on FT feature */
+ /* FIXME: URI could still be droped depending on FT feature */
gtk_drag_dest_unset (GTK_WIDGET (view));
}
dialog = gtk_dialog_new_with_buttons (window_title, parent,
GTK_DIALOG_MODAL,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
GTK_STOCK_DELETE, GTK_RESPONSE_YES,
- GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
NULL);
gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);