diff options
Diffstat (limited to 'src/extension/paramnotebook.cpp')
| -rw-r--r-- | src/extension/paramnotebook.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/extension/paramnotebook.cpp b/src/extension/paramnotebook.cpp index 288186c8f..041dd6370 100644 --- a/src/extension/paramnotebook.cpp +++ b/src/extension/paramnotebook.cpp @@ -48,7 +48,7 @@ private: This only gets created if there are parameters on this page */ Gtk::Tooltips * _tooltips; - + public: static ParamNotebookPage * makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * in_ext); @@ -57,7 +57,7 @@ public: Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void insert_subparam_strings (std::list <std::string> &retlist); gchar * get_guitext (void) {return _text;}; - + }; /* class ParamNotebookPage */ @@ -65,7 +65,7 @@ ParamNotebookPage::ParamNotebookPage (const gchar * name, const gchar * guitext, Parameter(name, guitext, desc, scope, ext) { parameters = NULL; - + // Read XML to build page if (xml != NULL) { Inkscape::XML::Node *child_repr = sp_repr_children(xml); @@ -81,7 +81,7 @@ ParamNotebookPage::ParamNotebookPage (const gchar * name, const gchar * guitext, child_repr = sp_repr_next(child_repr); } } - + return; } @@ -99,7 +99,7 @@ ParamNotebookPage::~ParamNotebookPage (void) /** \brief A function to get the subparameters in a string form \return An array with all the subparameters in it. - + Look how this closely resembles Extension::paramListString */ void @@ -179,7 +179,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: } ParamNotebookPage * page = new ParamNotebookPage(name, guitext, desc, scope, in_ext, in_repr); - + /* Note: page could equal NULL */ return page; } @@ -193,26 +193,26 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: */ Gtk::Widget * ParamNotebookPage::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) -{ +{ if (!_tooltips) _tooltips = new Gtk::Tooltips(); - + Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox); - vbox->set_border_width(5); - - // add parameters onto page (if any) + vbox->set_border_width(5); + + // add parameters onto page (if any) for (GSList * list = parameters; list != NULL; list = g_slist_next(list)) { Parameter * param = reinterpret_cast<Parameter *>(list->data); Gtk::Widget * widg = param->get_widget(doc, node, changeSignal); gchar const * tip = param->get_tooltip(); - + vbox->pack_start(*widg, true, true, 2); if (tip != NULL) { _tooltips->set_tip(*widg, Glib::ustring(tip)); } } - + vbox->show(); - + return dynamic_cast<Gtk::Widget *>(vbox); } @@ -228,7 +228,7 @@ ParamNotebook::ParamNotebook (const gchar * name, const gchar * guitext, const g Parameter(name, guitext, desc, scope, ext) { pages = NULL; - + // Read XML tree to add pages: if (xml != NULL) { Inkscape::XML::Node *child_repr = sp_repr_children(xml); @@ -244,7 +244,7 @@ ParamNotebook::ParamNotebook (const gchar * name, const gchar * guitext, const g child_repr = sp_repr_next(child_repr); } } - + // Initialize _value with the current page const char * defaultval = NULL; // set first page as default @@ -261,7 +261,7 @@ ParamNotebook::ParamNotebook (const gchar * name, const gchar * guitext, const g defaultval = paramval; if (defaultval != NULL) _value = g_strdup(defaultval); // allocate space for _value - + return; } @@ -292,7 +292,7 @@ ParamNotebook::~ParamNotebook (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamNotebook::set (const int in, SPDocument * doc, Inkscape::XML::Node * node) +ParamNotebook::set (const int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { ParamNotebookPage * page = NULL; int i = 0; @@ -300,9 +300,9 @@ ParamNotebook::set (const int in, SPDocument * doc, Inkscape::XML::Node * node) page = reinterpret_cast<ParamNotebookPage *>(list->data); i++; } - + if (page == NULL) return _value; - + if (_value != NULL) g_free(_value); _value = g_strdup(page->name()); @@ -375,8 +375,8 @@ public: notebookpages are added or removed. */ void -ParamNotebookWdg::changed_page(GtkNotebookPage *page, - guint pagenum) +ParamNotebookWdg::changed_page(GtkNotebookPage */*page*/, + guint pagenum) { if (is_visible()) { _pref->set((int)pagenum, _doc, _node); @@ -396,11 +396,11 @@ ParamNotebook::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::s { ParamNotebookWdg * nb = Gtk::manage(new ParamNotebookWdg(this, doc, node)); - // add pages (if any) + // add pages (if any) int i = -1; int pagenr = i; for (GSList * list = pages; list != NULL; list = g_slist_next(list)) { - i++; + i++; ParamNotebookPage * page = reinterpret_cast<ParamNotebookPage *>(list->data); Gtk::Widget * widg = page->get_widget(doc, node, changeSignal); nb->append_page(*widg, _(page->get_guitext())); @@ -410,7 +410,7 @@ ParamNotebook::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::s } nb->show(); - + if (pagenr >= 0) nb->set_current_page(pagenr); return dynamic_cast<Gtk::Widget *>(nb); |
