[evolution-patches] Fix for Bug 326871 [gtkhtml]
- From: Rohini <srohini novell com>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Fix for Bug 326871 [gtkhtml]
- Date: Tue, 24 Jan 2006 16:25:13 +0530
Hi
Attached fix for Bug 326871 – Spell Check Document... menu item should
be inactive if spell checking not enabled.
Please Review.
Thanks,
Rohini
Index: menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.124
diff -u -p -r1.124 menubar.c
--- menubar.c 14 Sep 2005 12:25:36 -0000 1.124
+++ menubar.c 24 Jan 2006 10:43:25 -0000
@@ -688,17 +688,26 @@ menubar_set_languages (GtkHTMLControlDat
GString *str;
gboolean enabled;
gint i;
+ gint no_of_lang=0;
- if (!cd->languages)
+ if (!cd->languages) {
+ bonobo_ui_component_set_prop (cd->uic, "/commands/EditSpellCheck", "sensitive", "0", NULL);
return;
+ }
str = g_string_new (NULL);
cd->block_language_changes = TRUE;
for (i = 0; i < cd->languages->_length; i ++) {
enabled = cd->language && strstr (cd->language, cd->languages->_buffer [i].abbreviation) != NULL;
+ if (enabled)
+ no_of_lang++;
g_string_printf (str, "/commands/SpellLanguage%d", i + 1);
bonobo_ui_component_set_prop (cd->uic, str->str, "state", enabled ? "1" : "0", NULL);
}
+ if (no_of_lang > 0)
+ bonobo_ui_component_set_prop (cd->uic, "/commands/EditSpellCheck", "sensitive", "1", NULL);
+ else
+ bonobo_ui_component_set_prop (cd->uic, "/commands/EditSpellCheck", "sensitive", "0", NULL);
g_string_free (str, TRUE);
cd->block_language_changes = FALSE;
}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.523
diff -u -p -r1.523 ChangeLog
--- ChangeLog 13 Jan 2006 13:17:23 -0000 1.523
+++ ChangeLog 24 Jan 2006 10:50:34 -0000
@@ -1,3 +1,10 @@
+2006-01-24 Rohini S <srohini novell com>
+
+ * menubar.c (menubar_set_languages): Function modified to enable/disable
+ menu item Check Spelling depending on number of languages selected.
+
+ Fixes bug #326871
+
2006-01-13 Srinivasa Ragavan <sragavan novell com>
** Fixes bug #326381
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]