summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/widgets/stroke-style.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp51
1 files changed, 46 insertions, 5 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 5f686881f..7912b654a 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -122,10 +122,17 @@ StrokeStyle::StrokeStyle() :
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->show();
table->set_border_width(4);
table->set_row_spacings(4);
+#endif
+
+ table->show();
f->add(*table);
gint i = 0;
@@ -282,7 +289,16 @@ StrokeStyle::StrokeStyle() :
dashSelector = 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++;
@@ -298,7 +314,16 @@ StrokeStyle::StrokeStyle() :
sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
sigc::ptr_fun(&StrokeStyle::markerSelectCB), startMarkerCombo, this, SP_MARKER_LOC_START));
startMarkerCombo->show();
+
+#if WITH_GTKMM_3_0
+ startMarkerCombo->set_hexpand();
+ startMarkerCombo->set_halign(Gtk::ALIGN_FILL);
+ startMarkerCombo->set_valign(Gtk::ALIGN_CENTER);
+ table->attach(*startMarkerCombo, 1, i, 3, 1);
+#else
table->attach(*startMarkerCombo, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
+#endif
+
i++;
midMarkerCombo = manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID));
@@ -308,7 +333,16 @@ StrokeStyle::StrokeStyle() :
sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
sigc::ptr_fun(&StrokeStyle::markerSelectCB), midMarkerCombo, this, SP_MARKER_LOC_MID));
midMarkerCombo->show();
+
+#if WITH_GTKMM_3_0
+ midMarkerCombo->set_hexpand();
+ midMarkerCombo->set_halign(Gtk::ALIGN_FILL);
+ midMarkerCombo->set_valign(Gtk::ALIGN_CENTER);
+ table->attach(*midMarkerCombo, 1, i, 3, 1);
+#else
table->attach(*midMarkerCombo, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
+#endif
+
i++;
endMarkerCombo = manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END));
@@ -318,7 +352,16 @@ StrokeStyle::StrokeStyle() :
sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
sigc::ptr_fun(&StrokeStyle::markerSelectCB), endMarkerCombo, this, SP_MARKER_LOC_END));
endMarkerCombo->show();
+
+#if WITH_GTKMM_3_0
+ endMarkerCombo->set_hexpand();
+ endMarkerCombo->set_halign(Gtk::ALIGN_FILL);
+ endMarkerCombo->set_valign(Gtk::ALIGN_CENTER);
+ table->attach(*endMarkerCombo, 1, i, 3, 1);
+#else
table->attach(*endMarkerCombo, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
+#endif
+
i++;
setDesktop(desktop);
@@ -434,14 +477,13 @@ StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMa
item->requestModified(SP_OBJECT_MODIFIED_FLAG);
item->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
+
+ DocumentUndo::done(document, SP_VERB_DIALOG_FILL_STROKE, _("Set markers"));
}
sp_repr_css_attr_unref(css);
css = 0;
- DocumentUndo::done(document, SP_VERB_DIALOG_FILL_STROKE,
- _("Set markers"));
-
spw->update = false;
};
@@ -601,7 +643,6 @@ StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item)
sp_repr_css_set_property(css_item, marker_id, g_strconcat("url(#", mark_repr->attribute("id"), ")", NULL));
sp_repr_css_change_recursive(item->getRepr(), css_item, "style");
- Inkscape::GC::release(mark_repr);
sp_repr_css_attr_unref(css_item);
css_item = 0;