diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-12-19 06:54:08 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-12-19 06:54:08 +0000 |
| commit | af07ce24271fc904e432cdf77714f49b8cbc8db8 (patch) | |
| tree | 7744dbace5c21eb373a5225e03757c8d403ab5ae /src/extension/param/string.h | |
| parent | Remove more deprecated GTK macros (diff) | |
| download | inkscape-af07ce24271fc904e432cdf77714f49b8cbc8db8.tar.gz inkscape-af07ce24271fc904e432cdf77714f49b8cbc8db8.zip | |
Const correctness fixes that also correct bug #893146.
Fixed bugs:
- https://launchpad.net/bugs/893146
(bzr r10783)
Diffstat (limited to 'src/extension/param/string.h')
| -rw-r--r-- | src/extension/param/string.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/extension/param/string.h b/src/extension/param/string.h index a1892fe9c..8e7f093f7 100644 --- a/src/extension/param/string.h +++ b/src/extension/param/string.h @@ -5,6 +5,7 @@ * Copyright (C) 2005-2007 Authors: * Ted Gould <ted@gould.cx> * Johan Engelen <johan@shouraizou.nl> * + * Jon A. Cruz <jon@joncruz.org> * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -28,18 +29,26 @@ private: public: ParamString(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, 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(SPDocument const * /*doc*/, Inkscape::XML::Node const * /*node*/) const { 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); - void string (std::string &string); + + // Explicitly call superclass version to avoid method being hidden. + virtual void string(std::list <std::string> &list) const { return Parameter::string(list); } + + virtual void string(std::string &string) const; + void setMaxLength(int maxLenght) { _max_length = maxLenght; } int getMaxLength(void) { return _max_length; } }; -} /* namespace Extension */ -} /* namespace Inkscape */ +} // namespace Extension +} // namespace Inkscape #endif /* INK_EXTENSION_PARAMSTRING_H_SEEN */ |
