diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-07-31 19:11:20 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-07-31 19:11:20 +0000 |
| commit | 989abbac025a8b3349748d19a613a08586c5fdcd (patch) | |
| tree | 157b5f656c6344784aea3c498fa60199bd7d2958 /src/spiral-context.cpp | |
| parent | Further refactoring of EventContexts. (diff) | |
| download | inkscape-989abbac025a8b3349748d19a613a08586c5fdcd.tar.gz inkscape-989abbac025a8b3349748d19a613a08586c5fdcd.zip | |
Fixed SPObject ctor and dtor; removed singleton.h; some smaller changes.
(bzr r11608.1.110)
Diffstat (limited to 'src/spiral-context.cpp')
| -rw-r--r-- | src/spiral-context.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 6b060b424..dc2bd6149 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -63,8 +63,6 @@ const std::string& SPSpiralContext::getPrefsPath() { const std::string SPSpiralContext::prefsPath = "/tools/shapes/spiral"; SPSpiralContext::SPSpiralContext() : SPEventContext() { - this->_message_context = 0; - this->cursor_shape = cursor_spiral_xpm; this->hot_x = 4; this->hot_y = 4; @@ -104,10 +102,6 @@ SPSpiralContext::~SPSpiralContext() { if (this->spiral) { this->finishItem(); } - - if (this->_message_context) { - delete this->_message_context; - } } /** @@ -147,8 +141,6 @@ void SPSpiralContext::setup() { if (prefs->getBool("/tools/shapes/gradientdrag")) { this->enableGrDrag(); } - - this->_message_context = new Inkscape::MessageContext(this->desktop->messageStack()); } void SPSpiralContext::set(const Inkscape::Preferences::Entry& val) { @@ -362,7 +354,7 @@ void SPSpiralContext::drag(Geom::Point const &p, guint state) { int const snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12); if (!this->spiral) { - if (Inkscape::have_viable_layer(desktop, this->_message_context) == false) { + if (Inkscape::have_viable_layer(desktop, this->message_context) == false) { return; } @@ -408,14 +400,14 @@ void SPSpiralContext::drag(Geom::Point const &p, guint state) { /* status text */ GString *rads = SP_PX_TO_METRIC_STRING(rad, desktop->namedview->getDefaultMetric()); - this->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, + this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Spiral</b>: radius %s, angle %5g°; with <b>Ctrl</b> to snap angle"), rads->str, sp_round((arg + 2.0*M_PI*this->spiral->revo)*180/M_PI, 0.0001)); g_string_free(rads, FALSE); } void SPSpiralContext::finishItem() { - this->_message_context->clear(); + this->message_context->clear(); if (this->spiral != NULL) { if (this->spiral->rad == 0) { |
