Mercurial > pidgin
diff src/gtkconv.c @ 4781:b6f33ba0a0c0
[gaim-migrate @ 5101]
Things this does:
- dragging a buddy into a conversation window will actually put it in that
window.
- drag buddies and groups around in your buddy list to your heart's desire
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Fri, 14 Mar 2003 23:47:26 +0000 |
| parents | c4c28874ecd3 |
| children | 1e28e7d802a1 |
line wrap: on
line diff
--- a/src/gtkconv.c Fri Mar 14 23:46:32 2003 +0000 +++ b/src/gtkconv.c Fri Mar 14 23:47:26 2003 +0000 @@ -3258,12 +3258,17 @@ static void conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, - GtkSelectionData *sd, guint info, guint t) + GtkSelectionData *sd, guint info, guint t, struct gaim_conversation *conv) { - if (sd->target == gdk_atom_intern("GAIM_BUDDY", FALSE)) { - struct buddy *b = NULL; - memcpy(&b, sd->data, sizeof(b)); - gaim_conversation_new(GAIM_CONV_IM, b->account, b->name); + struct gaim_window *win = conv->window; + struct gaim_conversation *c; + if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { + GaimBlistNode *n = NULL; + memcpy(&n, sd->data, sizeof(n)); + if (!GAIM_BLIST_NODE_IS_BUDDY(n)) + return; + c = gaim_conversation_new(GAIM_CONV_IM, ((struct buddy*)n)->account, ((struct buddy*)n)->name); + gaim_window_add_conversation (win, c); } /* do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!", @@ -3402,7 +3407,7 @@ { {"text/plain", 0, 0}, {"text/uri-list", 0, 1}, - {"GAIM_BUDDY", 0, 2}, + {"GAIM_BLIST_NODE", 0, 2}, {"STRING", 0, 3} };
