summaryrefslogtreecommitdiffstats
path: root/src/widgets/dash-selector.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
commite7248b2fa042f42a5c4dd14cd86ab6a5b4524059 (patch)
tree9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/widgets/dash-selector.cpp
parentupdated to latest trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.tar.gz
inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.zip
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/widgets/dash-selector.cpp')
-rw-r--r--src/widgets/dash-selector.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp
index 9d591d33d..05f3ab44c 100644
--- a/src/widgets/dash-selector.cpp
+++ b/src/widgets/dash-selector.cpp
@@ -13,15 +13,13 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
#include "dash-selector.h"
#include <cstring>
-#include <string>
#include <glibmm/i18n.h>
-#include <gtkmm/adjustment.h>
#include <2geom/coord.h>
#include "style.h"
@@ -61,18 +59,9 @@ SPDashSelector::SPDashSelector()
dash_combo.signal_changed().connect( sigc::mem_fun(*this, &SPDashSelector::on_selection) );
this->pack_start(dash_combo, false, false, 0);
-
-#if WITH_GTKMM_3_0
offset = Gtk::Adjustment::create(0.0, 0.0, 10.0, 0.1, 1.0, 0.0);
-#else
- offset = new Gtk::Adjustment(0.0, 0.0, 10.0, 0.1, 1.0, 0.0);
-#endif
offset->signal_value_changed().connect(sigc::mem_fun(*this, &SPDashSelector::offset_value_changed));
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(offset, 0.1, 2);
-#else
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(*offset, 0.1, 2);
-#endif
+ auto sb = new Inkscape::UI::Widget::SpinButton(offset, 0.1, 2);
sb->set_tooltip_text(_("Pattern offset"));
sp_dialog_defocus_on_enter_cpp(sb);
sb->show();
@@ -99,9 +88,6 @@ SPDashSelector::SPDashSelector()
SPDashSelector::~SPDashSelector() {
// FIXME: for some reason this doesn't get called; does the call to manage() in
// sp_stroke_style_line_widget_new() not processed correctly?
-#if !WITH_GTKMM_3_0
- delete offset;
-#endif
}
void SPDashSelector::prepareImageRenderer( Gtk::TreeModel::const_iterator const &row ) {
@@ -188,11 +174,13 @@ void SPDashSelector::set_dash (int ndash, double *dash, double o)
else if(ndash==0) {
pos = 0;
}
-
if(pos>=0){
this->set_data("pattern", dashes[pos]);
this->dash_combo.set_active(pos);
this->offset->set_value(o);
+ if(pos == 10) {
+ this->offset->set_value(10.0);
+ }
}
else { // Hit a custom pattern in the SVG, write it into the combobox.
count--; // the one slot for custom patterns