comparison src/gtkconv.c @ 8176:c733bb72b002

[gaim-migrate @ 8890] A patch from Nathan Fredrickson to focus the text entry box in conversations when switching tabs. This correctly fixes my hack from a few minutes ago. Well, it's more correct, anyway. I don't _think_ it should hurt any kind of accessibility... convo windows will need a caret or something anyway. Rock on. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Jan 2004 05:50:32 +0000
parents 62936f62d98e
children 4e68644a47f6
comparison
equal deleted inserted replaced
8175:f347c8d25cf5 8176:c733bb72b002
3676 G_CALLBACK(topic_callback), conv); 3676 G_CALLBACK(topic_callback), conv);
3677 } 3677 }
3678 3678
3679 gtk_box_pack_start(GTK_BOX(hbox), gtkchat->topic_text, TRUE, TRUE, 5); 3679 gtk_box_pack_start(GTK_BOX(hbox), gtkchat->topic_text, TRUE, TRUE, 5);
3680 gtk_widget_show(gtkchat->topic_text); 3680 gtk_widget_show(gtkchat->topic_text);
3681
3682 /*
3683 * We probably shouldn't need this. When switching tabs to a chat
3684 * window focus is supposed to go to the entry box, but for some
3685 * reason it's going to the topic entry box.
3686 */
3687 g_signal_connect(G_OBJECT(gtkchat->topic_text), "key_press_event",
3688 G_CALLBACK(refocus_entry_cb), gtkconv);
3689 g_signal_connect(G_OBJECT(gtkchat->topic_text), "key_release_event",
3690 G_CALLBACK(refocus_entry_cb), gtkconv);
3691 } 3681 }
3692 3682
3693 /* Setup the horizontal pane. */ 3683 /* Setup the horizontal pane. */
3694 hpaned = gtk_hpaned_new(); 3684 hpaned = gtk_hpaned_new();
3695 gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 5); 3685 gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 5);
4290 gtkconv->make_sound = TRUE; 4280 gtkconv->make_sound = TRUE;
4291 4281
4292 gtkconv->show_formatting_toolbar = gaim_prefs_get_bool( 4282 gtkconv->show_formatting_toolbar = gaim_prefs_get_bool(
4293 "/gaim/gtk/conversations/show_formatting_toolbar"); 4283 "/gaim/gtk/conversations/show_formatting_toolbar");
4294 4284
4285 g_signal_connect_swapped(G_OBJECT(pane), "focus",
4286 G_CALLBACK(gtk_widget_grab_focus),
4287 gtkconv->entry);
4295 } 4288 }
4296 4289
4297 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5); 4290 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 5);
4298 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, 5); 4291 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, 5);
4299 4292