diff options
Diffstat (limited to 'src/gradient-context.cpp')
| -rw-r--r-- | src/gradient-context.cpp | 20 |
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 |
