Bugzilla – Attachment 73035 Details for
Bug 127570
New mail takes about 20 sec
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Attaching a probable fix. (patch by partha)
bnc-157842-evo-spellchecker.patch (text/plain), 2.41 KB, created by
Veerapuram Varadhan
on 2006-03-15 14:56:49 UTC
(
hide
)
Description:
Attaching a probable fix. (patch by partha)
Filename:
MIME Type:
Creator:
Veerapuram Varadhan
Created:
2006-03-15 14:56:49 UTC
Size:
2.41 KB
patch
obsolete
>Index: components/html-editor/popup.c >=================================================================== >RCS file: /cvs/gnome/gtkhtml/components/html-editor/popup.c,v >retrieving revision 1.90 >diff -u -p -r1.90 popup.c >--- components/html-editor/popup.c 19 Dec 2005 06:40:33 -0000 1.90 >+++ components/html-editor/popup.c 15 Mar 2006 06:21:05 -0000 >@@ -292,6 +292,12 @@ spell_check_cb (GtkWidget *mi, GtkHTMLCo > } > > static void >+replace_suggestion_cb (GtkWidget *mi, GtkHTMLControlData *cd) >+{ >+ html_engine_replace_spell_word_with (cd->html->engine, g_object_get_data (G_OBJECT (mi), "rep_word")); >+} >+ >+static void > spell_add (GtkWidget *mi, GtkHTMLControlData *cd) > { > HTMLEngine *e = cd->html->engine; >@@ -372,7 +378,7 @@ insert_html (GtkWidget *mi, GtkHTMLContr > (*props) ++; > > #define SUBMENU(l) \ >- menuitem = gtk_menu_item_new_with_label (l); \ >+ menuitem = gtk_menu_item_new_with_mnemonic (l); \ > gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); \ > gtk_widget_show (menuitem); \ > (*items)++; items_sep++; \ >@@ -534,7 +540,37 @@ prepare_properties_and_menu (GtkHTMLCont > if (!active && obj && html_object_is_text (obj) > && !html_engine_spell_word_is_valid (e)) { > ADD_SEP; >- ADD_ITEM (_("Check Word Spelling..."), spell_check_cb, NONE); >+ if (get_n_languages (cd) >= 1) { >+ gchar *word; >+ gint i, j, k ; >+ GNOME_Spell_StringSeq* seq; >+ CORBA_Environment ev; >+ >+ for (i = 0; i < cd->languages->_length; i ++) { >+ if (strstr (html_engine_get_language (cd->html->engine), cd->languages->_buffer [i].abbreviation)) { >+ word = html_engine_get_spell_word (cd->html->engine); >+ CORBA_exception_init (&ev); >+ seq = GNOME_Spell_Dictionary_getSuggestions(cd->dict, word, &ev); >+ CORBA_exception_free (&ev); >+ g_free (word); >+ SUBMENU (cd->languages->_buffer [i].name); >+ k = seq->_length/10; >+ for (j = 0; j < seq->_length; j+=2) { >+ if (!strcmp (cd->languages->_buffer[i].abbreviation, (char *)seq->_buffer[j+1])) { >+ ADD_ITEM ((gchar *)seq->_buffer[j], replace_suggestion_cb, NONE); >+ g_object_set_data_full (G_OBJECT (menuitem), "rep_word", (gchar *)g_strdup(seq->_buffer[j]), g_free); >+ } >+ } >+ END_SUBMENU; >+ } >+ >+ if (CORBA_sequence_get_release(seq)) >+ CORBA_free (seq); >+ >+ } >+ >+ } >+ ADD_SEP; > ADD_ITEM (_("Ignore Misspelled Word"), spell_ignore, NONE); > if (get_n_languages (cd) > 1) { > gchar *lang;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 127570
:
73035
|
73796
|
74199