From 36863a0e699b5a7cba346bca8a26e729be5a2f87 Mon Sep 17 00:00:00 2001 From: Jan Lingscheid Date: Tue, 12 Sep 2017 10:13:54 +0200 Subject: Remove remaining usage of GString in ui/tools/* --- src/ui/tools/arc-tool.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/ui/tools/arc-tool.cpp') diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp index b501962fb..9ad42c842 100644 --- a/src/ui/tools/arc-tool.cpp +++ b/src/ui/tools/arc-tool.cpp @@ -385,8 +385,8 @@ void ArcTool::drag(Geom::Point pt, guint state) { Inkscape::Util::Quantity rdimx_q = Inkscape::Util::Quantity(rdimx, "px"); Inkscape::Util::Quantity rdimy_q = Inkscape::Util::Quantity(rdimy, "px"); - GString *xs = g_string_new(rdimx_q.string(desktop->namedview->display_units).c_str()); - GString *ys = g_string_new(rdimy_q.string(desktop->namedview->display_units).c_str()); + Glib::ustring xs = rdimx_q.string(desktop->namedview->display_units); + Glib::ustring ys = rdimy_q.string(desktop->namedview->display_units); if (state & GDK_CONTROL_MASK) { int ratio_x, ratio_y; @@ -399,13 +399,10 @@ void ArcTool::drag(Geom::Point pt, guint state) { ratio_y = (int) rint (rdimy / rdimx); } - this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s (constrained to ratio %d:%d); with Shift to draw around the starting point"), xs->str, ys->str, ratio_x, ratio_y); + this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s (constrained to ratio %d:%d); with Shift to draw around the starting point"), xs.c_str(), ys.c_str(), ratio_x, ratio_y); } else { - this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s; with Ctrl to make square or integer-ratio ellipse; with Shift to draw around the starting point"), xs->str, ys->str); + this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s; with Ctrl to make square or integer-ratio ellipse; with Shift to draw around the starting point"), xs.c_str(), ys.c_str()); } - - g_string_free(xs, FALSE); - g_string_free(ys, FALSE); } void ArcTool::finishItem() { -- cgit v1.2.3