diff options
Diffstat (limited to 'src/widgets/gradient-toolbar.cpp')
| -rw-r--r-- | src/widgets/gradient-toolbar.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index b6378b251..ea009c048 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -18,7 +18,7 @@ #include "ui/widget/color-preview.h" #include <glibmm/i18n.h> -#include "desktop-handles.h" + #include "desktop.h" #include "document-undo.h" #include "document.h" @@ -128,7 +128,7 @@ gboolean gr_vector_list(GtkWidget *combo_box, SPDesktop *desktop, bool selection return sensitive; } - SPDocument *document = sp_desktop_document(desktop); + SPDocument *document = desktop->getDocument(); GtkTreeIter iter; GtkListStore *store = (GtkListStore *)gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box)); @@ -356,7 +356,7 @@ static void gr_tb_selection_changed(Inkscape::Selection * /*selection*/, gpointe return; } - Inkscape::Selection *selection = sp_desktop_selection(desktop); // take from desktop, not from args + Inkscape::Selection *selection = desktop->getSelection(); // take from desktop, not from args if (selection) { ToolBase *ev = desktop->getEventContext(); GrDrag *drag = NULL; @@ -560,7 +560,7 @@ static void gr_add_stop(GtkWidget * /*button*/, GtkWidget *vb) return; } - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); if (!selection) { return; } @@ -582,7 +582,7 @@ static void gr_remove_stop(GtkWidget * /*button*/, GtkWidget *vb) return; } - Inkscape::Selection *selection = sp_desktop_selection(desktop); // take from desktop, not from args + Inkscape::Selection *selection = desktop->getSelection(); // take from desktop, not from args if (!selection) { return; } @@ -918,12 +918,12 @@ static void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data) gr = sp_gradient_ensure_vector_normalized(gr); SPDesktop *desktop = static_cast<SPDesktop *>(data); - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); ToolBase *ev = desktop->getEventContext(); gr_apply_gradient(selection, ev? ev->get_drag() : NULL, gr); - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT, + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT, _("Assign gradient to object")); } @@ -936,7 +936,7 @@ static void gr_spread_change(EgeSelectOneAction *act, GtkWidget *widget) } SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(G_OBJECT(widget), "desktop")); - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); SPGradient *gradient = 0; gr_get_dt_selected_gradient(selection, gradient); @@ -945,7 +945,7 @@ static void gr_spread_change(EgeSelectOneAction *act, GtkWidget *widget) gradient->setSpread(spread); gradient->updateRepr(); - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT, + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT, _("Set gradient repeat")); } } @@ -1246,8 +1246,8 @@ static void gradient_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::T static sigc::connection connDefsModified; if (SP_IS_GRADIENT_CONTEXT(ec)) { - Inkscape::Selection *selection = sp_desktop_selection(desktop); - SPDocument *document = sp_desktop_document(desktop); + Inkscape::Selection *selection = desktop->getSelection(); + SPDocument *document = desktop->getDocument(); // connect to selection modified and changed signals connChanged = selection->connectChanged(sigc::bind(sigc::ptr_fun(&gr_tb_selection_changed), holder)); |
