[gnote] Drop GConf usage from stickynoteimport addin



commit b894e3d3c8e36f27a316c8297dda0c64d47de364
Author: Aurimas Äernius <aurisc4 gmail com>
Date:   Mon Jun 27 11:48:06 2011 +0300

    Drop GConf usage from stickynoteimport addin
    
    Remove usage of GConf and depending on Tomboy, when importing sticky notes.
    Fixes 605382.

 .../stickynoteimport/stickynoteimportnoteaddin.cpp |   33 --------------------
 1 files changed, 0 insertions(+), 33 deletions(-)
---
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
index 5b301ee..76fdfb0 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
@@ -84,9 +84,6 @@ static const char * DEBUG_FIRST_RUN_DETECTED = "StickyNoteImporter: Detecting th
 
 static const char * PREFS_FILE = "stickynoteimport.ini";
 
-const char * TB_STICKYNOTEIMPORTER_FIRST_RUN =
-  "/apps/tomboy/sticky_note_importer/sticky_importer_first_run";
-
 bool StickyNoteImportNoteAddin::s_static_inited = false;
 bool StickyNoteImportNoteAddin::s_sticky_file_might_exist = true;
 bool StickyNoteImportNoteAddin::s_sticky_file_existence_confirmed = false;
@@ -144,33 +141,6 @@ bool StickyNoteImportNoteAddin::want_to_run(gnote::NoteManager & manager)
 
   if(s_sticky_file_might_exist) {
     want_run = !ini_file.get_bool("status", "first_run");
-
-    if(want_run) {
-      // we think we want to run
-      // so we check for Tomboy. If Tomboy wants to run then we want
-
-      GConfClient * client = Preferences::obj().get_client();
-      GError * error = NULL;
-      gboolean tb_must_run = gconf_client_get_bool(client,
-                                                   TB_STICKYNOTEIMPORTER_FIRST_RUN,
-                                                   &error);
-      if(error) {
-        // the key don't exist. Tomboy has not been installed.
-        // we want to run.
-        DBG_OUT("gconf error %s", error->message);
-        tb_must_run = true;
-        g_error_free(error);
-      }
-      DBG_OUT("tb_must_run %d", tb_must_run);
-      // we decided that if Tomboy don't want to run then SticjyNotes are
-      // probably already imported.
-      if(!tb_must_run) {
-        // Mark like we already ran.
-        ini_file.set_bool("status", "first_run", true);
-//        Preferences::obj().set<bool>(Preferences::STICKYNOTEIMPORTER_FIRST_RUN, false);
-        want_run = false;
-      }
-    }
   }
   return want_run;
 }
@@ -185,13 +155,10 @@ bool StickyNoteImportNoteAddin::first_run(gnote::NoteManager & manager)
   ini_file.load();
 
   bool firstRun = !ini_file.get_bool("status", "first_run");
-//Preferences::obj().get<bool> (Preferences::STICKYNOTEIMPORTER_FIRST_RUN);
 
   if (firstRun) {
     ini_file.set_bool("status", "first_run", true);
 
-//    Preferences::obj().set<bool> (Preferences::STICKYNOTEIMPORTER_FIRST_RUN, false);
-
     DBG_OUT(DEBUG_FIRST_RUN_DETECTED);
 
     xmlDocPtr xml_doc = get_sticky_xml_doc();



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