Mercurial > pidgin
changeset 4939:4d50e125b0fa
[gaim-migrate @ 5273]
This fixes the problem where clicking a tab didn't focus the entry widget.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 01 Apr 2003 05:52:40 +0000 |
parents | 461e8c89514f |
children | 3708545afe42 |
files | src/gtkconv.c |
diffstat | 1 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Tue Apr 01 04:02:37 2003 +0000 +++ b/src/gtkconv.c Tue Apr 01 05:52:40 2003 +0000 @@ -3262,21 +3262,28 @@ static void conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, - GtkSelectionData *sd, guint info, guint t, struct gaim_conversation *conv) + GtkSelectionData *sd, guint info, guint t, + struct gaim_conversation *conv) { struct gaim_window *win = conv->window; struct gaim_conversation *c; - if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { + + 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); + + 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!", - NULL, GAIM_WARNING); */ + /* do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!", + NULL, GAIM_WARNING); */ } /************************************************************************** @@ -3545,6 +3552,9 @@ gtkconv->make_sound = TRUE; } + g_signal_connect_swapped(G_OBJECT(pane), "focus", + G_CALLBACK(gtk_widget_grab_focus), gtkconv->entry); + gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5); /* Close button. */ @@ -3567,6 +3577,7 @@ gtk_misc_set_padding(GTK_MISC(gtkconv->tab_label), 4, 0); #endif + /* Pack it all together. */ gtk_box_pack_start(GTK_BOX(tabby), gtkconv->tab_label, TRUE, TRUE, 0); gtk_widget_show(gtkconv->tab_label);