diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-09 14:46:33 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-09 14:46:33 +0000 |
| commit | bc1ecf9dd11d0b3bb6939114ce6aec229fc86548 (patch) | |
| tree | b28ae5ea0ca1186320745ea5653aeaba06e61e6c /src/extension/param/radiobutton.cpp | |
| parent | Remove unused field "scope" (diff) | |
| download | inkscape-bc1ecf9dd11d0b3bb6939114ce6aec229fc86548.tar.gz inkscape-bc1ecf9dd11d0b3bb6939114ce6aec229fc86548.zip | |
Some code refactoring for consistency
(notably "gui_hidden" -> hidden", "guitext" -> "text", "desc" -> "description")
(bzr r15633.1.3)
Diffstat (limited to 'src/extension/param/radiobutton.cpp')
| -rw-r--r-- | src/extension/param/radiobutton.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index 166167fda..2e757febe 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -41,31 +41,31 @@ namespace Inkscape { namespace Extension { /* For internal use only. - Note that value and guitext MUST be non-NULL. This is ensured by newing only at one location in the code where non-NULL checks are made. */ + Note that value and text MUST be non-NULL. This is ensured by newing only at one location in the code where non-NULL checks are made. */ class optionentry { public: optionentry (Glib::ustring * val, Glib::ustring * text) { value = val; - guitext = text; + text = text; } ~optionentry() { delete value; - delete guitext; + delete text; } Glib::ustring * value; - Glib::ustring * guitext; + Glib::ustring * text; }; ParamRadioButton::ParamRadioButton(const gchar * name, - const gchar * guitext, - const gchar * desc, - bool gui_hidden, + const gchar * text, + const gchar * description, + bool hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml, AppearanceMode mode) - : Parameter(name, guitext, desc, gui_hidden, indent, ext) + : Parameter(name, text, description, hidden, indent, ext) , _value(0) , _mode(mode) , choices(0) @@ -77,7 +77,7 @@ ParamRadioButton::ParamRadioButton(const gchar * name, while (child_repr != NULL) { char const * chname = child_repr->name(); if (!strcmp(chname, INKSCAPE_EXTENSION_NS "option") || !strcmp(chname, INKSCAPE_EXTENSION_NS "_option")) { - Glib::ustring * newguitext = NULL; + Glib::ustring * newtext = NULL; Glib::ustring * newvalue = NULL; const char * contents = child_repr->firstChild()->content(); @@ -85,12 +85,12 @@ ParamRadioButton::ParamRadioButton(const gchar * name, // don't translate when 'item' but do translate when '_option' if (!strcmp(chname, INKSCAPE_EXTENSION_NS "_option")) { if (child_repr->attribute("msgctxt") != NULL) { - newguitext = new Glib::ustring(g_dpgettext2(NULL, child_repr->attribute("msgctxt"), contents)); + newtext = new Glib::ustring(g_dpgettext2(NULL, child_repr->attribute("msgctxt"), contents)); } else { - newguitext = new Glib::ustring(_(contents)); + newtext = new Glib::ustring(_(contents)); } } else { - newguitext = new Glib::ustring(contents); + newtext = new Glib::ustring(contents); } } else { continue; @@ -104,8 +104,8 @@ ParamRadioButton::ParamRadioButton(const gchar * name, newvalue = new Glib::ustring(contents); } - if ( (newguitext) && (newvalue) ) { // logical error if this is not true here - choices = g_slist_append( choices, new optionentry(newvalue, newguitext) ); + if ( (newtext) && (newvalue) ) { // logical error if this is not true here + choices = g_slist_append( choices, new optionentry(newvalue, newtext) ); } } child_repr = child_repr->next(); @@ -280,7 +280,7 @@ Glib::ustring ParamRadioButton::value_from_label(const Glib::ustring label) for (GSList * list = choices; list != NULL; list = g_slist_next(list)) { optionentry * entr = reinterpret_cast<optionentry *>(list->data); - if ( !entr->guitext->compare(label) ) { + if ( !entr->text->compare(label) ) { value = *(entr->value); break; } @@ -295,7 +295,7 @@ Glib::ustring ParamRadioButton::value_from_label(const Glib::ustring label) */ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { - if (_gui_hidden) { + if (_hidden) { return NULL; } @@ -321,7 +321,7 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node Gtk::RadioButtonGroup group; for (GSList * list = choices; list != NULL; list = g_slist_next(list)) { optionentry * entr = reinterpret_cast<optionentry *>(list->data); - Glib::ustring * text = entr->guitext; + Glib::ustring * text = entr->text; switch ( _mode ) { case MINIMAL: { |
