# HG changeset patch # User Richard Laager # Date 1134372031 0 # Node ID 3d999a4d489220e22e68f0eb2a977f7dbbc299b8 # Parent 5f8cfa7741414137a5457d2059622e482678733b [gaim-migrate @ 14770] SF Patch #1378051 from Sadrul "This resets the typing-timer when the formatting are changed in the statusbox-imhtml." committer: Tailor Script diff -r 5f8cfa774141 -r 3d999a4d4892 src/gtkstatusbox.c --- a/src/gtkstatusbox.c Mon Dec 12 06:53:27 2005 +0000 +++ b/src/gtkstatusbox.c Mon Dec 12 07:20:31 2005 +0000 @@ -41,6 +41,7 @@ #define TYPING_TIMEOUT 4000 static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data); +static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *data); static void remove_typing_cb(GtkGaimStatusBox *box); static void gtk_gaim_status_box_pulse_typing(GtkGaimStatusBox *status_box); @@ -489,6 +490,7 @@ gtk_gaim_status_box_pulse_typing(box); g_source_remove(box->typing); box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, box); + return FALSE; } @@ -627,6 +629,8 @@ g_signal_connect(G_OBJECT(status_box->toggle_button), "toggled", G_CALLBACK(toggled_cb), status_box); g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(imhtml_changed_cb), status_box); + g_signal_connect(G_OBJECT(status_box->imhtml), "format_function_toggle", + G_CALLBACK(imhtml_format_changed_cb), status_box); g_signal_connect(G_OBJECT(status_box->imhtml), "key_press_event", G_CALLBACK(imhtml_remove_focus), status_box); g_signal_connect_swapped(G_OBJECT(status_box->imhtml), "message_send", G_CALLBACK(remove_typing_cb), status_box); @@ -1099,6 +1103,11 @@ gtk_gaim_status_box_refresh(box); } +static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *data) +{ + imhtml_changed_cb(NULL, data); +} + GtkGaimStatusBoxItemType gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box) { GtkTreeIter iter;