gedit r6227 - in trunk: . plugins/spell
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6227 - in trunk: . plugins/spell
- Date: Sat, 29 Mar 2008 15:34:57 +0000 (GMT)
Author: pborelli
Date: Sat Mar 29 15:34:56 2008
New Revision: 6227
URL: http://svn.gnome.org/viewvc/gedit?rev=6227&view=rev
Log:
2008-03-29 Paolo Borelli <pborelli katamail com>
* plugins/spell/gedit-automatic-spell-checker.c: connect to the
proper GtkTextTagTable signals. Bug #524976.
Modified:
trunk/ChangeLog
trunk/plugins/spell/gedit-automatic-spell-checker.c
trunk/plugins/spell/gedit-spell-checker.c
Modified: trunk/plugins/spell/gedit-automatic-spell-checker.c
==============================================================================
--- trunk/plugins/spell/gedit-automatic-spell-checker.c (original)
+++ trunk/plugins/spell/gedit-automatic-spell-checker.c Sat Mar 29 15:34:56 2008
@@ -671,6 +671,23 @@
gtk_text_tag_table_get_size (table) - 1);
}
+static void
+tag_added_or_removed (GtkTextTagTable *table,
+ GtkTextTag *tag,
+ GeditAutomaticSpellChecker *spell)
+{
+ tag_table_changed (table, spell);
+}
+
+static void
+tag_changed (GtkTextTagTable *table,
+ GtkTextTag *tag,
+ gboolean size_changed,
+ GeditAutomaticSpellChecker *spell)
+{
+ tag_table_changed (table, spell);
+}
+
GeditAutomaticSpellChecker *
gedit_automatic_spell_checker_new (GeditDocument *doc,
GeditSpellChecker *checker)
@@ -688,10 +705,8 @@
spell = g_new0 (GeditAutomaticSpellChecker, 1);
spell->doc = doc;
+ spell->spell_checker = g_object_ref (checker);
- g_object_ref (checker);
- spell->spell_checker = checker;
-
if (automatic_spell_checker_id == 0)
automatic_spell_checker_id =
g_quark_from_static_string ("GeditAutomaticSpellCheckerID");
@@ -750,8 +765,16 @@
gtk_text_tag_table_get_size (GTK_TEXT_BUFFER (doc)->tag_table) - 1);
g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
- "changed",
- G_CALLBACK (tag_table_changed),
+ "tag-added",
+ G_CALLBACK (tag_added_or_removed),
+ spell);
+ g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
+ "tag-removed",
+ G_CALLBACK (tag_added_or_removed),
+ spell);
+ g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
+ "tag-changed",
+ G_CALLBACK (tag_changed),
spell);
/* we create the mark here, but we don't use it until text is
Modified: trunk/plugins/spell/gedit-spell-checker.c
==============================================================================
--- trunk/plugins/spell/gedit-spell-checker.c (original)
+++ trunk/plugins/spell/gedit-spell-checker.c Sat Mar 29 15:34:56 2008
@@ -427,7 +427,7 @@
g_return_val_if_fail (word != NULL, NULL);
if (!lazy_init (spell, spell->active_lang))
- return FALSE;
+ return NULL;
g_return_val_if_fail (spell->dict != NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]