summaryrefslogtreecommitdiffstats
path: root/src/extension/param/enum.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-03-16 19:08:44 +0000
committerJabiertxof <jtx@jtx>2017-03-16 19:08:44 +0000
commit8330d0ef2b97c73121ead78ea9fbcec6ee01f879 (patch)
tree1b1717d1706ee6ebfecc800f2cc80430eb0450e0 /src/extension/param/enum.cpp
parentupdate to trunk (diff)
parentFix rendering when canvas rotated. General code clean-up and documentation. (diff)
downloadinkscape-8330d0ef2b97c73121ead78ea9fbcec6ee01f879.tar.gz
inkscape-8330d0ef2b97c73121ead78ea9fbcec6ee01f879.zip
Update to trunk
(bzr r13645.1.170)
Diffstat (limited to 'src/extension/param/enum.cpp')
-rw-r--r--src/extension/param/enum.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 8bc0fbda7..a26458c35 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -46,12 +46,17 @@ public:
};
-ParamComboBox::ParamComboBox(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)
- : Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, ext)
+ParamComboBox::ParamComboBox(const gchar * name,
+ const gchar * guitext,
+ const gchar * desc,
+ const Parameter::_scope_t scope,
+ bool gui_hidden,
+ const gchar * gui_tip,
+ int indent,
+ Inkscape::Extension::Extension * ext,
+ Inkscape::XML::Node * xml)
+ : Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, indent, ext)
, _value(NULL)
- , _indent(0)
, choices(NULL)
{
const char *xmlval = NULL; // the value stored in XML
@@ -94,17 +99,12 @@ ParamComboBox::ParamComboBox(const gchar *name, const gchar *guitext, const gcha
}
}
}
-
+
// Initialize _value with the default value from xml
// for simplicity : default to the contents of the first xml-child
if (xml->firstChild() && xml->firstChild()->firstChild()) {
xmlval = xml->firstChild()->attribute("value");
}
-
- const char *indent = xml->attribute("indent");
- if (indent != NULL) {
- _indent = atoi(indent) * 12;
- }
}
gchar * pref_name = this->pref_name();
@@ -250,10 +250,10 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
return NULL;
}
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, Parameter::GUI_PARAM_WIDGETS_SPACING));
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
- hbox->pack_start(*label, false, false, _indent);
+ hbox->pack_start(*label, false, false);
ParamComboBoxEntry * combo = Gtk::manage(new ParamComboBoxEntry(this, doc, node, changeSignal));
// add choice strings: