Mercurial > pidgin
changeset 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 | 395116fdd270 |
children | d5f4ae4f9a02 |
files | src/gtkconv.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Tue Jul 08 01:28:42 2003 +0000 +++ b/src/gtkconv.c Tue Jul 08 02:08:55 2003 +0000 @@ -1451,6 +1451,16 @@ return FALSE; } +static gboolean +refocus_entry_cb(GtkWidget *widget, GdkEventButton *event, gpointer data) +{ + GaimGtkConversation *gtkconv = data; + + gtk_widget_grab_focus(gtkconv->entry); + + return FALSE; +} + static void menu_conv_sel_send_cb(GObject *m, gpointer data) { @@ -3350,6 +3360,8 @@ g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event", G_CALLBACK(entry_stop_rclick_cb), NULL); + g_signal_connect(G_OBJECT(gtkconv->imhtml), "button_release_event", + G_CALLBACK(refocus_entry_cb), gtkconv); gaim_setup_imhtml(gtkconv->imhtml); @@ -3540,6 +3552,8 @@ g_signal_connect_after(G_OBJECT(gtkconv->imhtml), "button_press_event", G_CALLBACK(entry_stop_rclick_cb), NULL); + g_signal_connect(G_OBJECT(gtkconv->imhtml), "button_release_event", + G_CALLBACK(refocus_entry_cb), gtkconv); gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"));