summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba77596)
raw | patch | inline | side by side (parent: ba77596)
author | joncruz <joncruz@users.sourceforge.net> | |
Thu, 28 Feb 2008 07:19:26 +0000 (07:19 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Thu, 28 Feb 2008 07:19:26 +0000 (07:19 +0000) |
16 files changed:
index 40cbba8c6d3b61b80b72cd908bd16d81ebea203c..f0c9fd8b70e785c0ae920519fa3d6b8c62f95056 100644 (file)
/** \brief Create a label for the description */
Gtk::Widget *
-ParamDescription::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_value)));
label->set_line_wrap();
index 58c2d3a454c3b5934105efba98d078a6d87ba196..36020f6d141a35b637712dda40eef14f4c5fbbaa 100644 (file)
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 */
index 78b84e61226c7bbc8eda0f4f731b3fe551293b9c..9118a07addcfcba08d88946a6bc9f85336422e4d 100644 (file)
-#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.
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);
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 */
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMENUM_H__ */
+#endif /* INK_EXTENSION_PARAMENUM_H_SEEN */
/*
Local Variables:
index 4af448b2057c06cea1f6f643732966640ce34e7f..0db8d0199e1b4005cc591f192b392b4d108d3d6f 100644 (file)
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);
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);
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);
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);
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);
/** \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;
}
-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;
}
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;
}
index 308b0b88e8cdb1b3869185871d3a040186d54ebb..0d9668a550d7c1f4041b1eb3ffab5c2601855892 100644 (file)
-#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.
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<void> * changeSignal);
virtual Glib::ustring * string (void);
- virtual void insert_subparam_strings(std::list <std::string> &retlist) {};
+ virtual void insert_subparam_strings(std::list <std::string> &/*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:
index 2d41720c947a6ea6b1cf4db694cccecd159de42c..11172ecbb858018c5cf9c8b3d29e7c972c33b0f8 100644 (file)
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;
index fb8f8d5f8336a4873bbefc884539aa29cf78f361..7fd62126739d59b8e311e3023fa0386988cefacc 100644 (file)
-#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:
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; }
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMFLOAT_H */
+#endif /* INK_EXTENSION_PARAMFLOAT_H_SEEN */
/*
Local Variables:
index 316d104edfffc4a6671584d943f3f24c46ca9053..e59cf1c3469b50dfc9efedde0bd7ec79248cedcd 100644 (file)
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;
index 2496b722fe68bc7684fa50ae9c23e8393a5cabdd..fe5de0d17b554686a5b291664cac2f8442704830 100644 (file)
--- a/src/extension/paramint.h
+++ b/src/extension/paramint.h
-#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:
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; }
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMINT_H */
+#endif /* INK_EXTENSION_PARAMINT_H_SEEN */
/*
Local Variables:
index 288186c8f42a96460f28a4620a6357966f3cdc15..041dd6370b8f8a4a08f71b2993ed1d171cebb87e 100644 (file)
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);
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 */
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);
child_repr = sp_repr_next(child_repr);
}
}
-
+
return;
}
/**
\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;
}
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;
page = reinterpret_cast<ParamNotebookPage *>(list->data);
i++;
}
-
+
if (page == NULL) return _value;
-
+
if (_value != NULL) g_free(_value);
_value = g_strdup(page->name());
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);
index 78d56777cc2c537437cd3d4052df08060e8676ce..554c0826ba2982c14e248f2172236a1ffd255e4b 100644 (file)
-#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.
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 */
Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
Glib::ustring * string (void);
virtual void insert_subparam_strings(std::list <std::string> &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 */
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMNOTEBOOK_H__ */
+#endif /* INK_EXTENSION_PARAMNOTEBOOK_H_SEEN */
/*
Local Variables:
index c59e5c7621a5484ce9c6e0b160fb618f4b815988..1c7e3953f2857661916f5e8b151fb534c8bd0325 100644 (file)
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 */
\brief Creates a combobox widget for an enumeration parameter
*/
Gtk::Widget *
-ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * /*changeSignal*/)
{
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0));
index ddbdcc7b8996054144072f4d715198b4e6d6efd8..be201a8719a62bc7a8b3b7c69a588afb7926bdd9 100644 (file)
-#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.
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);
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 */
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMRADIOBUTTON_H__ */
+#endif /* INK_EXTENSION_PARAMRADIOBUTTON_H_SEEN */
index f75f891b5b008716b5e716f3646b7d45d8a176ed..fe08bc5007368caa66fb4fd0b12f26cdcc344915 100644 (file)
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 */
index 2f8e29c9c39a66276c62c73139ca3c47ea2acae1..eaadd95d7cfd41987bc5dd4022e10b127d4e6655 100644 (file)
-#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:
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<void> * changeSignal);
Glib::ustring * string (void);
} /* namespace Extension */
} /* namespace Inkscape */
-#endif /* __INK_EXTENSION_PARAMSTRING_H */
+#endif /* INK_EXTENSION_PARAMSTRING_H_SEEN */
/*
Local Variables:
index 8ea410da31b15da9c50fcf9ca52c0fd3878a5389..6362260ccc09edbc9428d8ef84af3d110b06f8a9 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
}
}
-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)
{
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);
}
}
}
-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<Persp3D *> 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;
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 : "";
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();
}
}
SPStyle *query =
sp_style_new (SP_ACTIVE_DOCUMENT);
-
+
int result_fontspec =
sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION);
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:
}
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;
free (text);
}
if (value <= 0) {
- return; // could not parse value
+ return; // could not parse value
}
SPCSSAttr *css = sp_repr_css_attr_new ();
}
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;
}
gboolean
-sp_text_toolbox_popdown_focus_in (GtkWidget *popdown,
+sp_text_toolbox_popdown_focus_in (GtkWidget */*popdown*/,
GdkEventFocus */*event*/,
GObject */*tbl*/)
{