diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:58:51 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:58:51 +0000 |
| commit | e5143d65bb57d4ce623e6220585b099e6d2ee453 (patch) | |
| tree | 4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/extension/param | |
| parent | Remove deprecated Autotools and btool files. Please use CMake instead (diff) | |
| parent | Merged trunk (diff) | |
| download | inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.tar.gz inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.zip | |
Merged gsoc work. Created better data structure for selections, replaced SPObject children list, improved spray tool, split tests to separate executables
(bzr r15047)
Diffstat (limited to 'src/extension/param')
| -rw-r--r-- | src/extension/param/bool.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/enum.cpp | 2 | ||||
| -rw-r--r-- | src/extension/param/float.cpp | 5 | ||||
| -rw-r--r-- | src/extension/param/int.cpp | 5 | ||||
| -rw-r--r-- | src/extension/param/parameter.cpp | 10 | ||||
| -rw-r--r-- | src/extension/param/radiobutton.cpp | 2 | ||||
| -rw-r--r-- | src/extension/param/string.cpp | 2 |
7 files changed, 11 insertions, 18 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index e67d3e3f5..ca61d8c51 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -14,6 +14,7 @@ #include <gtkmm/box.h> #include <gtkmm/spinbutton.h> #include <gtkmm/checkbutton.h> +#include <glib/gi18n.h> #include "xml/node.h" #include "../extension.h" @@ -132,7 +133,7 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node, auto hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4)); hbox->set_homogeneous(false); - 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 4e7420807..8bc0fbda7 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 d4c33ec94..23a03ea8f 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -15,6 +15,7 @@ #include <gtkmm/scale.h> #include "ui/widget/spinbutton.h" #include "ui/widget/spin-scale.h" +#include <glib/gi18n.h> #include "xml/node.h" #include "extension/extension.h" @@ -181,7 +182,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); @@ -189,7 +190,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 533ee3886..222d4f243 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -15,6 +15,7 @@ #include <gtkmm/scale.h> #include "ui/widget/spinbutton.h" #include "ui/widget/spin-scale.h" +#include <glib/gi18n.h> #include "xml/node.h" #include "extension/extension.h" @@ -162,14 +163,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 e4a614667..a5632a39a 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -58,16 +58,6 @@ 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 ed28c0d75..c54cc0ec3 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -308,7 +308,7 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node auto vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0)); vbox->set_homogeneous(false); - 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 6b082b133..1d9205502 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); |
