summaryrefslogtreecommitdiffstats
path: root/src/extension/param
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-06-11 15:34:03 +0000
committerjabiertxof <info@marker.es>2016-06-11 15:34:03 +0000
commitd6b2e2cdeb563026cc9f4633e687a607b095da87 (patch)
treeb25e3e95e5e96782232e65d0d9889fcb12c2f285 /src/extension/param
parentFixing satellites bug on erase (diff)
parentA little cleaning up of attributes. (diff)
downloadinkscape-d6b2e2cdeb563026cc9f4633e687a607b095da87.tar.gz
inkscape-d6b2e2cdeb563026cc9f4633e687a607b095da87.zip
update to trunk
(bzr r13645.1.147)
Diffstat (limited to 'src/extension/param')
-rw-r--r--src/extension/param/bool.cpp2
-rw-r--r--src/extension/param/enum.cpp2
-rw-r--r--src/extension/param/float.cpp4
-rw-r--r--src/extension/param/int.cpp4
-rw-r--r--src/extension/param/parameter.cpp11
-rw-r--r--src/extension/param/radiobutton.cpp2
-rw-r--r--src/extension/param/string.cpp2
7 files changed, 19 insertions, 8 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index de9b1c586..87364d80f 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -137,7 +137,7 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node,
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);
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 8bc0fbda7..4e7420807 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -251,7 +251,7 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- 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_start(*label, false, false, _indent);
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index 81508f6c0..4e3cbfedc 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -186,7 +186,7 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, _precision);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, _precision);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
@@ -194,7 +194,7 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
}
else if (_mode == MINIMAL) {
- 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_start(*label, true, true, _indent);
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index c286018fd..605aab5ad 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -168,14 +168,14 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, 0);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, 0);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
}
else if (_mode == MINIMAL) {
- 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_start(*label, true, true, _indent);
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index 10029893f..27d9bdf9b 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -20,6 +20,7 @@
#endif
#include <cstring>
+#include <glibmm/i18n.h>
#include "ui/widget/color-notebook.h"
#include <xml/node.h>
@@ -56,6 +57,16 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex
const char *guitext = in_repr->attribute("gui-text");
if (guitext == NULL) {
guitext = in_repr->attribute("_gui-text");
+ if (guitext == NULL) {
+ // guitext = ""; // propably better to require devs to explicitly set an empty gui-text if this is what they want
+ } else {
+ const char *context = in_repr->attribute("msgctxt");
+ if (context != NULL) {
+ guitext = g_dpgettext2(NULL, context, guitext);
+ } else {
+ guitext = _(guitext);
+ }
+ }
}
const char *gui_tip = in_repr->attribute("gui-tip");
if (gui_tip == NULL) {
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 8181c6f51..1d1b860c6 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -313,7 +313,7 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node
Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0));
#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index 1d9205502..6b082b133 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -166,7 +166,7 @@ Gtk::Widget * ParamString::get_widget(SPDocument * doc, Inkscape::XML::Node * no
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- 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_start(*label, false, false, _indent);