diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-03-01 20:11:29 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-03-01 20:11:29 +0000 |
| commit | abd4ef66c86b47b61644923b293180256bcedeed (patch) | |
| tree | 36f28f61835c4258c6dd6a3ec060aaaa445eb8ab /src/extension/param/notebook.cpp | |
| parent | fix issues introduced with revision 10932 (diff) | |
| download | inkscape-abd4ef66c86b47b61644923b293180256bcedeed.tar.gz inkscape-abd4ef66c86b47b61644923b293180256bcedeed.zip | |
various minor things
(bzr r11036)
Diffstat (limited to 'src/extension/param/notebook.cpp')
| -rw-r--r-- | src/extension/param/notebook.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index b1ca359cd..ee7f15004 100644 --- a/src/extension/param/notebook.cpp +++ b/src/extension/param/notebook.cpp @@ -74,9 +74,9 @@ ParamNotebookPage::ParamNotebookPage (const gchar * name, const gchar * guitext, Inkscape::XML::Node *child_repr = xml->firstChild(); while (child_repr != NULL) { char const * chname = child_repr->name(); - if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { - chname += strlen(INKSCAPE_EXTENSION_NS); - } + if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { + chname += strlen(INKSCAPE_EXTENSION_NS); + } if (chname[0] == '_') // Allow _ for translation of tags chname++; if (!strcmp(chname, "param") || !strcmp(chname, "_param")) { @@ -141,8 +141,9 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: const char * desc; const char * scope_str; Parameter::_scope_t scope = Parameter::SCOPE_USER; - const char * gui_hide; - const char * gui_tip; + bool gui_hidden = false; + const char * gui_hide; + const char * gui_tip; name = in_repr->attribute("name"); guitext = in_repr->attribute("gui-text"); @@ -155,13 +156,14 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: if (desc == NULL) desc = in_repr->attribute("_gui-description"); scope_str = in_repr->attribute("scope"); - gui_hide = in_repr->attribute("gui-hidden"); - if (gui_hide != NULL) { - if (strcmp(gui_hide, "1") == 0 || - strcmp(gui_hide, "true") == 0) { - } - /* else stays false */ - } + gui_hide = in_repr->attribute("gui-hidden"); + if (gui_hide != NULL) { + if (strcmp(gui_hide, "1") == 0 || + strcmp(gui_hide, "true") == 0) { + gui_hidden = true; + } + /* else stays false */ + } /* In this case we just don't have enough information */ if (name == NULL) { @@ -178,7 +180,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: } } - ParamNotebookPage * page = new ParamNotebookPage(name, guitext, desc, scope, gui_hide, gui_tip, in_ext, in_repr); + ParamNotebookPage * page = new ParamNotebookPage(name, guitext, desc, scope, gui_hidden, gui_tip, in_ext, in_repr); /* Note: page could equal NULL */ return page; @@ -231,9 +233,9 @@ ParamNotebook::ParamNotebook (const gchar * name, const gchar * guitext, const g Inkscape::XML::Node *child_repr = xml->firstChild(); while (child_repr != NULL) { char const * chname = child_repr->name(); - if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { - chname += strlen(INKSCAPE_EXTENSION_NS); - } + if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { + chname += strlen(INKSCAPE_EXTENSION_NS); + } if (chname[0] == '_') // Allow _ for translation of tags chname++; if (!strcmp(chname, "page")) { |
