src/gtkconv.c

changeset 4702
49006c93f70c
parent 4689
524a0357d05b
child 4736
a511c4575a0e
equal deleted inserted replaced
4701:2a792cd7f0f7 4702:49006c93f70c
3196 } 3196 }
3197 } 3197 }
3198 3198
3199 static void 3199 static void
3200 conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, 3200 conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y,
3201 GtkSelectionData *sd, guint info, guint t, gpointer data) 3201 GtkSelectionData *sd, guint info, guint t)
3202 { 3202 {
3203 do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!", 3203 if (sd->target == gdk_atom_intern("GAIM_BUDDY", FALSE)) {
3204 NULL, GAIM_WARNING); 3204 struct buddy *b = NULL;
3205 memcpy(&b, sd->data, sizeof(b));
3206 gaim_conversation_new(GAIM_CONV_IM, b->account, b->name);
3207 }
3208
3209 /* do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!",
3210 NULL, GAIM_WARNING); */
3205 } 3211 }
3206 3212
3207 /************************************************************************** 3213 /**************************************************************************
3208 * GTK+ window ops 3214 * GTK+ window ops
3209 **************************************************************************/ 3215 **************************************************************************/
3333 } 3339 }
3334 3340
3335 static const GtkTargetEntry te[] = 3341 static const GtkTargetEntry te[] =
3336 { 3342 {
3337 {"text/plain", 0, 0}, 3343 {"text/plain", 0, 0},
3338 {"text/uri-list", 1, 0}, 3344 {"text/uri-list", 0, 1},
3339 {"STRING", 2, 0} 3345 {"GAIM_BUDDY", 0, 2},
3346 {"STRING", 0, 3}
3340 }; 3347 };
3341 3348
3342 static void 3349 static void
3343 gaim_gtk_add_conversation(struct gaim_window *win, 3350 gaim_gtk_add_conversation(struct gaim_window *win,
3344 struct gaim_conversation *conv) 3351 struct gaim_conversation *conv)
3405 GTK_DEST_DEFAULT_DROP, 3412 GTK_DEST_DEFAULT_DROP,
3406 te, sizeof(te) / sizeof(GtkTargetEntry), 3413 te, sizeof(te) / sizeof(GtkTargetEntry),
3407 GDK_ACTION_COPY); 3414 GDK_ACTION_COPY);
3408 gtk_drag_dest_set(gtkconv->imhtml, 3415 gtk_drag_dest_set(gtkconv->imhtml,
3409 GTK_DEST_DEFAULT_MOTION | 3416 GTK_DEST_DEFAULT_MOTION |
3410 GTK_DEST_DEFAULT_HIGHLIGHT | 3417 GTK_DEST_DEFAULT_DROP,
3411 GTK_DEST_DEFAULT_DROP,
3412 te, sizeof(te) / sizeof(GtkTargetEntry), 3418 te, sizeof(te) / sizeof(GtkTargetEntry),
3413 GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE); 3419 GDK_ACTION_DEFAULT | GDK_ACTION_COPY | GDK_ACTION_MOVE);
3414 gtk_drag_dest_set(gtkconv->entry, 3420 gtk_drag_dest_set(gtkconv->entry,
3415 GTK_DEST_DEFAULT_MOTION | 3421 GTK_DEST_DEFAULT_MOTION |
3416 GTK_DEST_DEFAULT_DROP, 3422 GTK_DEST_DEFAULT_DROP,

mercurial