changeset 10699:c8b4bf3bf9e5

[gaim-migrate @ 12256] Christopher (siege) O'Brien fixed the bug where gtkimhtml doesn't honor button features when using the keyboard. The toolbar buttons still get toggled though, so someone should fix that. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 16 Mar 2005 20:38:56 +0000
parents 2f646d020011
children 9505695acff8
files src/gtkimhtml.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Tue Mar 15 02:39:38 2005 +0000
+++ b/src/gtkimhtml.c	Wed Mar 16 20:38:56 2005 +0000
@@ -962,6 +962,11 @@
 
 static void imhtml_toggle_format(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons)
 {
+	/* since this function is the handler for the formatting keystrokes,
+	   we need to check here that the formatting attempted is permitted */
+	if (!(imhtml->format_functions & buttons))
+		return;
+
 	switch (buttons) {
 	case GTK_IMHTML_BOLD:
 		gtk_imhtml_toggle_bold(imhtml);