[gedit/wip/spell-checking: 3/4] spell-checker: implement the "language" property
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking: 3/4] spell-checker: implement the "language" property
- Date: Fri, 24 Jul 2015 05:19:41 +0000 (UTC)
commit a1cf405c396c98ca19f35424d8f10d10dec307ec
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jul 24 06:37:38 2015 +0200
spell-checker: implement the "language" property
plugins/spell/gedit-spell-checker.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker.c b/plugins/spell/gedit-spell-checker.c
index e9f7713..b40e944 100644
--- a/plugins/spell/gedit-spell-checker.c
+++ b/plugins/spell/gedit-spell-checker.c
@@ -68,17 +68,17 @@ gedit_spell_checker_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- /*
GeditSpellChecker *spell = GEDIT_SPELL_CHECKER (object);
- */
switch (prop_id)
{
case PROP_LANGUAGE:
- /* TODO */
+ gedit_spell_checker_set_language (spell, g_value_get_pointer (value));
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -88,16 +88,17 @@ gedit_spell_checker_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- /*
GeditSpellChecker *spell = GEDIT_SPELL_CHECKER (object);
- */
switch (prop_id)
{
case PROP_LANGUAGE:
- /* TODO */
+ g_value_set_pointer (value, (gpointer)spell->active_lang);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -304,6 +305,8 @@ gedit_spell_checker_set_language (GeditSpellChecker *spell,
gedit_spell_checker_language_to_string (language));
}
+ g_object_notify (G_OBJECT (spell), "language");
+
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]