Mercurial > pidgin.yaz
changeset 12460:3d999a4d4892
[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 <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 12 Dec 2005 07:20:31 +0000 |
parents | 5f8cfa774141 |
children | 27671f780081 |
files | src/gtkstatusbox.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;