summaryrefslogtreecommitdiffstats
path: root/src/text-context.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-06 18:54:40 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-06 18:54:40 +0000
commitbb88a2cb94ec34ee838a972bab17ca05ba92d1da (patch)
tree4b4580dbe1bec0968254d1b362611ab57ad3c223 /src/text-context.cpp
parentinit SPStyle better: fixes a bunch of bugs resulting from improper re-init of... (diff)
parentFixed bug in page sizer. (diff)
downloadinkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.tar.gz
inkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.zip
Merge Google Summer of Code unit refactor.
(bzr r12471)
Diffstat (limited to 'src/text-context.cpp')
-rw-r--r--src/text-context.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 862c50737..719a82156 100644
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -42,7 +42,6 @@
#include "selection.h"
#include "shape-editor.h"
#include "sp-flowtext.h"
-#include "sp-metrics.h"
#include "sp-namedview.h"
#include "sp-text.h"
#include "style.h"
@@ -640,8 +639,10 @@ static gint sp_text_context_root_handler(SPEventContext *const event_context, Gd
gobble_motion_events(GDK_BUTTON1_MASK);
// status text
- GString *xs = SP_PX_TO_METRIC_STRING(fabs((p - tc->p0)[Geom::X]), desktop->namedview->getDefaultMetric());
- GString *ys = SP_PX_TO_METRIC_STRING(fabs((p - tc->p0)[Geom::Y]), desktop->namedview->getDefaultMetric());
+ Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(fabs((p - tc->p0)[Geom::X]), "px");
+ Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(fabs((p - tc->p0)[Geom::Y]), "px");
+ GString *xs = g_string_new(x_q.string(*desktop->namedview->doc_units).c_str());
+ GString *ys = g_string_new(y_q.string(*desktop->namedview->doc_units).c_str());
event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Flowed text frame</b>: %s &#215; %s"), xs->str, ys->str);
g_string_free(xs, FALSE);
g_string_free(ys, FALSE);