comparison src/gtkconv.c @ 6057:dc2124210882

[gaim-migrate @ 6507] re-focus the entry widget after the gtkimhtml window is clicked in. someone tell me if this breaks something, works for me. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 08 Jul 2003 02:08:55 +0000
parents c062c4bf58ac
children 2cd7c409d71d
comparison
equal deleted inserted replaced
6056:395116fdd270 6057:dc2124210882
1449 } 1449 }
1450 1450
1451 return FALSE; 1451 return FALSE;
1452 } 1452 }
1453 1453
1454 static gboolean
1455 refocus_entry_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
1456 {
1457 GaimGtkConversation *gtkconv = data;
1458
1459 gtk_widget_grab_focus(gtkconv->entry);
1460
1461 return FALSE;
1462 }
1463
1454 static void 1464 static void
1455 menu_conv_sel_send_cb(GObject *m, gpointer data) 1465 menu_conv_sel_send_cb(GObject *m, gpointer data)
1456 { 1466 {
1457 GaimWindow *win = g_object_get_data(m, "user_data"); 1467 GaimWindow *win = g_object_get_data(m, "user_data");
1458 GaimAccount *account = g_object_get_data(m, "gaim_account"); 1468 GaimAccount *account = g_object_get_data(m, "gaim_account");
3348 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), 3358 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),
3349 gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps")); 3359 gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"));
3350 3360
3351 g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event", 3361 g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event",
3352 G_CALLBACK(entry_stop_rclick_cb), NULL); 3362 G_CALLBACK(entry_stop_rclick_cb), NULL);
3363 g_signal_connect(G_OBJECT(gtkconv->imhtml), "button_release_event",
3364 G_CALLBACK(refocus_entry_cb), gtkconv);
3353 3365
3354 gaim_setup_imhtml(gtkconv->imhtml); 3366 gaim_setup_imhtml(gtkconv->imhtml);
3355 3367
3356 gtk_widget_show(gtkconv->imhtml); 3368 gtk_widget_show(gtkconv->imhtml);
3357 3369
3538 gtkconv->imhtml = gtk_imhtml_new(NULL, NULL); 3550 gtkconv->imhtml = gtk_imhtml_new(NULL, NULL);
3539 gtk_container_add(GTK_CONTAINER(gtkconv->sw), gtkconv->imhtml); 3551 gtk_container_add(GTK_CONTAINER(gtkconv->sw), gtkconv->imhtml);
3540 3552
3541 g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event", 3553 g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event",
3542 G_CALLBACK(entry_stop_rclick_cb), NULL); 3554 G_CALLBACK(entry_stop_rclick_cb), NULL);
3555 g_signal_connect(G_OBJECT(gtkconv->imhtml), "button_release_event",
3556 G_CALLBACK(refocus_entry_cb), gtkconv);
3543 3557
3544 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), 3558 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),
3545 gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps")); 3559 gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"));
3546 3560
3547 gaim_setup_imhtml(gtkconv->imhtml); 3561 gaim_setup_imhtml(gtkconv->imhtml);