summaryrefslogtreecommitdiffstats
path: root/src/extension/param/bool.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
commit7ee81350c73388881e60a59928d26764b7172c9b (patch)
treeb561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/extension/param/bool.cpp
parentupdated to trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-7ee81350c73388881e60a59928d26764b7172c9b.tar.gz
inkscape-7ee81350c73388881e60a59928d26764b7172c9b.zip
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/extension/param/bool.cpp')
-rw-r--r--src/extension/param/bool.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index de9b1c586..2c7e32480 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -19,14 +19,19 @@
#include "../extension.h"
#include "bool.h"
#include "preferences.h"
-#include <glibmm/i18n.h>
namespace Inkscape {
namespace Extension {
-ParamBool::ParamBool(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),
- _value(false), _indent(0)
+ParamBool::ParamBool(const gchar * name,
+ const gchar * text,
+ const gchar * description,
+ bool hidden,
+ int indent,
+ Inkscape::Extension::Extension * ext,
+ Inkscape::XML::Node * xml)
+ : Parameter(name, text, description, hidden, indent, ext)
+ , _value(false)
{
const char * defaultval = NULL;
if (xml->firstChild() != NULL) {
@@ -39,11 +44,6 @@ ParamBool::ParamBool(const gchar * name, const gchar * guitext, const gchar * de
_value = false;
}
- const char * indent = xml->attribute("indent");
- if (indent != NULL) {
- _indent = atoi(indent) * 12;
- }
-
gchar * pref_name = this->pref_name();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
_value = prefs->getBool(extension_pref_root + pref_name, _value);
@@ -66,7 +66,7 @@ bool ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node
bool ParamBool::get(const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) const
{
- return _value;
+ return _value;
}
/**
@@ -126,24 +126,20 @@ void ParamBool::string(std::string &string) const
Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
- if (_gui_hidden) {
+ if (_hidden) {
return NULL;
}
-#if WITH_GTKMM_3_0
- Gtk::Box * hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4));
+ auto hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, Parameter::GUI_PARAM_WIDGETS_SPACING));
hbox->set_homogeneous(false);
-#else
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
-#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
label->show();
hbox->pack_end(*label, true, true);
ParamBoolCheckButton * checkbox = Gtk::manage(new ParamBoolCheckButton(this, doc, node, changeSignal));
checkbox->show();
- hbox->pack_start(*checkbox, false, false, _indent);
+ hbox->pack_start(*checkbox, false, false);
hbox->show();