summaryrefslogtreecommitdiff
path: root/development/poedit/poedit-gtkspell.patch
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2010-12-29 17:19:26 -0600
committerRobby Workman <rworkman@slackbuilds.org>2010-12-29 17:26:10 -0600
commit81a9bd1d3be7a1ae55389131e6095e72aab42f5a (patch)
tree3d28ad9bc4296b88e77ad44b4a7b8d5315605525 /development/poedit/poedit-gtkspell.patch
parentebd936a04b9835a7e441d6adc7769400b2e5b6f9 (diff)
downloadslackbuilds-81a9bd1d3be7a1ae55389131e6095e72aab42f5a.tar.gz
development/poedit: Uncompressed patch
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/poedit/poedit-gtkspell.patch')
-rw-r--r--development/poedit/poedit-gtkspell.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/development/poedit/poedit-gtkspell.patch b/development/poedit/poedit-gtkspell.patch
new file mode 100644
index 0000000000..a1299755fd
--- /dev/null
+++ b/development/poedit/poedit-gtkspell.patch
@@ -0,0 +1,49 @@
+Index: src/edframe.cpp
+===================================================================
+--- src/edframe.cpp (revision 1450)
++++ src/edframe.cpp (working copy)
+@@ -829,14 +829,26 @@
+ wxASSERT_MSG( textview, _T("wxTextCtrl is supposed to use GtkTextView") );
+ GtkSpell *spell = gtkspell_get_from_text_view(textview);
+
+- if (spell)
+- gtkspell_detach(spell);
++ printf("init spellchecker for %s\n", (const char*)lang.ToAscii());
+
+ if (enable)
+ {
+ GError *err = NULL;
+- if (!gtkspell_new_attach(textview, lang.ToAscii(), &err))
++ bool ok;
++
++ if (spell)
+ {
++ printf("gtkspell_set_language\n");
++ ok = gtkspell_set_language(spell, lang.ToAscii(), &err);
++ }
++ else
++ {
++ printf("gtkspell_new_attach\n");
++ ok = gtkspell_new_attach(textview, lang.ToAscii(), &err) != NULL;
++ }
++
++ if (!ok)
++ {
+ #if 0
+ // FIXME: report the failure in some less intrusive way than the
+ // code that was used here; say for which language, too
+@@ -846,6 +858,14 @@
+ g_error_free(err);
+ }
+ }
++ else
++ {
++ if (spell)
++ {
++ printf("gtkspell_detach\n");
++ gtkspell_detach(spell);
++ }
++ }
+ }
+ #endif // __WXGTK__
+