summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:33:34 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:33:34 +0000
commit577a95c2028790cbb856feda6ac6880ddd1aaad2 (patch)
tree4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/widgets/stroke-style.cpp
parentMerged trunk (diff)
parentRemove deprecated Autotools and btool files. Please use CMake instead (diff)
downloadinkscape-577a95c2028790cbb856feda6ac6880ddd1aaad2.tar.gz
inkscape-577a95c2028790cbb856feda6ac6880ddd1aaad2.zip
Merged trunk
(bzr r14954.1.30)
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 0494deb1b..4a658c5dc 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -152,17 +152,9 @@ StrokeStyle::StrokeStyle() :
Gtk::HBox *f = new Gtk::HBox(false, 0);
f->show();
add(*f);
-
-#if WITH_GTKMM_3_0
table = new Gtk::Grid();
table->set_border_width(4);
table->set_row_spacing(4);
-#else
- table = new Gtk::Table(3, 6, false);
- table->set_border_width(4);
- table->set_row_spacings(4);
-#endif
-
table->show();
f->add(*table);
@@ -178,13 +170,7 @@ StrokeStyle::StrokeStyle() :
// stroke_width_set_unit will be removed (because ScalarUnit takes care of conversions itself), and
// with it, the two remaining calls of stroke_average_width, allowing us to get rid of that
// function in desktop-style.
-
-#if WITH_GTKMM_3_0
widthAdj = new Glib::RefPtr<Gtk::Adjustment>(Gtk::Adjustment::create(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0));
-#else
- widthAdj = new Gtk::Adjustment(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0);
-#endif
-
widthSpin = new Inkscape::UI::Widget::SpinButton(*widthAdj, 0.1, 3);
widthSpin->set_tooltip_text(_("Stroke width"));
widthSpin->show();
@@ -210,12 +196,7 @@ StrokeStyle::StrokeStyle() :
us->show();
hb->pack_start(*us, FALSE, FALSE, 0);
-
-#if WITH_GTKMM_3_0
(*widthAdj)->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::widthChangedCB));
-#else
- widthAdj->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::widthChangedCB));
-#endif
i++;
/* Dash */
@@ -227,16 +208,10 @@ StrokeStyle::StrokeStyle() :
dashSelector = Gtk::manage(new SPDashSelector);
dashSelector->show();
-
-#if WITH_GTKMM_3_0
dashSelector->set_hexpand();
dashSelector->set_halign(Gtk::ALIGN_FILL);
dashSelector->set_valign(Gtk::ALIGN_CENTER);
table->attach(*dashSelector, 1, i, 3, 1);
-#else
- table->attach(*dashSelector, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
-#endif
-
dashSelector->changed_signal.connect(sigc::mem_fun(*this, &StrokeStyle::lineDashChangedCB));
i++;
@@ -320,28 +295,14 @@ StrokeStyle::StrokeStyle() :
// miter limit is to cut off such spikes (i.e. convert them into bevels)
// when they become too long.
//spw_label(t, _("Miter _limit:"), 0, i);
-
-#if WITH_GTKMM_3_0
miterLimitAdj = new Glib::RefPtr<Gtk::Adjustment>(Gtk::Adjustment::create(4.0, 0.0, 100.0, 0.1, 10.0, 0.0));
miterLimitSpin = new Inkscape::UI::Widget::SpinButton(*miterLimitAdj, 0.1, 2);
-#else
- miterLimitAdj = new Gtk::Adjustment(4.0, 0.0, 100.0, 0.1, 10.0, 0.0);
- miterLimitSpin = new Inkscape::UI::Widget::SpinButton(*miterLimitAdj, 0.1, 2);
-#endif
-
miterLimitSpin->set_tooltip_text(_("Maximum length of the miter (in units of stroke width)"));
miterLimitSpin->show();
sp_dialog_defocus_on_enter_cpp(miterLimitSpin);
hb->pack_start(*miterLimitSpin, false, false, 0);
-
-#if WITH_GTKMM_3_0
(*miterLimitAdj)->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::miterLimitChangedCB));
-
-#else
- miterLimitAdj->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::miterLimitChangedCB));
-#endif
-
i++;
/* Cap type */
@@ -924,17 +885,9 @@ StrokeStyle::updateLine()
if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) {
double avgwidth = Inkscape::Util::Quantity::convert(query.stroke_width.computed, "px", unit);
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(avgwidth);
-#else
- widthAdj->set_value(avgwidth);
-#endif
} else {
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(100);
-#else
- widthAdj->set_value(100);
-#endif
}
// if none of the selected objects has a stroke, than quite some controls should be disabled
@@ -955,11 +908,7 @@ StrokeStyle::updateLine()
}
if (result_ml != QUERY_STYLE_NOTHING)
-#if WITH_GTKMM_3_0
(*miterLimitAdj)->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
-#else
- miterLimitAdj->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
-#endif
if (result_join != QUERY_STYLE_MULTIPLE_DIFFERENT &&
result_join != QUERY_STYLE_NOTHING ) {
@@ -1047,13 +996,8 @@ StrokeStyle::scaleLine()
SPCSSAttr *css = sp_repr_css_attr_new();
if (!items.empty()) {
-#if WITH_GTKMM_3_0
double width_typed = (*widthAdj)->get_value();
double const miterlimit = (*miterLimitAdj)->get_value();
-#else
- double width_typed = widthAdj->get_value();
- double const miterlimit = miterLimitAdj->get_value();
-#endif
Inkscape::Util::Unit const *const unit = unitSelector->getUnit();
@@ -1093,11 +1037,7 @@ StrokeStyle::scaleLine()
if (unit->type != Inkscape::Util::UNIT_TYPE_LINEAR) {
// reset to 100 percent
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(100.0);
-#else
- widthAdj->set_value(100.0);
-#endif
}
}