[gnote] Enable/disable spellchecking when the preferences are changed. (Closes #582242)



commit 9842f5775b981a1c7e1a0829b00e5e9c23adb0d3
Author: Hubert Figuiere <hub figuiere net>
Date:   Thu Jun 11 23:23:35 2009 -0400

    Enable/disable spellchecking when the preferences are changed. (Closes #582242)
    
    Also detach the spellchecker when done.

 NEWS             |    2 ++
 src/watchers.cpp |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index b65240d..1a4fc5c 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ Fixes:
     (Tony Manco)
   * Hotkeys changes not being taken into account until restart.
     (Closes #582789) (Yves Junqueira)
+  * Enable/disable spellchecking when the preferences are changed. 
+    (Closes #582242)
 
 Translations:
 
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 86100a7..176ac14 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -326,7 +326,7 @@ namespace gnote {
   {
     m_tag_applied_cid.disconnect();
     
-    if(!m_obj_ptr) {
+    if(m_obj_ptr) {
       gtkspell_detach(m_obj_ptr);
       m_obj_ptr = NULL;
     }
@@ -337,7 +337,7 @@ namespace gnote {
   {
     const char * key = gconf_entry_get_key(entry);
     
-    if (strcmp(key, Preferences::ENABLE_SPELLCHECKING) == 0) {
+    if (strcmp(key, Preferences::ENABLE_SPELLCHECKING) != 0) {
       return;
     }
     GConfValue *value = gconf_entry_get_value(entry);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]