GNOME Bugzilla – Bug 550775
Can't add words to dictionary in empathy
Last modified: 2010-10-22 12:09:17 UTC
There is no way to add words to the dictionary, please add a menu entry in the contextual menu Other information: Please see: https://bugs.launchpad.net/ubuntu/+source/empathy/+bug/188447
indeed.
*** Bug 568563 has been marked as a duplicate of this bug. ***
*** Bug 593349 has been marked as a duplicate of this bug. ***
Fixed in repo: git://vminko.org/empathy branch: fix-550775
Created attachment 172903 [details] [review] patch attaching diff for easier review.
Review of attachment 172903 [details] [review]: This look pretty good; thanks! My comments are mostly esthetic changes. ::: libempathy-gtk/empathy-chat.c @@ +1885,3 @@ + +static GtkWidget * +chat_spelling_build_add_to_dictionary_item (EmpathyChatSpell *chat_spell) I think I'd mimic xchat-gnome's UI: put the 'Add' entry in the spelling suggestion after the languages with a separator. @@ +1896,3 @@ + g_assert (codes != NULL); + if (g_list_length (codes) > 1) { + label = g_strdup_printf(_("Add '%s' to Dictionary"), You should add a translator comment explaining the semantic of %s. Syntax is: /* translators: badger */ @@ +1910,3 @@ + code = l->data; + name = empathy_spell_get_language_name (code); + if (!name) if (name == NULL) @@ +1918,3 @@ + chat_spell->word, code); + g_object_set_data_full (G_OBJECT (lang_item), + "chat_word", chat_word, When are you using this data? Or is it just to destroy the chat_word when the menu is destroyed? We'd usually use "chat-word" for data keys. ::: libempathy-gtk/empathy-spell.c @@ +411,3 @@ +void +empathy_spell_add_to_dictionary (const gchar *code, const gchar *word) Should be one line par arg (I know this file doesn't respect our coding style but best to do it with new code). @@ +419,3 @@ + + spell_setup_languages (); + if (!languages) { if (ptr == NULL). Also, no need to use { } for one line block. @@ +424,3 @@ + + lang = g_hash_table_lookup (languages, code); + if (!lang) { same here.
Fixed in branch: fix-550775-v2 >Or is it just to destroy the chat_word when the menu is destroyed? Yes
Created attachment 172926 [details] [review] updated patch
Merged to master; thanks a lot. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.