+static gboolean
+individual_view_drag_motion_cb (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time_)
+{
+ EmpathyIndividualView *view = EMPATHY_INDIVIDUAL_VIEW (widget);
+ GdkAtom target;
+
+ target = gtk_drag_dest_find_target (GTK_WIDGET (view), context, NULL);
+
+ if (target == gdk_atom_intern_static_string ("text/persona-id"))
+ {
+ GtkTreePath *path;
+
+ /* FIXME: It doesn't make sense for us to highlight a specific row or
+ * position to drop a Persona in, so just highlight the entire widget.
+ * Since I can't find a way to do this, just highlight the first possible
+ * position in the tree. */
+ gdk_drag_status (context, gdk_drag_context_get_suggested_action (context),
+ time_);
+
+ path = gtk_tree_path_new_first ();
+ gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW (view), path,
+ GTK_TREE_VIEW_DROP_BEFORE);
+ gtk_tree_path_free (path);
+
+ return TRUE;
+ }
+
+ /* Unknown or unhandled drag target */
+ gdk_drag_status (context, GDK_ACTION_DEFAULT, time_);
+ gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW (view), NULL, 0);
+
+ return FALSE;
+}
+
+static gboolean
+individual_view_drag_persona_received_cb (EmpathyIndividualView *view,
+ GdkDragAction action,
+ FolksPersona *persona,
+ FolksIndividual *individual,
+ EmpathyIndividualLinker *self)
+{
+ EmpathyIndividualLinkerPriv *priv = GET_PRIV (self);
+
+ /* A Persona has been dragged onto the EmpathyIndividualView (from the
+ * EmpathyPersonaView), so we try to remove the Individual which contains
+ * the Persona from the link. */
+ if (individual != priv->start_individual)
+ {
+ unlink_individual (self, individual);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean
+persona_view_drag_individual_received_cb (EmpathyPersonaView *view,
+ GdkDragAction action,
+ FolksIndividual *individual,
+ EmpathyIndividualLinker *self)
+{
+ /* An Individual has been dragged onto the EmpathyPersonaView (from the
+ * EmpathyIndividualView), so we try to add the Individual to the link. */
+ link_individual (self, individual);
+
+ return TRUE;
+}
+