From 59db065f39b26434907a247e3249058176f6034a Mon Sep 17 00:00:00 2001 From: bulia byak Date: Thu, 17 Apr 2008 02:40:23 +0000 Subject: replace text strings by ints for tools/bounding_box (bzr r5459) --- src/object-snapper.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index f05422770..a91014158 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -156,8 +156,9 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::Snapper::PointType const & g_assert(!(p_is_a_node && p_is_a_bbox || p_is_a_bbox && p_is_a_guide || p_is_a_node && p_is_a_guide)); if (_snap_to_bboxnode) { - gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box"); - bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX; + int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0); + bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; } for (std::vector::const_iterator i = _candidates->begin(); i != _candidates->end(); i++) { @@ -265,8 +266,9 @@ void Inkscape::ObjectSnapper::_collectPaths(Inkscape::Snapper::PointType const & bool p_is_a_node = t & Inkscape::Snapper::SNAPPOINT_NODE; if (_snap_to_bboxpath) { - gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box"); - bbox_type = (prefs_bbox != NULL && strcmp(prefs_bbox, "geometric")==0)? SPItem::GEOMETRIC_BBOX : SPItem::APPROXIMATE_BBOX; + int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0); + bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; } // Consider the page border for snapping -- cgit v1.2.3