Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 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 | d80bc307e2c8 |
children | 3708545afe42 |
comparison
equal
deleted
inserted
replaced
4938:461e8c89514f | 4939:4d50e125b0fa |
---|---|
3260 } | 3260 } |
3261 } | 3261 } |
3262 | 3262 |
3263 static void | 3263 static void |
3264 conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, | 3264 conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, |
3265 GtkSelectionData *sd, guint info, guint t, struct gaim_conversation *conv) | 3265 GtkSelectionData *sd, guint info, guint t, |
3266 struct gaim_conversation *conv) | |
3266 { | 3267 { |
3267 struct gaim_window *win = conv->window; | 3268 struct gaim_window *win = conv->window; |
3268 struct gaim_conversation *c; | 3269 struct gaim_conversation *c; |
3269 if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { | 3270 |
3271 if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { | |
3270 GaimBlistNode *n = NULL; | 3272 GaimBlistNode *n = NULL; |
3271 memcpy(&n, sd->data, sizeof(n)); | 3273 memcpy(&n, sd->data, sizeof(n)); |
3274 | |
3272 if (!GAIM_BLIST_NODE_IS_BUDDY(n)) | 3275 if (!GAIM_BLIST_NODE_IS_BUDDY(n)) |
3273 return; | 3276 return; |
3274 c = gaim_conversation_new(GAIM_CONV_IM, ((struct buddy*)n)->account, ((struct buddy*)n)->name); | 3277 |
3275 gaim_window_add_conversation (win, c); | 3278 c = gaim_conversation_new(GAIM_CONV_IM, |
3276 } | 3279 ((struct buddy *)n)->account, |
3277 | 3280 ((struct buddy *)n)->name); |
3278 /* do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!", | 3281 |
3279 NULL, GAIM_WARNING); */ | 3282 gaim_window_add_conversation(win, c); |
3283 } | |
3284 | |
3285 /* do_error_dialog("MWAHAHAHA! I AM A TROLL! I AM GOING TO EAT YOU!", | |
3286 NULL, GAIM_WARNING); */ | |
3280 } | 3287 } |
3281 | 3288 |
3282 /************************************************************************** | 3289 /************************************************************************** |
3283 * GTK+ window ops | 3290 * GTK+ window ops |
3284 **************************************************************************/ | 3291 **************************************************************************/ |
3543 new_ui = TRUE; | 3550 new_ui = TRUE; |
3544 | 3551 |
3545 gtkconv->make_sound = TRUE; | 3552 gtkconv->make_sound = TRUE; |
3546 } | 3553 } |
3547 | 3554 |
3555 g_signal_connect_swapped(G_OBJECT(pane), "focus", | |
3556 G_CALLBACK(gtk_widget_grab_focus), gtkconv->entry); | |
3557 | |
3548 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5); | 3558 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5); |
3549 | 3559 |
3550 /* Close button. */ | 3560 /* Close button. */ |
3551 gtkconv->close = gtk_button_new(); | 3561 gtkconv->close = gtk_button_new(); |
3552 gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), 16, 16); | 3562 gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), 16, 16); |
3564 gtkconv->tab_label = gtk_label_new(gaim_conversation_get_title(conv)); | 3574 gtkconv->tab_label = gtk_label_new(gaim_conversation_get_title(conv)); |
3565 #if 0 | 3575 #if 0 |
3566 gtk_misc_set_alignment(GTK_MISC(gtkconv->tab_label), 0.00, 0.5); | 3576 gtk_misc_set_alignment(GTK_MISC(gtkconv->tab_label), 0.00, 0.5); |
3567 gtk_misc_set_padding(GTK_MISC(gtkconv->tab_label), 4, 0); | 3577 gtk_misc_set_padding(GTK_MISC(gtkconv->tab_label), 4, 0); |
3568 #endif | 3578 #endif |
3579 | |
3569 | 3580 |
3570 /* Pack it all together. */ | 3581 /* Pack it all together. */ |
3571 gtk_box_pack_start(GTK_BOX(tabby), gtkconv->tab_label, TRUE, TRUE, 0); | 3582 gtk_box_pack_start(GTK_BOX(tabby), gtkconv->tab_label, TRUE, TRUE, 0); |
3572 gtk_widget_show(gtkconv->tab_label); | 3583 gtk_widget_show(gtkconv->tab_label); |
3573 gtk_box_pack_start(GTK_BOX(tabby), gtkconv->close, FALSE, FALSE, 0); | 3584 gtk_box_pack_start(GTK_BOX(tabby), gtkconv->close, FALSE, FALSE, 0); |