summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2017-04-27 10:05:03 +0000
committerjabiertxof <info@marker.es>2017-04-27 10:05:03 +0000
commit18e032118bbb1718778c6f2e5e55cdb1723dc1ce (patch)
tree9463d22e1cc138e5c5a08a30b86347981f667fee /src/live_effects/parameter
parentUpdate to trunk (diff)
downloadinkscape-18e032118bbb1718778c6f2e5e55cdb1723dc1ce.tar.gz
inkscape-18e032118bbb1718778c6f2e5e55cdb1723dc1ce.zip
Add end of preferences GUI
(bzr r15620.1.6)
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/item.cpp12
-rw-r--r--src/live_effects/parameter/originalitem.cpp12
-rw-r--r--src/live_effects/parameter/originalpath.cpp12
-rw-r--r--src/live_effects/parameter/parameter.cpp12
-rw-r--r--src/live_effects/parameter/path.cpp12
-rw-r--r--src/live_effects/parameter/point.cpp12
-rw-r--r--src/live_effects/parameter/random.cpp12
-rw-r--r--src/live_effects/parameter/text.cpp12
-rw-r--r--src/live_effects/parameter/togglebutton.cpp12
-rw-r--r--src/live_effects/parameter/transformedpoint.cpp12
-rw-r--r--src/live_effects/parameter/unit.cpp12
-rw-r--r--src/live_effects/parameter/vector.cpp12
12 files changed, 132 insertions, 12 deletions
diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp
index 7b40f4540..aba61b96a 100644
--- a/src/live_effects/parameter/item.cpp
+++ b/src/live_effects/parameter/item.cpp
@@ -108,10 +108,20 @@ ItemParam::param_getSVGValue() const
Gtk::Widget *
ItemParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Gtk::HBox * _widget = Gtk::manage(new Gtk::HBox());
Gtk::Widget* pIcon = Gtk::manage( sp_icon_get_icon( INKSCAPE_ICON("edit-clone"), Inkscape::ICON_SIZE_BUTTON) );
Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
- Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label));
+ Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(label));
static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true);
pLabel->set_tooltip_text(param_tooltip);
pButton->set_relief(Gtk::RELIEF_NONE);
diff --git a/src/live_effects/parameter/originalitem.cpp b/src/live_effects/parameter/originalitem.cpp
index 053062128..8db8851bf 100644
--- a/src/live_effects/parameter/originalitem.cpp
+++ b/src/live_effects/parameter/originalitem.cpp
@@ -46,10 +46,20 @@ OriginalItemParam::~OriginalItemParam()
Gtk::Widget *
OriginalItemParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Gtk::HBox *_widget = Gtk::manage(new Gtk::HBox());
{ // Label
- Gtk::Label *pLabel = Gtk::manage(new Gtk::Label(param_label));
+ Gtk::Label *pLabel = Gtk::manage(new Gtk::Label(label));
static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true);
pLabel->set_tooltip_text(param_tooltip);
}
diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp
index 1e78f7fe1..388a3b5e6 100644
--- a/src/live_effects/parameter/originalpath.cpp
+++ b/src/live_effects/parameter/originalpath.cpp
@@ -47,10 +47,20 @@ OriginalPathParam::~OriginalPathParam()
Gtk::Widget *
OriginalPathParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Gtk::HBox *_widget = Gtk::manage(new Gtk::HBox());
{ // Label
- Gtk::Label *pLabel = Gtk::manage(new Gtk::Label(param_label));
+ Gtk::Label *pLabel = Gtk::manage(new Gtk::Label(label));
static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true);
pLabel->set_tooltip_text(param_tooltip);
}
diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp
index 15c81d543..359a51913 100644
--- a/src/live_effects/parameter/parameter.cpp
+++ b/src/live_effects/parameter/parameter.cpp
@@ -172,8 +172,18 @@ Gtk::Widget *
ScalarParam::param_newWidget()
{
if(!hide_widget){
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredScalar *rsu = Gtk::manage( new Inkscape::UI::Widget::RegisteredScalar(
- param_label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc() ) );
+ label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc() ) );
rsu->setValue(value);
rsu->setDigits(digits);
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index aa87508ab..9bdebaf47 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -170,9 +170,19 @@ PathParam::param_getSVGValue() const
Gtk::Widget *
PathParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Gtk::HBox * _widget = Gtk::manage(new Gtk::HBox());
- Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label));
+ Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(label));
static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true);
pLabel->set_tooltip_text(param_tooltip);
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp
index 561f1b34c..2fbe4b3b4 100644
--- a/src/live_effects/parameter/point.cpp
+++ b/src/live_effects/parameter/point.cpp
@@ -126,8 +126,18 @@ PointParam::param_transform_multiply(Geom::Affine const& postmul, bool /*set*/)
Gtk::Widget *
PointParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredTransformedPoint * pointwdg = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredTransformedPoint( param_label,
+ new Inkscape::UI::Widget::RegisteredTransformedPoint( label,
param_tooltip,
param_key,
*param_wr,
diff --git a/src/live_effects/parameter/random.cpp b/src/live_effects/parameter/random.cpp
index 90e53ca0e..bcba05399 100644
--- a/src/live_effects/parameter/random.cpp
+++ b/src/live_effects/parameter/random.cpp
@@ -129,8 +129,18 @@ RandomParam::resetRandomizer()
Gtk::Widget *
RandomParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredRandom* regrandom = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredRandom( param_label,
+ new Inkscape::UI::Widget::RegisteredRandom( label,
param_tooltip,
param_key,
*param_wr,
diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp
index 8d526e4cc..5c56e8447 100644
--- a/src/live_effects/parameter/text.cpp
+++ b/src/live_effects/parameter/text.cpp
@@ -119,8 +119,18 @@ TextParam::param_getSVGValue() const
Gtk::Widget *
TextParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredText *rsu = Gtk::manage(new Inkscape::UI::Widget::RegisteredText(
- param_label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc()));
+ label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc()));
rsu->setText(value);
rsu->setProgrammatically = false;
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index 4eaa1aeb2..1d1bc82a6 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -75,12 +75,22 @@ ToggleButtonParam::param_update_default(const gchar * default_value)
Gtk::Widget *
ToggleButtonParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
if (_toggled_connection.connected()) {
_toggled_connection.disconnect();
}
checkwdg = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredToggleButton( param_label,
+ new Inkscape::UI::Widget::RegisteredToggleButton( label,
param_tooltip,
param_key,
*param_wr,
diff --git a/src/live_effects/parameter/transformedpoint.cpp b/src/live_effects/parameter/transformedpoint.cpp
index 22d5ba3a4..2081a8c0c 100644
--- a/src/live_effects/parameter/transformedpoint.cpp
+++ b/src/live_effects/parameter/transformedpoint.cpp
@@ -104,8 +104,18 @@ TransformedPointParam::param_update_default(const gchar * default_point)
Gtk::Widget *
TransformedPointParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredVector * pointwdg = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredVector( param_label,
+ new Inkscape::UI::Widget::RegisteredVector( label,
param_tooltip,
param_key,
*param_wr,
diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp
index b78b75dbf..684f29555 100644
--- a/src/live_effects/parameter/unit.cpp
+++ b/src/live_effects/parameter/unit.cpp
@@ -75,8 +75,18 @@ UnitParam::get_abbreviation() const
Gtk::Widget *
UnitParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredUnitMenu* unit_menu = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredUnitMenu(param_label,
+ new Inkscape::UI::Widget::RegisteredUnitMenu(label,
param_key,
*param_wr,
param_effect->getRepr(),
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp
index 470fa9c2d..d6593871d 100644
--- a/src/live_effects/parameter/vector.cpp
+++ b/src/live_effects/parameter/vector.cpp
@@ -104,8 +104,18 @@ VectorParam::param_getSVGValue() const
Gtk::Widget *
VectorParam::param_newWidget()
{
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
+ Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
+ effectkey +
+ (Glib::ustring)"/" +
+ (Glib::ustring)param_key;
+ Glib::ustring label = param_label;
+ if(prefs->getEntry(pref_path).isValid()){
+ label = (Glib::ustring)"* " + param_label;
+ }
Inkscape::UI::Widget::RegisteredVector * pointwdg = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredVector( param_label,
+ new Inkscape::UI::Widget::RegisteredVector( label,
param_tooltip,
param_key,
*param_wr,