summaryrefslogtreecommitdiffstats
path: root/src/seltrans.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-04-17 02:40:23 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-04-17 02:40:23 +0000
commit59db065f39b26434907a247e3249058176f6034a (patch)
tree0d968ff42d814b25b813bdf2b49f76acfa939022 /src/seltrans.cpp
parentfix by kur9kin for endless loop from bug 212332 (diff)
downloadinkscape-59db065f39b26434907a247e3249058176f6034a.tar.gz
inkscape-59db065f39b26434907a247e3249058176f6034a.zip
replace text strings by ints for tools/bounding_box
(bzr r5459)
Diffstat (limited to 'src/seltrans.cpp')
-rw-r--r--src/seltrans.cpp10
1 files changed, 6 insertions, 4 deletions
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();