[gedit/wip/spell-checking: 2/2] spell-checker: add application name to the session
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking: 2/2] spell-checker: add application name to the session
- Date: Fri, 24 Jul 2015 09:54:22 +0000 (UTC)
commit c48d25000d5953dd4c88d139a1e49e85f0cd7598
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Jul 24 11:44:05 2015 +0200
spell-checker: add application name to the session
And do not hardcode "gedit", get the application name with
g_get_application_name().
plugins/spell/gedit-spell-checker.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-checker.c b/plugins/spell/gedit-spell-checker.c
index ce22467..64baa0f 100644
--- a/plugins/spell/gedit-spell-checker.c
+++ b/plugins/spell/gedit-spell-checker.c
@@ -23,7 +23,6 @@
#endif
#include "gedit-spell-checker.h"
-#include <string.h>
#include <enchant.h>
#include "gedit-spell-utils.h"
@@ -244,6 +243,7 @@ static gboolean
init_dictionary (GeditSpellChecker *checker)
{
GeditSpellCheckerPrivate *priv;
+ const gchar *app_name;
priv = gedit_spell_checker_get_instance_private (checker);
@@ -274,6 +274,9 @@ init_dictionary (GeditSpellChecker *checker)
return FALSE;
}
+ app_name = g_get_application_name ();
+ gedit_spell_checker_add_word_to_session (checker, app_name);
+
return TRUE;
}
@@ -346,11 +349,6 @@ gedit_spell_checker_check_word (GeditSpellChecker *checker,
return FALSE;
}
- if (strcmp (word, "gedit") == 0)
- {
- return TRUE;
- }
-
if (gedit_spell_utils_is_digit (word))
{
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]