summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/extension/dependency.cpp2
-rw-r--r--src/extension/dependency.h2
-rw-r--r--src/extension/loader.cpp10
-rw-r--r--src/extension/loader.h6
-rw-r--r--src/extension/system.cpp8
5 files changed, 13 insertions, 15 deletions
diff --git a/src/extension/dependency.cpp b/src/extension/dependency.cpp
index 712a9068d..624be12f9 100644
--- a/src/extension/dependency.cpp
+++ b/src/extension/dependency.cpp
@@ -241,7 +241,7 @@ bool Dependency::check (void) const
Returns the name of the dependency as found in the configuration file.
*/
-const gchar* Dependency::getName()
+const gchar* Dependency::get_name()
{
return _string;
}
diff --git a/src/extension/dependency.h b/src/extension/dependency.h
index 5d0a4844e..8f5dcc0c8 100644
--- a/src/extension/dependency.h
+++ b/src/extension/dependency.h
@@ -58,7 +58,7 @@ public:
Dependency (Inkscape::XML::Node * in_repr);
virtual ~Dependency (void);
bool check (void) const;
- const gchar* getName();
+ const gchar* get_name();
Glib::ustring &get_help (void) const;
Glib::ustring &get_link (void) const;
diff --git a/src/extension/loader.cpp b/src/extension/loader.cpp
index df193a051..8893f3f1d 100644
--- a/src/extension/loader.cpp
+++ b/src/extension/loader.cpp
@@ -20,10 +20,10 @@ namespace Extension {
typedef Implementation::Implementation *(*_getImplementation)(void);
-bool Loader::LoadDependency(Dependency *dep)
+bool Loader::load_dependency(Dependency *dep)
{
GModule *module = NULL;
- module = g_module_open(dep->getName(), (GModuleFlags)0);
+ module = g_module_open(dep->get_name(), (GModuleFlags)0);
if (module == NULL) {
return false;
}
@@ -35,7 +35,7 @@ bool Loader::LoadDependency(Dependency *dep)
* @param doc The xml representation of the INX extension configuration.
* @return The implementation of the extension loaded from the plugin.
*/
-Implementation::Implementation *Loader::LoadImplementation(Inkscape::XML::Document *doc)
+Implementation::Implementation *Loader::load_implementation(Inkscape::XML::Document *doc)
{
try {
Inkscape::XML::Node *repr = doc->root();
@@ -48,10 +48,10 @@ Implementation::Implementation *Loader::LoadImplementation(Inkscape::XML::Docume
if (!strcmp(chname, "dependency")) {
Dependency dep = Dependency(child_repr);
- bool success = LoadDependency(&dep);
+ bool success = load_dependency(&dep);
if( !success ){
const char *res = g_module_error();
- g_warning("Unable to load dependency %s of plugin %s.\nDetails: %s\n", dep.getName(), res);
+ g_warning("Unable to load dependency %s of plugin %s.\nDetails: %s\n", dep.get_name(), res);
return NULL;
}
}
diff --git a/src/extension/loader.h b/src/extension/loader.h
index c09260f72..5d48bf861 100644
--- a/src/extension/loader.h
+++ b/src/extension/loader.h
@@ -31,7 +31,7 @@ public:
*
* @param dir is the path where the plugin should be loaded from.
*/
- void setBaseDirectory(const gchar *dir) {
+ void set_base_directory(const gchar *dir) {
_baseDirectory = dir;
}
@@ -40,7 +40,7 @@ public:
*
* @param dep
*/
- bool LoadDependency(Dependency *dep);
+ bool load_dependency(Dependency *dep);
/**
* Load the actual implementation of a plugin supplied by the plugin.
@@ -48,7 +48,7 @@ public:
* @param doc The xml representation of the INX extension configuration.
* @return The implementation of the extension loaded from the plugin.
*/
- Implementation::Implementation *LoadImplementation(Inkscape::XML::Document *doc);
+ Implementation::Implementation *load_implementation(Inkscape::XML::Document *doc);
private:
const gchar *_baseDirectory; /**< The base directory to load a plugin from */
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index 5a77ac28e..6b8e80d3c 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -490,11 +490,8 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation
}
case MODULE_PLUGIN: {
Inkscape::Extension::Loader loader = Inkscape::Extension::Loader();
- loader.setBaseDirectory ( Inkscape::Application::profile_path("extensions"));
- imp = loader.LoadImplementation(doc);
- if( imp != NULL) {
- return new Extension(repr, imp);
- }
+ loader.set_base_directory ( Inkscape::Application::profile_path("extensions"));
+ imp = loader.load_implementation(doc);
break;
}
default: {
@@ -529,6 +526,7 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation
break;
}
default: {
+ module = new Extension(repr, imp);
break;
}
}