Code

r10950@tres: ted | 2006-02-16 08:36:49 -0800
[inkscape.git] / src / extension / extension.cpp
index 4aac7780af88a955335a163c6a1e35d0dad6d921..62f590be327d6119379ec3936002e9d763c21397 100644 (file)
@@ -53,7 +53,7 @@ Parameter * param_shared (const gchar * name, GSList * list);
     not related to the module directly.  If the Repr does not include
     a name and an ID the module will be left in an errored state.
 */
-Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp)
+Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) : _help(NULL)
 {
     repr = in_repr;
     Inkscape::GC::anchor(in_repr);
@@ -84,6 +84,9 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat
             if (!strcmp(chname, "name")) {
                 name = g_strdup (sp_repr_children(child_repr)->content());
             } /* name */
+            if (!strcmp(chname, "help")) {
+                _help = g_strdup (sp_repr_children(child_repr)->content());
+            } /* name */
             if (!strcmp(chname, "param")) {
                                Parameter * param;
                                param = Parameter::make(child_repr, this);
@@ -313,7 +316,7 @@ Extension::get_name (void)
     \return  None
        \brief   This function diactivates the extension (which makes it
                 unusable, but not deleted)
-       
+
     This function is used to removed an extension from functioning, but
        not delete it completely.  It sets the state to \c STATE_DEACTIVATED to
        mark to the world that it has been deactivated.  It also removes
@@ -377,7 +380,7 @@ Parameter *
 param_shared (const gchar * name, GSList * list)
 {
     Parameter * output;
-    
+
     if (name == NULL) {
         throw Extension::param_not_exist();
     }
@@ -407,7 +410,7 @@ const gchar *
 Extension::get_param_string (const gchar * name, const Inkscape::XML::Document * doc)
 {
     Parameter * param;
-    
+
     param = param_shared(name, parameters);
        return param->get_string(doc);
 }
@@ -426,7 +429,7 @@ bool
 Extension::get_param_bool (const gchar * name, const Inkscape::XML::Document * doc)
 {
     Parameter * param;
-    
+
     param = param_shared(name, parameters);
     return param->get_bool(doc);
 }
@@ -445,7 +448,7 @@ int
 Extension::get_param_int (const gchar * name, const Inkscape::XML::Document * doc)
 {
     Parameter * param;
-    
+
     param = param_shared(name, parameters);
     return param->get_int(doc);
 }
@@ -553,7 +556,7 @@ Extension::error_file_open (void)
        error_file.open(filename);
        if (!error_file.is_open()) {
                g_warning(_("Could not create extension error log file '%s'"),
-                         filename);    
+                         filename);
        }
        g_free(filename);
        g_free(ext_error_file);