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/widgets/stroke-style.cpp | |
| 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/widgets/stroke-style.cpp')
| -rw-r--r-- | src/widgets/stroke-style.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 2e56dd696..90bd62847 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -18,6 +18,7 @@ #define noSP_SS_VERBOSE #include "widgets/dash-selector.h" +#include <gtkmm/radiobutton.h> #include <gtkmm/table.h> #include <glibmm/i18n.h> @@ -295,7 +296,6 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) GtkWidget *us_old, *spw_old; Gtk::Container *spw; Gtk::Table *t; - Gtk::Adjustment *a; Inkscape::UI::Widget::SpinButton *sb; Gtk::RadioButton *tb; Gtk::HBox *f, *hb; @@ -327,9 +327,15 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) // with it, the two remaining calls of stroke_average_width, allowing us to get rid of that // function in desktop-style. - a = new Gtk::Adjustment(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0); +#if WITH_GTKMM_3_0 + Glib::RefPtr<Gtk::Adjustment> a = Gtk::Adjustment::create(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0); + spw->set_data("width", &a); + sb = new Inkscape::UI::Widget::SpinButton(a, 0.1, 3); +#else + Gtk::Adjustment *a = new Gtk::Adjustment(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0); spw->set_data("width", a); sb = new Inkscape::UI::Widget::SpinButton(*a, 0.1, 3); +#endif sb->set_tooltip_text(_("Stroke width")); sb->show(); spw_label(t, C_("Stroke width", "_Width:"), 0, i, sb); @@ -403,10 +409,16 @@ Gtk::Container *sp_stroke_style_line_widget_new(void) hb = spw_hbox(t, 3, 1, i); +#if WITH_GTKMM_3_0 + a = Gtk::Adjustment::create(4.0, 0.0, 100.0, 0.1, 10.0, 0.0); + spw->set_data("miterlimit", &a); + sb = new Inkscape::UI::Widget::SpinButton(a, 0.1, 2); +#else a = new Gtk::Adjustment(4.0, 0.0, 100.0, 0.1, 10.0, 0.0); spw->set_data("miterlimit", a); - sb = new Inkscape::UI::Widget::SpinButton(*a, 0.1, 2); +#endif + sb->set_tooltip_text(_("Maximum length of the miter (in units of stroke width)")); sb->show(); spw_label(t, _("Miter _limit:"), 0, i, sb); |
