summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-grid.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-12-24 00:48:00 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-12-24 00:48:00 +0000
commit69a418d14f6ef094347ab878ffa66331e1aa9839 (patch)
tree241d3f227ed58833ea75f5246de00414cf8c2485 /src/display/canvas-grid.cpp
parentwhen dragging from rulers close to the edges, one gets 45 degree angled guide... (diff)
downloadinkscape-69a418d14f6ef094347ab878ffa66331e1aa9839.tar.gz
inkscape-69a418d14f6ef094347ab878ffa66331e1aa9839.zip
angled guidelines: create angled line when dragging from edge of rulers
(bzr r4296)
Diffstat (limited to 'src/display/canvas-grid.cpp')
-rw-r--r--src/display/canvas-grid.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index 021a62f96..8d7bdd0e8 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -174,15 +174,15 @@ CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocume
namelabel.set_markup(str);
vbox.pack_start(namelabel, true, true);
+ _rcb_enabled.init ( _("_Enabled"),
+ _("Determines whether to snap to this grid or not. Can be 'on' for invisible grids."),
+ "enabled", _wr, false, repr, doc);
+ vbox.pack_start(*dynamic_cast<Gtk::Widget*>(_rcb_enabled._button), true, true);
+
_rcb_visible.init ( _("_Visible"),
_("Determines whether the grid is displayed or not. Objects are still snapped to invisible grids."),
- "visible", _wr, false, repr, doc);
+ "visible", _wr, true, repr, doc);
vbox.pack_start(*dynamic_cast<Gtk::Widget*>(_rcb_visible._button), true, true);
-
- _rcb_snap_enabled.init ( _("_Snapping enabled"),
- _("Determines whether to snap to this grid or not. Can be 'on' for invisible grids."),
- "snap_enabled", _wr, false, repr, doc);
- vbox.pack_start(*dynamic_cast<Gtk::Widget*>(_rcb_snap_enabled._button), true, true);
}
CanvasGrid::~CanvasGrid()
@@ -334,7 +334,7 @@ CanvasGrid::on_repr_attr_changed(Inkscape::XML::Node *repr, gchar const *key, gc
((CanvasGrid*) data)->onReprAttrChanged(repr, key, oldval, newval, is_interactive);
}
-bool CanvasGrid::isSnapEnabled()
+bool CanvasGrid::isEnabled()
{
if (snapper == NULL) {
return false;
@@ -657,7 +657,7 @@ CanvasXYGrid::readRepr()
visible = (strcmp(value,"true") == 0);
}
- if ( (value = repr->attribute("snap_enabled")) ) {
+ if ( (value = repr->attribute("enabled")) ) {
g_assert(snapper != NULL);
snapper->setEnabled(strcmp(value,"true") == 0);
}
@@ -703,7 +703,7 @@ CanvasXYGrid::updateWidgets()
_rcb_visible.setActive(visible);
if (snapper != NULL) {
- _rcb_snap_enabled.setActive(snapper->getEnabled());
+ _rcb_enabled.setActive(snapper->getEnabled());
}
_rumg.setUnit (gridunit);