From: joncruz Date: Thu, 28 Feb 2008 07:19:26 +0000 (+0000) Subject: Warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=282963165a505f1e709cf741fb2825b6a78cdd6c;p=inkscape.git Warning cleanup --- diff --git a/src/extension/paramdescription.cpp b/src/extension/paramdescription.cpp index 40cbba8c6..f0c9fd8b7 100644 --- a/src/extension/paramdescription.cpp +++ b/src/extension/paramdescription.cpp @@ -50,7 +50,7 @@ ParamDescription::ParamDescription (const gchar * name, const gchar * guitext, c /** \brief Create a label for the description */ Gtk::Widget * -ParamDescription::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) { Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_value))); label->set_line_wrap(); diff --git a/src/extension/paramenum.cpp b/src/extension/paramenum.cpp index 58c2d3a45..36020f6d1 100644 --- a/src/extension/paramenum.cpp +++ b/src/extension/paramenum.cpp @@ -139,7 +139,7 @@ ParamComboBox::~ParamComboBox (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamComboBox::set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node) +ParamComboBox::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ diff --git a/src/extension/paramenum.h b/src/extension/paramenum.h index 78b84e612..9118a07ad 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 * changeSignal); Glib::ustring * string (void); - - 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 4af448b20..0db8d0199 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 * 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(this); + ParamBool * boolpntr = dynamic_cast(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(this); + ParamInt * intpntr = dynamic_cast(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(this); + ParamFloat * floatpntr = dynamic_cast(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(this); + ParamInt * intpntr = dynamic_cast(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(this); + ParamString * stringpntr = dynamic_cast(this); if (stringpntr == NULL) throw Extension::param_not_string_param(); return stringpntr->set(in, doc, node); @@ -357,7 +357,7 @@ 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 * changeSignal) +Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) { return NULL; } @@ -374,7 +374,7 @@ Parameter::string (void) -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; @@ -395,13 +395,13 @@ ParamEnum::string (void) } Gtk::Widget * -ParamEnum::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamEnum::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*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/parameter.h b/src/extension/parameter.h index 308b0b88e..0d9668a55 100644 --- a/src/extension/parameter.h +++ b/src/extension/parameter.h @@ -1,5 +1,5 @@ -#ifndef __INK_EXTENSION_PARAM_H__ -#define __INK_EXTENSION_PARAM_H__ +#ifndef INK_EXTENSION_PARAM_H_SEEN +#define INK_EXTENSION_PARAM_H_SEEN /** \file * Parameters for extensions. @@ -89,28 +89,28 @@ public: const Inkscape::XML::Node * node); guint32 get_color (const SPDocument * doc, const Inkscape::XML::Node * node); - const gchar * get_enum (const SPDocument * doc, + const gchar * get_enum (const SPDocument * doc, const Inkscape::XML::Node * node); bool set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node); int set_int (int in, SPDocument * doc, Inkscape::XML::Node * node); float set_float (float in, SPDocument * doc, Inkscape::XML::Node * node); const gchar * set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node); - guint32 set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node); + guint32 set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node); const gchar * name (void) {return _name;} static Parameter * make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * in_ext); virtual Gtk::Widget * get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal); virtual Glib::ustring * string (void); - virtual void insert_subparam_strings(std::list &retlist) {}; + virtual void insert_subparam_strings(std::list &/*retlist*/) {}; gchar const * get_tooltip (void) { return _desc; } }; } /* namespace Extension */ } /* namespace Inkscape */ -#endif /* __INK_EXTENSION_PARAM_H__ */ +#endif /* INK_EXTENSION_PARAM_H_SEEN */ /* Local Variables: diff --git a/src/extension/paramfloat.cpp b/src/extension/paramfloat.cpp index 2d41720c9..11172ecbb 100644 --- a/src/extension/paramfloat.cpp +++ b/src/extension/paramfloat.cpp @@ -74,7 +74,7 @@ ParamFloat::ParamFloat (const gchar * name, const gchar * guitext, const gchar * and \c pref_name() are used. */ float -ParamFloat::set (float in, SPDocument * doc, Inkscape::XML::Node * node) +ParamFloat::set (float in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { _value = in; if (_value > _max) _value = _max; diff --git a/src/extension/paramfloat.h b/src/extension/paramfloat.h index fb8f8d5f8..7fd621267 100644 --- a/src/extension/paramfloat.h +++ b/src/extension/paramfloat.h @@ -1,5 +1,5 @@ -#ifndef __INK_EXTENSION_PARAMFLOAT_H -#define __INK_EXTENSION_PARAMFLOAT_H +#ifndef INK_EXTENSION_PARAMFLOAT_H_SEEN +#define INK_EXTENSION_PARAMFLOAT_H_SEEN /* * Copyright (C) 2005-2007 Authors: @@ -26,7 +26,7 @@ private: public: ParamFloat (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); /** \brief Returns \c _value */ - float get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; } + float get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } float set (float in, SPDocument * doc, Inkscape::XML::Node * node); float max (void) { return _max; } float min (void) { return _min; } @@ -38,7 +38,7 @@ public: } /* namespace Extension */ } /* namespace Inkscape */ -#endif /* __INK_EXTENSION_PARAMFLOAT_H */ +#endif /* INK_EXTENSION_PARAMFLOAT_H_SEEN */ /* Local Variables: diff --git a/src/extension/paramint.cpp b/src/extension/paramint.cpp index 316d104ed..e59cf1c34 100644 --- a/src/extension/paramint.cpp +++ b/src/extension/paramint.cpp @@ -69,7 +69,7 @@ ParamInt::ParamInt (const gchar * name, const gchar * guitext, const gchar * des and \c pref_name() are used. */ int -ParamInt::set (int in, SPDocument * doc, Inkscape::XML::Node * node) +ParamInt::set (int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { _value = in; if (_value > _max) _value = _max; diff --git a/src/extension/paramint.h b/src/extension/paramint.h index 2496b722f..fe5de0d17 100644 --- a/src/extension/paramint.h +++ b/src/extension/paramint.h @@ -1,5 +1,5 @@ -#ifndef __INK_EXTENSION_PARAMINT_H -#define __INK_EXTENSION_PARAMINT_H +#ifndef INK_EXTENSION_PARAMINT_H_SEEN +#define INK_EXTENSION_PARAMINT_H_SEEN /* * Copyright (C) 2005-2007 Authors: @@ -25,7 +25,7 @@ private: public: ParamInt (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); /** \brief Returns \c _value */ - int get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; } + int get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } int set (int in, SPDocument * doc, Inkscape::XML::Node * node); int max (void) { return _max; } int min (void) { return _min; } @@ -36,7 +36,7 @@ public: } /* namespace Extension */ } /* namespace Inkscape */ -#endif /* __INK_EXTENSION_PARAMINT_H */ +#endif /* INK_EXTENSION_PARAMINT_H_SEEN */ /* Local Variables: 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 * changeSignal); void insert_subparam_strings (std::list &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 * 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(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(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(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(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(nb); diff --git a/src/extension/paramnotebook.h b/src/extension/paramnotebook.h index 78d56777c..554c0826b 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 */ @@ -43,8 +43,8 @@ public: Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal); Glib::ustring * string (void); virtual void insert_subparam_strings(std::list &retlist); - - 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 */ @@ -55,7 +55,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.cpp b/src/extension/paramradiobutton.cpp index c59e5c762..1c7e3953f 100644 --- a/src/extension/paramradiobutton.cpp +++ b/src/extension/paramradiobutton.cpp @@ -139,7 +139,7 @@ ParamRadioButton::~ParamRadioButton (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamRadioButton::set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node) +ParamRadioButton::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ @@ -221,7 +221,7 @@ ParamRadioButtonWdg::changed (void) \brief Creates a combobox widget for an enumeration parameter */ Gtk::Widget * -ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * /*changeSignal*/) { Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4)); Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0)); diff --git a/src/extension/paramradiobutton.h b/src/extension/paramradiobutton.h index ddbdcc7b8..be201a871 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 * changeSignal); Glib::ustring * string (void); - - 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/paramstring.cpp b/src/extension/paramstring.cpp index f75f891b5..fe08bc500 100644 --- a/src/extension/paramstring.cpp +++ b/src/extension/paramstring.cpp @@ -42,7 +42,7 @@ ParamString::~ParamString(void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamString::set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node) +ParamString::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ diff --git a/src/extension/paramstring.h b/src/extension/paramstring.h index 2f8e29c9c..eaadd95d7 100644 --- a/src/extension/paramstring.h +++ b/src/extension/paramstring.h @@ -1,5 +1,5 @@ -#ifndef __INK_EXTENSION_PARAMSTRING_H -#define __INK_EXTENSION_PARAMSTRING_H +#ifndef INK_EXTENSION_PARAMSTRING_H_SEEN +#define INK_EXTENSION_PARAMSTRING_H_SEEN /* * Copyright (C) 2005-2007 Authors: @@ -25,7 +25,7 @@ public: ParamString(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); virtual ~ParamString(void); /** \brief Returns \c _value, with a \i const to protect it. */ - 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); Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal); Glib::ustring * string (void); @@ -35,7 +35,7 @@ public: } /* namespace Extension */ } /* namespace Inkscape */ -#endif /* __INK_EXTENSION_PARAMSTRING_H */ +#endif /* INK_EXTENSION_PARAMSTRING_H_SEEN */ /* Local Variables: diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 8ea410da3..6362260cc 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2423,7 +2423,7 @@ box3d_resync_toolbar(Inkscape::XML::Node *persp_repr, GObject *data) { } } -static void box3d_persp_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const *name, +static void box3d_persp_tb_event_attr_changed(Inkscape::XML::Node *repr, gchar const */*name*/, gchar const */*old_value*/, gchar const */*new_value*/, bool /*is_interactive*/, gpointer data) { @@ -2490,7 +2490,7 @@ box3d_toolbox_selection_changed(Inkscape::Selection *selection, GObject *tbl) inkscape_active_document()->current_persp3d = persp3d_get_from_repr(persp_repr); prefs_set_string_attribute("tools.shapes.3dbox", "persp", persp_repr->attribute("id")); - + box3d_resync_toolbar(persp_repr, tbl); } } @@ -2548,7 +2548,7 @@ box3d_angle_z_value_changed(GtkAdjustment *adj, GObject *dataKludge) } -static void box3d_vp_state_changed( GtkToggleAction *act, GtkAction *box3d_angle, Proj::Axis axis ) +static void box3d_vp_state_changed( GtkToggleAction *act, GtkAction */*box3d_angle*/, Proj::Axis axis ) { // TODO: Take all selected perspectives into account std::set sel_persps = persp3d_currently_selected_persps(); @@ -3985,7 +3985,7 @@ sp_text_toolbox_selection_changed (Inkscape::Selection */*selection*/, GObject * { SPStyle *query = sp_style_new (SP_ACTIVE_DOCUMENT); - + int result_fontspec = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION); @@ -4024,17 +4024,17 @@ sp_text_toolbox_selection_changed (Inkscape::Selection */*selection*/, GObject * } else if (query->text->font_specification.value || query->text->font_family.value) { GtkWidget *entry = GTK_WIDGET (g_object_get_data (G_OBJECT (tbl), "family-entry")); - - // Get the font that corresponds + + // Get the font that corresponds Glib::ustring familyName; - + font_instance * font = font_factory::Default()->FaceFromStyle(query); if (font) { familyName = font_factory::Default()->GetUIFamilyString(font->descr); font->Unref(); font = NULL; } - + gtk_entry_set_text (GTK_ENTRY (entry), familyName.c_str()); Gtk::TreePath path; @@ -4195,10 +4195,10 @@ sp_text_toolbox_family_changed (GtkTreeSelection *selection, sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION); font_instance * fontFromStyle = font_factory::Default()->FaceFromStyle(query); - + SPCSSAttr *css = sp_repr_css_attr_new (); - - + + // First try to get the font spec from the stored value Glib::ustring fontSpec = query->text->font_specification.set ? query->text->font_specification.value : ""; @@ -4208,34 +4208,34 @@ sp_text_toolbox_family_changed (GtkTreeSelection *selection, fontSpec = font_factory::Default()->ConstructFontSpecification(fontFromStyle); fontFromStyle->Unref(); } - + if (!fontSpec.empty()) { Glib::ustring newFontSpec = font_factory::Default()->ReplaceFontSpecificationFamily(fontSpec, family); if (!newFontSpec.empty() && fontSpec != newFontSpec) { font_instance *font = font_factory::Default()->FaceFromFontSpecification(newFontSpec.c_str()); if (font) { sp_repr_css_set_property (css, "-inkscape-font-specification", newFontSpec.c_str()); - + // Set all the these just in case they were altered when finding the best // match for the new family and old style... - + gchar c[256]; - + font->Family(c, 256); sp_repr_css_set_property (css, "font-family", c); - + font->Attribute( "weight", c, 256); sp_repr_css_set_property (css, "font-weight", c); - + font->Attribute("style", c, 256); sp_repr_css_set_property (css, "font-style", c); - + font->Attribute("stretch", c, 256); sp_repr_css_set_property (css, "font-stretch", c); - + font->Attribute("variant", c, 256); sp_repr_css_set_property (css, "font-variant", c); - + font->Unref(); } } @@ -4359,7 +4359,7 @@ sp_text_toolbox_style_toggled (GtkToggleButton *button, SPStyle *query = sp_style_new (SP_ACTIVE_DOCUMENT); - + int result_fontspec = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION); @@ -4371,17 +4371,17 @@ sp_text_toolbox_style_toggled (GtkToggleButton *button, int result_numbers = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTNUMBERS); - + Glib::ustring fontSpec = query->text->font_specification.set ? query->text->font_specification.value : ""; Glib::ustring newFontSpec = ""; - + if (fontSpec.empty()) { // Construct a new font specification if it does not yet exist font_instance * fontFromStyle = font_factory::Default()->FaceFromStyle(query); fontSpec = font_factory::Default()->ConstructFontSpecification(fontFromStyle); fontFromStyle->Unref(); } - + switch (prop) { case 0: @@ -4410,7 +4410,7 @@ sp_text_toolbox_style_toggled (GtkToggleButton *button, } if (!newFontSpec.empty()) { - sp_repr_css_set_property (css, "-inkscape-font-specification", newFontSpec.c_str()); + sp_repr_css_set_property (css, "-inkscape-font-specification", newFontSpec.c_str()); } // If querying returned nothing, read the style from the text tool prefs (default style for new texts) @@ -4507,8 +4507,8 @@ sp_text_toolbox_family_list_keypress (GtkWidget *w, GdkEventKey *event, GObject gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas)); return TRUE; // I consumed the event break; - case GDK_w: - case GDK_W: + case GDK_w: + case GDK_W: if (event->state & GDK_CONTROL_MASK) { gtk_widget_hide (w); popdown_visible = false; @@ -4546,7 +4546,7 @@ sp_text_toolbox_size_changed (GtkComboBox *cbox, free (text); } if (value <= 0) { - return; // could not parse value + return; // could not parse value } SPCSSAttr *css = sp_repr_css_attr_new (); @@ -4576,7 +4576,7 @@ sp_text_toolbox_size_changed (GtkComboBox *cbox, } gboolean -sp_text_toolbox_size_focusout (GtkWidget */*w*/, GdkEventFocus *event, GObject *tbl) +sp_text_toolbox_size_focusout (GtkWidget */*w*/, GdkEventFocus */*event*/, GObject *tbl) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; if (!desktop) return FALSE; @@ -4680,7 +4680,7 @@ sp_text_toolbox_popdown_focus_out (GtkWidget *popdown, } gboolean -sp_text_toolbox_popdown_focus_in (GtkWidget *popdown, +sp_text_toolbox_popdown_focus_in (GtkWidget */*popdown*/, GdkEventFocus */*event*/, GObject */*tbl*/) {