summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/paramenum.h18
-rw-r--r--src/extension/parameter.cpp26
-rw-r--r--src/extension/paramnotebook.cpp48
-rw-r--r--src/extension/paramnotebook.h14
-rw-r--r--src/extension/paramradiobutton.h16
-rw-r--r--src/extension/patheffect.cpp2
6 files changed, 62 insertions, 62 deletions
diff --git a/src/extension/paramenum.h b/src/extension/paramenum.h
index b01a15344..5ea4a0196 100644
--- a/src/extension/paramenum.h
+++ b/src/extension/paramenum.h
@@ -1,5 +1,5 @@
-#ifndef __INK_EXTENSION_PARAMENUM_H__
-#define __INK_EXTENSION_PARAMENUM_H__
+#ifndef INK_EXTENSION_PARAMENUM_H_SEEN
+#define INK_EXTENSION_PARAMENUM_H_SEEN
/** \file
* Enumeration parameter for extensions.
@@ -30,21 +30,21 @@ namespace Extension {
class ParamComboBox : public Parameter {
private:
/** \brief Internal value. This should point to a string that has
- been allocated in memory. And should be free'd.
+ been allocated in memory. And should be free'd.
It is the value of the current selected string */
gchar * _value;
-
+
GSList * choices; /**< A table to store the choice strings */
-
+
public:
ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamComboBox(void);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
-
- const gchar * get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
+
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
-
+
void changed (void);
}; /* class ParamComboBox */
@@ -55,7 +55,7 @@ public:
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMENUM_H__ */
+#endif /* INK_EXTENSION_PARAMENUM_H_SEEN */
/*
Local Variables:
diff --git a/src/extension/parameter.cpp b/src/extension/parameter.cpp
index 9a7535a25..dd80cf59c 100644
--- a/src/extension/parameter.cpp
+++ b/src/extension/parameter.cpp
@@ -74,12 +74,12 @@ public:
ParamEnum(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
~ParamEnum(void);
/** \brief Returns \c _value, with a \i const to protect it. */
- const gchar * get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _current_choice != NULL ? _current_choice->_value : NULL; }
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _current_choice != NULL ? _current_choice->_value : NULL; }
const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
Glib::ustring * string (void);
}; /* class ParamEnum */
-
+
/**
\return None
\brief This function creates a parameter that can be used later. This
@@ -169,7 +169,7 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
bool
Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node)
{
- ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
+ ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
throw Extension::param_not_bool_param();
return boolpntr->get(doc, node);
@@ -179,7 +179,7 @@ Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node)
int
Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node)
{
- ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
+ ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
throw Extension::param_not_int_param();
return intpntr->get(doc, node);
@@ -189,7 +189,7 @@ Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node)
float
Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node)
{
- ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this);
+ ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this);
if (floatpntr == NULL)
throw Extension::param_not_float_param();
return floatpntr->get(doc, node);
@@ -238,7 +238,7 @@ Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node)
int
Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node)
{
- ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
+ ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
throw Extension::param_not_int_param();
return intpntr->set(in, doc, node);
@@ -259,7 +259,7 @@ Parameter::set_float (float in, SPDocument * doc, Inkscape::XML::Node * node)
const gchar *
Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node)
{
- ParamString * stringpntr = dynamic_cast<ParamString *>(this);
+ ParamString * stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
throw Extension::param_not_string_param();
return stringpntr->set(in, doc, node);
@@ -357,14 +357,14 @@ Parameter::document_param_node (SPDocument * doc)
/** \brief Basically, if there is no widget pass a NULL. */
Gtk::Widget *
-Parameter::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
return NULL;
}
/** \brief If I'm not sure which it is, just don't return a value. */
-void
-Parameter::string (std::string &string)
+void
+Parameter::string (std::string &/*string*/)
{
return;
}
@@ -392,7 +392,7 @@ Parameter::string (std::list <std::string> &list)
-ParamEnum::ParamEnum (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) :
+ParamEnum::ParamEnum (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * /*xml*/) :
Parameter(name, guitext, desc, scope, ext), _current_choice(NULL)
{
return;
@@ -413,13 +413,13 @@ ParamEnum::string (void)
}
Gtk::Widget *
-ParamEnum::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamEnum::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
return NULL;
}
const gchar *
-ParamEnum::set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node)
+ParamEnum::set (const gchar * /*in*/, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
{
return NULL;
}
diff --git a/src/extension/paramnotebook.cpp b/src/extension/paramnotebook.cpp
index ea74f10b4..7862edeb1 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 paramString (std::list <std::string> &list);
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;
}
@@ -166,7 +166,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;
}
@@ -180,26 +180,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);
}
@@ -215,7 +215,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);
@@ -231,7 +231,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
@@ -248,7 +248,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;
}
@@ -279,7 +279,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;
@@ -287,9 +287,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());
@@ -307,7 +307,7 @@ ParamNotebook::set (const int in, SPDocument * doc, Inkscape::XML::Node * node)
This is really a hack. The function is called by Extension::paramString() to build
the commandline string like: '--param1name=\"param1value\" --param2name=\"param2value\" ...'
- Extension::paramString expects this function to return '\"param1value\"'; but instead,
+ Extension::paramString expects this function to return '\"param1value\"'; but instead,
this function returns: '\"param1value\" --page1param1name=\"page1param1value\" ...'
\TODO Do this better. For example, make Parameter::paramString() that returns '--name=\"value\"'
@@ -363,7 +363,7 @@ public:
notebookpages are added or removed.
*/
void
-ParamNotebookWdg::changed_page(GtkNotebookPage *page,
+ParamNotebookWdg::changed_page(GtkNotebookPage */*page*/,
guint pagenum)
{
if (is_visible()) {
@@ -384,11 +384,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()));
@@ -398,7 +398,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);
diff --git a/src/extension/paramnotebook.h b/src/extension/paramnotebook.h
index 4b98ea967..7f976113a 100644
--- a/src/extension/paramnotebook.h
+++ b/src/extension/paramnotebook.h
@@ -1,5 +1,5 @@
-#ifndef __INK_EXTENSION_PARAMNOTEBOOK_H__
-#define __INK_EXTENSION_PARAMNOTEBOOK_H__
+#ifndef INK_EXTENSION_PARAMNOTEBOOK_H_SEEN
+#define INK_EXTENSION_PARAMNOTEBOOK_H_SEEN
/** \file
* Notebook parameter for extensions.
@@ -30,10 +30,10 @@ namespace Extension {
class ParamNotebook : public Parameter {
private:
/** \brief Internal value. This should point to a string that has
- been allocated in memory. And should be free'd.
+ been allocated in memory. And should be free'd.
It is the name of the current page. */
gchar * _value;
-
+
GSList * pages; /**< A table to store the pages with parameters for this notebook.
This only gets created if there are pages in this
notebook */
@@ -42,8 +42,8 @@ public:
virtual ~ParamNotebook(void);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::list <std::string> &list);
-
- const gchar * get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
+
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
const gchar * set (const int in, SPDocument * doc, Inkscape::XML::Node * node);
}; /* class ParamNotebook */
@@ -54,7 +54,7 @@ public:
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMNOTEBOOK_H__ */
+#endif /* INK_EXTENSION_PARAMNOTEBOOK_H_SEEN */
/*
Local Variables:
diff --git a/src/extension/paramradiobutton.h b/src/extension/paramradiobutton.h
index 584e45219..d7d034d60 100644
--- a/src/extension/paramradiobutton.h
+++ b/src/extension/paramradiobutton.h
@@ -1,5 +1,5 @@
-#ifndef __INK_EXTENSION_PARAMRADIOBUTTON_H__
-#define __INK_EXTENSION_PARAMRADIOBUTTON_H__
+#ifndef INK_EXTENSION_PARAMRADIOBUTTON_H_SEEN
+#define INK_EXTENSION_PARAMRADIOBUTTON_H_SEEN
/** \file
* Radiobutton parameter for extensions.
@@ -30,19 +30,19 @@ namespace Extension {
class ParamRadioButton : public Parameter {
private:
/** \brief Internal value. This should point to a string that has
- been allocated in memory. And should be free'd.
+ been allocated in memory. And should be free'd.
It is the value of the current selected string */
gchar * _value;
-
+
GSList * choices; /**< A table to store the choice strings */
-
+
public:
ParamRadioButton(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
virtual ~ParamRadioButton(void);
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void string (std::string &string);
-
- const gchar * get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
+
+ const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
}; /* class ParamRadioButton */
@@ -53,5 +53,5 @@ public:
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMRADIOBUTTON_H__ */
+#endif /* INK_EXTENSION_PARAMRADIOBUTTON_H_SEEN */
diff --git a/src/extension/patheffect.cpp b/src/extension/patheffect.cpp
index e45d0b255..8e3fc13f1 100644
--- a/src/extension/patheffect.cpp
+++ b/src/extension/patheffect.cpp
@@ -28,7 +28,7 @@ PathEffect::~PathEffect (void)
}
void
-PathEffect::processPath (SPDocument * doc, Inkscape::XML::Node * path, Inkscape::XML::Node * def)
+PathEffect::processPath (SPDocument * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/)
{