Code

Node tool: special case node duplication for endnodes - select new endnode
[inkscape.git] / src / extension / init.cpp
index 0dba9df8fa8724c3a975b98630ccfe2cb5d4e312..8578e8c6c61931fd80a08ea087bf96a771c54839 100644 (file)
@@ -55,6 +55,9 @@
 #endif
 #include "preferences.h"
 #include "io/sys.h"
+#ifdef WITH_DBUS
+#include "dbus/dbus-init.h"
+#endif
 
 #ifdef WITH_IMAGE_MAGICK
 #include "internal/bitmap/adaptiveThreshold.h"
@@ -120,21 +123,20 @@ static void
 update_pref(Glib::ustring const &pref_path,
             gchar const *pref_default) // , GSList *extension_family)
 {
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    Glib::ustring pref = prefs->getString(pref_path);
+    Glib::ustring pref = Inkscape::Preferences::get()->getString(pref_path);
     /*
     gboolean missing=TRUE;
     for (GSList *list = extension_family; list; list = g_slist_next(list)) {
-       g_assert( list->data );
+        g_assert( list->data );
 
-       Inkscape::Extension *extension;
-               extension = reinterpret_cast<Inkscape::Extension *>(list->data);
+        Inkscape::Extension *extension;
+        extension = reinterpret_cast<Inkscape::Extension *>(list->data);
 
         if (!strcmp(extension->get_id(),pref)) missing=FALSE;
     }
     */
     if (!Inkscape::Extension::db.get( pref.data() ) /*missing*/) {
-        prefs->setString(pref_path, pref_default);
+        Inkscape::Preferences::get()->setString(pref_path, pref_default);
     }
 }
 
@@ -148,8 +150,6 @@ update_pref(Glib::ustring const &pref_path,
 void
 init()
 {
-    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-    
     /* TODO: Change to Internal */
     Internal::Svg::init();
     Internal::Svgz::init();
@@ -188,6 +188,10 @@ init()
     Internal::BlurEdge::init();
     Internal::GimpGrad::init();
     Internal::Grid::init();
+
+#ifdef WITH_DBUS
+    Dbus::init();
+#endif
        
     /* Raster Effects */
 #ifdef WITH_IMAGE_MAGICK
@@ -227,14 +231,14 @@ init()
     Internal::Bitmap::Wave::init();
 #endif /* WITH_IMAGE_MAGICK */
 
-       Internal::Filter::Filter::filters_all();
+    Internal::Filter::Filter::filters_all();
 
     /* Load search path for extensions */
     if (Inkscape::Extension::Extension::search_path.size() == 0)
     {
-       Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions"));
-       
-       Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR));
+        Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions"));
+
+        Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR));
 
     }
 
@@ -354,4 +358,4 @@ check_extensions()
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :