diff options
| author | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-05-05 13:32:42 +0000 |
| commit | aeb9c1bde66de096910757abb17dedb94ad74207 (patch) | |
| tree | c0adf97685b0fa8af1553b14d20601f280492762 /src/extension/param | |
| parent | Fixed some math, so that the objects now line up correctly (diff) | |
| parent | Adding checks to prevent null pointer dereferences (diff) | |
| download | inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.tar.gz inkscape-aeb9c1bde66de096910757abb17dedb94ad74207.zip | |
Trunk merge
(bzr r11073.1.29)
Diffstat (limited to 'src/extension/param')
| -rw-r--r-- | src/extension/param/bool.cpp | 1 | ||||
| -rw-r--r-- | src/extension/param/float.cpp | 15 | ||||
| -rw-r--r-- | src/extension/param/int.cpp | 15 | ||||
| -rw-r--r-- | src/extension/param/radiobutton.cpp | 8 |
4 files changed, 37 insertions, 2 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index f7c4e6c0c..abef8d8f3 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -13,6 +13,7 @@ #include <gtkmm/adjustment.h> #include <gtkmm/box.h> #include <gtkmm/spinbutton.h> +#include <gtkmm/checkbutton.h> #include "xml/node.h" #include "../extension.h" diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 0e1d1c22a..2f1c77d4e 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -184,17 +184,30 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod label->show(); hbox->pack_start(*label, true, true, _indent); +#if WITH_GTKMM_3_0 + ParamFloatAdjustment * pfa = new ParamFloatAdjustment(this, doc, node, changeSignal); + Glib::RefPtr<Gtk::Adjustment> fadjust(pfa); +#else ParamFloatAdjustment * fadjust = Gtk::manage(new ParamFloatAdjustment(this, doc, node, changeSignal)); +#endif if (_mode == FULL) { +#if WITH_GTKMM_3_0 + Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(fadjust)); +#else Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(*fadjust)); +#endif scale->set_draw_value(false); scale->set_size_request(200, -1); scale->show(); hbox->pack_start(*scale, false, false); } - + +#if WITH_GTKMM_3_0 + Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 0.1, _precision)); +#else Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(*fadjust, 0.1, _precision)); +#endif spin->show(); hbox->pack_start(*spin, false, false); diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp index 440693eb1..fe29f1230 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -165,17 +165,30 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal label->show(); hbox->pack_start(*label, true, true, _indent); +#if WITH_GTKMM_3_0 + ParamIntAdjustment * pia = new ParamIntAdjustment(this, doc, node, changeSignal); + Glib::RefPtr<Gtk::Adjustment> fadjust(pia); +#else ParamIntAdjustment * fadjust = Gtk::manage(new ParamIntAdjustment(this, doc, node, changeSignal)); +#endif if (_mode == FULL) { +#if WITH_GTKMM_3_0 + Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(fadjust)); +#else Gtk::HScale * scale = Gtk::manage(new Gtk::HScale(*fadjust)); +#endif scale->set_draw_value(false); scale->set_size_request(200, -1); scale->show(); hbox->pack_start(*scale, false, false); } - + +#if WITH_GTKMM_3_0 + Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 1.0, 0)); +#else Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(*fadjust, 1.0, 0)); +#endif spin->show(); hbox->pack_start(*spin, false, false); diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index 9c8475e2d..d71d60ebd 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -20,6 +20,7 @@ #include <gtkmm/box.h> #include <gtkmm/comboboxtext.h> +#include <gtkmm/radiobutton.h> #include <glibmm/i18n.h> #include "xml/node.h" @@ -273,8 +274,15 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node return NULL; } +#if WITH_GTKMM_3_0 + Gtk::Box * hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4)); + hbox->set_homogeneous(false); + Gtk::Box * vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0)); + vbox->set_homogeneous(false); +#else Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4)); Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0)); +#endif #if WITH_GTKMM_2_22 Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START, Gtk::ALIGN_START)); |
