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/seltrans.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 154e828c4..c90ac31cf 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -107,8 +107,9 @@ Inkscape::SelTrans::SelTrans(SPDesktop *desktop) : _stamp_cache(NULL), _message_context(desktop->messageStack()) { - gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box"); - _snap_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); + _snap_bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; g_return_if_fail(desktop != NULL); @@ -820,8 +821,9 @@ void Inkscape::SelTrans::_selChanged(Inkscape::Selection */*selection*/) { if (!_grabbed) { // reread in case it changed on the fly: - gchar const *prefs_bbox = prefs_get_string_attribute("tools", "bounding_box"); - _snap_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); + _snap_bbox_type = (prefs_bbox ==0)? + SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; //SPItem::APPROXIMATE_BBOX will be replaced by SPItem::VISUAL_BBOX, as soon as the latter is implemented properly _updateVolatileState(); -- cgit v1.2.3