summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-toolbar.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-12 08:40:34 +0000
commitaadfea4113abc6863d7ab03d21b973802c41c503 (patch)
tree3f890c0c112433fd850d59558208addf1baa85da /src/widgets/gradient-toolbar.cpp
parentPot and Dutch translation update (diff)
parentA simple layout document as to what, why and how is cppification. (diff)
downloadinkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz
inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/widgets/gradient-toolbar.cpp')
-rw-r--r--src/widgets/gradient-toolbar.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index ce5f5fb8f..e7596ead4 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -4,6 +4,7 @@
* Authors:
* bulia byak <bulia@dr.com>
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
+ * Abhishek Sharma
*
* Copyright (C) 2007 Johan Engelen
* Copyright (C) 2005 authors
@@ -42,6 +43,7 @@
#include "toolbox.h"
+using Inkscape::DocumentUndo;
//########################
//## Gradient ##
@@ -150,8 +152,8 @@ gr_item_activate (GtkMenuItem *menuitem, gpointer data)
gr_apply_gradient (selection, ev? ev->get_drag() : NULL, gr);
- sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
- _("Assign gradient to object"));
+ DocumentUndo::done(sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+ _("Assign gradient to object"));
}
gchar *
@@ -171,7 +173,7 @@ GtkWidget *gr_vector_list(SPDesktop *desktop, bool selection_empty, SPGradient *
GtkWidget *m = gtk_menu_new ();
GSList *gl = NULL;
- const GSList *gradients = sp_document_get_resource_list (document, "gradient");
+ const GSList *gradients = document->getResourceList("gradient");
for (const GSList *i = gradients; i != NULL; i = i->next) {
SPGradient *grad = SP_GRADIENT(i->data);
if ( grad->hasStops() && !grad->isSolid() ) {