Code

remove svglsimpl
[inkscape.git] / src / spiral-context.cpp
index b05926b02a3a5e5050efd47af753881a704a7237..1dc6bd6cbbd9064e8a89ef8b2cc35a075477452c 100644 (file)
@@ -31,6 +31,7 @@
 #include "desktop-style.h"
 #include "message-context.h"
 #include "pixmaps/cursor-spiral.xpm"
+#include "pixmaps/cursor-spiral.pixbuf"
 #include "spiral-context.h"
 #include "sp-metrics.h"
 #include <glibmm/i18n.h>
@@ -94,6 +95,11 @@ sp_spiral_context_init(SPSpiralContext *spiral_context)
     SPEventContext *event_context = SP_EVENT_CONTEXT(spiral_context);
 
     event_context->cursor_shape = cursor_spiral_xpm;
+    event_context->cursor_pixbuf = gdk_pixbuf_new_from_inline(
+            -1,
+            cursor_spiral_pixbuf,
+            FALSE,
+            NULL); 
     event_context->hot_x = 4;
     event_context->hot_y = 4;
     event_context->xp = 0;
@@ -263,7 +269,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                 dragging = TRUE;
                 sc->center = Inkscape::setup_for_drag_start(desktop, event_context, event);
 
-                SnapManager const m(desktop->namedview);
+                SnapManager const &m = desktop->namedview->snap_manager;
                 sc->center = m.freeSnap(Inkscape::Snapper::SNAP_POINT, sc->center, sc->item).getPoint();
 
                 sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
@@ -410,7 +416,7 @@ sp_spiral_drag(SPSpiralContext *sc, NR::Point p, guint state)
 
     NR::Point const p0 = sp_desktop_dt2root_xy_point(desktop, sc->center);
     NR::Point p1 = sp_desktop_dt2root_xy_point(desktop, p);
-    SnapManager const m(desktop->namedview);
+    SnapManager const &m = desktop->namedview->snap_manager;
     p1 = m.freeSnap(Inkscape::Snapper::SNAP_POINT, p1, sc->item).getPoint();
 
     SPSpiral *spiral = SP_SPIRAL(sc->item);
@@ -452,7 +458,8 @@ sp_spiral_finish(SPSpiralContext *sc)
         SP_OBJECT(spiral)->updateRepr(NULL, SP_OBJECT_WRITE_EXT);
 
         sp_desktop_selection(desktop)->set(sc->item);
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL, 
+                         /* TODO: annotate */ "spiral-context.cpp:462");
 
         sc->item = NULL;
     }