summaryrefslogtreecommitdiffstats
path: root/src/gradient-context.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-12 09:05:21 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-12 09:05:21 +0000
commit7ddc9f155a2a0822e2e56d828bbdccc65c141081 (patch)
tree3f890c0c112433fd850d59558208addf1baa85da /src/gradient-context.cpp
parentPot and Dutch translation update (diff)
parentMerge and cleanup of GSoC C++-ification project. (diff)
downloadinkscape-7ddc9f155a2a0822e2e56d828bbdccc65c141081.tar.gz
inkscape-7ddc9f155a2a0822e2e56d828bbdccc65c141081.zip
GSoC C++-ificiation merge and cleanup.
(bzr r9946)
Diffstat (limited to 'src/gradient-context.cpp')
-rw-r--r--src/gradient-context.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index f104bbd41..d37e9b022 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -4,6 +4,7 @@
* Authors:
* bulia byak <buliabyak@users.sf.net>
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
+ * Abhishek Sharma
*
* Copyright (C) 2007 Johan Engelen
* Copyright (C) 2005 Authors
@@ -45,6 +46,7 @@
#include "sp-namedview.h"
#include "rubberband.h"
+using Inkscape::DocumentUndo;
static void sp_gradient_context_class_init(SPGradientContextClass *klass);
@@ -384,7 +386,7 @@ sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
}
if (g_slist_length(these_stops) > 0 && doc) {
- sp_document_done (doc, SP_VERB_CONTEXT_GRADIENT, _("Add gradient stop"));
+ DocumentUndo::done(doc, SP_VERB_CONTEXT_GRADIENT, _("Add gradient stop"));
drag->updateDraggers();
// so that it does not automatically update draggers in idle loop, as this would deselect
drag->local_change = true;
@@ -452,7 +454,7 @@ sp_gradient_simplify(SPGradientContext *rc, double tolerance)
}
if (g_slist_length(todel) > 0) {
- sp_document_done (doc, SP_VERB_CONTEXT_GRADIENT, _("Simplify gradient"));
+ DocumentUndo::done(doc, SP_VERB_CONTEXT_GRADIENT, _("Simplify gradient"));
drag->local_change = true;
drag->updateDraggers();
drag->selectByCoords(coords);
@@ -476,8 +478,8 @@ sp_gradient_context_add_stop_near_point (SPGradientContext *rc, SPItem *item, G
ec->get_drag()->addStopNearPoint (item, mouse_p, tolerance/desktop->current_zoom());
- sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
- _("Add gradient stop"));
+ DocumentUndo::done(sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+ _("Add gradient stop"));
ec->get_drag()->updateDraggers();
}
@@ -528,8 +530,8 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
sp_gradient_reset_to_userspace(priv, item);
}
- sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
- _("Create default gradient"));
+ DocumentUndo::done(sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+ _("Create default gradient"));
}
ret = TRUE;
}
@@ -813,8 +815,8 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
}
}
// we did an undoable action
- sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
- _("Invert gradient"));
+ DocumentUndo::done(sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+ _("Invert gradient"));
ret = TRUE;
}
break;
@@ -925,7 +927,7 @@ static void sp_gradient_drag(SPGradientContext &rc, Geom::Point const pt, guint
-1, // ignore number (though it is always 1)
fill_or_stroke, 99999, 99999, etime);
}
- // We did an undoable action, but sp_document_done will be called by the knot when released
+ // We did an undoable action, but SPDocumentUndo::done will be called by the knot when released
// status text; we do not track coords because this branch is run once, not all the time
// during drag