Code

patch from Gustav Broberg: undo annotations and history dialog
authorbuliabyak <buliabyak@users.sourceforge.net>
Thu, 29 Jun 2006 20:15:48 +0000 (20:15 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Thu, 29 Jun 2006 20:15:48 +0000 (20:15 +0000)
80 files changed:
share/icons/icons.svg
share/keys/default.xml
share/keys/inkscape.xml
share/ui/menus-bars.xml
src/Makefile_insert
src/arc-context.cpp
src/composite-undo-stack-observer.cpp
src/composite-undo-stack-observer.h
src/connector-context.cpp
src/console-output-undo-observer.cpp
src/console-output-undo-observer.h
src/desktop-events.cpp
src/dialogs/clonetiler.cpp
src/dialogs/fill-style.cpp
src/dialogs/guidelinedialog.cpp
src/dialogs/item-properties.cpp
src/dialogs/layer-properties.cpp
src/dialogs/layers-panel.cpp
src/dialogs/object-properties.cpp
src/dialogs/sp-attribute-widget.cpp
src/dialogs/stroke-style.cpp
src/dialogs/swatches.cpp
src/dialogs/text-edit.cpp
src/dialogs/tiledialog.cpp
src/dialogs/xml-tree.cpp
src/document-private.h
src/document-undo.cpp
src/document.cpp
src/document.h
src/draw-context.cpp
src/dropper-context.cpp
src/dyna-draw-context.cpp
src/extension/effect.cpp
src/file.cpp
src/gradient-context.cpp
src/gradient-drag.cpp
src/interface.cpp
src/knotholder.cpp
src/menus-skeleton.h
src/nodepath.cpp
src/path-chemistry.cpp
src/preferences-skeleton.h
src/rect-context.cpp
src/selection-chemistry.cpp
src/seltrans.cpp
src/sp-flowtext.cpp
src/sp-item-group.cpp
src/spiral-context.cpp
src/splivarot.cpp
src/star-context.cpp
src/text-chemistry.cpp
src/text-context.cpp
src/trace/trace.cpp
src/ui/context-menu.cpp
src/ui/dialog/Makefile_insert
src/ui/dialog/align-and-distribute.cpp
src/ui/dialog/dialog-manager.cpp
src/ui/dialog/session-player.cpp
src/ui/dialog/transformation.cpp
src/ui/icons.cpp
src/ui/stock.cpp
src/ui/stock.h
src/ui/view/edit-widget.cpp
src/ui/widget/color-picker.cpp
src/ui/widget/entity-entry.cpp
src/ui/widget/licensor.cpp
src/ui/widget/page-sizer.cpp
src/ui/widget/registered-widget.cpp
src/ui/widget/ruler.cpp
src/ui/widget/selected-style.cpp
src/ui/widget/tolerance-slider.cpp
src/undo-stack-observer.h
src/verbs.cpp
src/verbs.h
src/widgets/gradient-toolbar.cpp
src/widgets/gradient-vector.cpp
src/widgets/layer-selector.cpp
src/widgets/select-toolbar.cpp
src/widgets/sp-xmlview-content.cpp
src/widgets/toolbox.cpp

index e294bdc932cd92d6cb5c727a52549ee01902fc11..20e4026e28484d080c02290865ffc00efc033d40 100644 (file)
@@ -8,12 +8,13 @@
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   inkscape:version="0.43+devel"
+   inkscape:version="0.44+devel"
    sodipodi:docname="icons.svg"
    height="1000.0000pt"
    width="1000.0000pt"
    sodipodi:version="0.32"
-   id="svg1">
+   id="svg1"
+   sodipodi:docbase="/usr/local/src/inkscape/share/icons">
   <defs
      id="defs3">
     <linearGradient
   </defs>
   <sodipodi:namedview
      inkscape:guide-bbox="true"
-     inkscape:current-layer="grid_arrange"
+     inkscape:current-layer="svg1"
      inkscape:grid-bbox="true"
      inkscape:pageopacity="1.0000000"
      pagecolor="#e8e8e4"
      inkscape:window-x="0"
      inkscape:window-height="949"
      inkscape:window-width="1272"
-     inkscape:cy="912.29243"
-     inkscape:cx="207.30874"
-     inkscape:zoom="22.224763"
+     inkscape:cy="1131.5205"
+     inkscape:cx="178.49469"
+     inkscape:zoom="2.7780954"
      gridtolerance="1.0000000px"
      snaptogrid="false"
      showgrid="true"
@@ -6082,7 +6083,7 @@ http://www.inkscape.org/</dc:description>
   </g>
   <g
      id="edit_duplicate"
-     transform="translate(50.0399,-139.9404)">
+     transform="translate(50.0399,-119.9404)">
     <g
        id="g6144">
       <rect
@@ -6199,7 +6200,7 @@ http://www.inkscape.org/</dc:description>
        height="1250" />
   </g>
   <g
-     transform="translate(-298.3567,-167.1852)"
+     transform="translate(-298.3567,-147.1852)"
      id="edit_clone">
     <g
        id="use6150"
@@ -6264,7 +6265,7 @@ http://www.inkscape.org/</dc:description>
        id="path5069" />
   </g>
   <g
-     transform="translate(-298.3836,-147.1851)"
+     transform="translate(-298.3836,-127.1851)"
      id="edit_unlink_clone">
     <use
        transform="translate(2.690009e-2,-4.867687e-6)"
@@ -6377,7 +6378,7 @@ http://www.inkscape.org/</dc:description>
   <g
      id="xml_editor"
      style="fill:url(#linearGradient14902);fill-opacity:1;stroke:url(#linearGradient14917)"
-     transform="translate(-105,-35)">
+     transform="translate(-105,-15)">
     <path
        style="color:black;fill:url(#linearGradient14909);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient14919);stroke-width:1.00000036;stroke-linecap:square;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
        d="M 160.5,205.5 L 171.5,205.5 L 175.5,209.5 L 175.5,220.5 L 160.5,220.5 L 160.5,205.5 z "
@@ -8005,7 +8006,7 @@ http://www.inkscape.org/</dc:description>
   </g>
   <g
      id="selection_bitmap"
-     transform="matrix(-1,0,0,1,321.0144,55.92699)"
+     transform="matrix(-1,0,0,1,321.0144,75.92699)"
      inkscape:label="#selection_bitmap">
     <path
        style="color:black;fill:url(#linearGradient11197);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient11286);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
@@ -8106,7 +8107,7 @@ http://www.inkscape.org/</dc:description>
        id="path5624" />
   </g>
   <g
-     transform="translate(-298.3149,-107.1388)"
+     transform="translate(-298.3149,-87.1388)"
      id="selection_select_all"
      inkscape:label="#selection_select_all">
     <use
@@ -10545,7 +10546,7 @@ http://www.inkscape.org/</dc:description>
   <g
      id="selection_paste_in_place"
      inkscape:label="#selection_paste_in_place"
-     transform="translate(-429.9517,-49.93562)">
+     transform="translate(-429.9517,-29.93562)">
     <g
        transform="translate(-4.83e-2,-5.4332e-2)"
        id="g6202">
@@ -10591,7 +10592,7 @@ http://www.inkscape.org/</dc:description>
   <g
      id="selection_paste_style"
      inkscape:label="#selection_paste_style"
-     transform="translate(-429.9489,-29.94566)">
+     transform="translate(-429.9489,-9.94566)">
     <use
        transform="translate(0,-4.298023e-6)"
        x="0"
@@ -12802,4 +12803,45 @@ http://www.inkscape.org/</dc:description>
        width="1250"
        height="1250" />
   </g>
+  <g
+     id="edit_undo_history"
+     transform="matrix(1.00075,0,0,0.995637,-4.124129e-2,0.179073)">
+    <g
+       transform="matrix(0.723037,0,0,0.675336,-257.1363,-6.948167)"
+       id="g2661">
+      <path
+         style="fill:#fac32d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="M 432.57586,60.789275 L 440.01434,53.384696 L 440.01434,57.086985 C 440.01434,57.086985 448.78292,57.019152 448.78292,57.019152 C 448.78292,57.019152 448.78292,70.32655 448.78292,70.32655 C 448.78292,70.32655 445.5535,70.255081 445.5535,70.255081 C 445.5535,70.255081 445.5535,63.562531 445.5535,63.562531 C 445.5535,63.562531 438.61178,63.562531 438.61178,63.562531 C 438.61178,63.562531 438.61178,66.536998 438.61178,66.536998 C 438.61178,66.536998 432.57586,60.789275 432.57586,60.789275 z "
+         id="path2640" />
+      <path
+         style="fill:#efe4b6;fill-opacity:1;fill-rule:evenodd;stroke:#efe7c1;stroke-width:1.43366158;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1"
+         d="M 432.55799,61.527847 L 439.14373,54.492253"
+         id="path2645" />
+      <path
+         style="fill:#ca8f0b;fill-opacity:1;fill-rule:evenodd;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="M 442.91075,70.258235 C 445.63204,70.163303 445.59879,70.32655 445.59879,70.32655 C 445.59879,70.32655 445.52187,63.562531 445.52187,63.562531 C 445.52187,62.075298 445.52187,62.075298 443.44884,62.075298 C 443.44884,62.075298 433.69657,61.965339 433.69657,61.965339 L 439.1693,67.94512 L 439.1693,64.464649 C 439.1693,64.464649 440.36473,64.494501 441.60518,64.494501 C 444.08614,64.494501 442.91075,67.280498 442.91075,70.258235 z "
+         id="path2642" />
+      <path
+         id="path2647"
+         d="M 432.39322,60.653071 L 439.32362,53.250046 L 439.32362,56.896141 C 439.32362,56.896141 446.48989,56.847305 448.98989,56.847305 C 448.98989,56.847305 449.02305,56.999851 449.02305,70.32655 C 449.02305,70.32655 444.55365,70.347313 443.45479,70.32655 C 443.45479,70.32655 443.45767,64.354932 443.45767,64.354932 C 442.20767,64.354932 439.3085,64.354932 439.3085,64.354932 L 439.32362,68.250046 L 432.39322,60.653071 z "
+         style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.39714611;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    </g>
+    <g
+       id="g11177"
+       transform="translate(-254.4684,4.926264)">
+      <path
+         style="opacity:1.0000000;color:#000000;fill:url(#linearGradient5612);fill-opacity:1.0;fill-rule:evenodd;stroke:url(#linearGradient5620);stroke-width:0.71197993;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:0.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+         id="path14377"
+         d="M 284.00000 23.000000 A 3.0000000 3.0000000 0 1 1  278.00000,23.000000 A 3.0000000 3.0000000 0 1 1  284.00000 23.000000 z"
+         transform="matrix(1.331759,0,0,1.327869,-53.22381,-6.040984)" />
+      <path
+         style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 320.4594,22.007813 L 321.4594,21.007813 L 321.4594,25.007813 L 320.4594,25.007813 L 320.4594,22.007813 z "
+         id="path11169" />
+      <path
+         style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+         d="M 319.4609,24.02096 L 321.4609,24.02096 L 321.4609,25.02096 L 318.4609,25.02096 L 319.4609,24.02096 z "
+         id="path11171" />
+    </g>
+  </g>
 </svg>
index 497acf43fe38ebf6b30a8e3235bff031c31a64a1..ba5c855622588494f972331950a1c266fecc1ac2 100644 (file)
@@ -226,6 +226,9 @@ override) the bindings in the main default.xml.
   <bind key="y" modifiers="Ctrl" action="EditRedo" />
   <bind key="Y" modifiers="Ctrl" action="EditRedo" />
 
+  <bind key="h" modifiers="Ctrl,Shift" action="DialogUndoHistory" display="true" />
+  <bind key="H" modifiers="Ctrl,Shift" action="DialogUndoHistory" display="true" />
+
   <bind key="x" modifiers="Ctrl" action="EditCut" display="true"/>
   <bind key="X" modifiers="Ctrl" action="EditCut" />
 
index 497acf43fe38ebf6b30a8e3235bff031c31a64a1..ba5c855622588494f972331950a1c266fecc1ac2 100644 (file)
@@ -226,6 +226,9 @@ override) the bindings in the main default.xml.
   <bind key="y" modifiers="Ctrl" action="EditRedo" />
   <bind key="Y" modifiers="Ctrl" action="EditRedo" />
 
+  <bind key="h" modifiers="Ctrl,Shift" action="DialogUndoHistory" display="true" />
+  <bind key="H" modifiers="Ctrl,Shift" action="DialogUndoHistory" display="true" />
+
   <bind key="x" modifiers="Ctrl" action="EditCut" display="true"/>
   <bind key="X" modifiers="Ctrl" action="EditCut" />
 
index ceb9aaa50965017a4f0b1d254d83d4caebf225ce..69d786b9153449e061ded6ab3b2214fb3f4599e1 100644 (file)
@@ -27,6 +27,7 @@
     <menu action='MenuEdit'>
       <menuitem action='Undo'/>
       <menuitem action='Redo'/>
+      <menuitem action='UndoHistory'/>
       <separator/>
       <menuitem action='Cut'/>
       <menuitem action='Copy'/>
index c3182f3cc1115309ddb096514a8b7bd12e251891..4b797f233727eaa4d828b7f1ef7a5d432b8fb049 100644 (file)
@@ -67,6 +67,7 @@ libinkpre_a_SOURCES = \
        dyna-draw-context.cpp dyna-draw-context.h       \
        enums.h \
        event-context.cpp event-context.h       \
+       event-log.cpp event-log.h       \
        extract-uri.cpp extract-uri.h   \
        file.cpp file.h \
        fontsize-expansion.cpp fontsize-expansion.h     \
index 830f4c5119810bd0c78a80e60bd6893bae115716..8151445b37b563c4385044bbcdebe684f245a4fb 100644 (file)
@@ -40,6 +40,7 @@
 #include "desktop.h"
 #include "desktop-style.h"
 #include "context-fns.h"
+#include "verbs.h"
 
 #include "arc-context.h"
 
@@ -432,7 +433,8 @@ static void sp_arc_finish(SPArcContext *ac)
         SP_OBJECT(ac->item)->updateRepr();
 
         sp_desktop_selection(desktop)->set(ac->item);
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ARC, 
+                         /* TODO: annotate */ "arc-context.cpp:437");
 
         ac->item = NULL;
     }
index 04890711ba461e9bca04a49eaa5e5330729dfb21..3c46cb11e1ef0a8cf8d9966db156f42cdc23a930 100644 (file)
@@ -42,7 +42,7 @@ CompositeUndoStackObserver::remove(UndoStackObserver& observer)
 }
 
 void
-CompositeUndoStackObserver::notifyUndoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyUndoEvent(Event* log)
 {
        this->_lock();
        for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) {
@@ -54,7 +54,7 @@ CompositeUndoStackObserver::notifyUndoEvent(XML::Event* log)
 }
 
 void
-CompositeUndoStackObserver::notifyRedoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyRedoEvent(Event* log)
 {
 
        this->_lock();
@@ -67,7 +67,7 @@ CompositeUndoStackObserver::notifyRedoEvent(XML::Event* log)
 }
 
 void
-CompositeUndoStackObserver::notifyUndoCommitEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyUndoCommitEvent(Event* log)
 {
        this->_lock();
        for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) {
index fbe0ed892cf20cbb041cf67da9a48e12dea036d0..02d54eb7693415fc361ba199f18abc1cddbf4e0a 100644 (file)
 
 namespace Inkscape {
 
-namespace XML {
-
 class Event;
 
-}
-
 /**
  * Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo
  * system.
@@ -60,7 +56,7 @@ public:
                 *
                 * \param log The event log generated by the redo event.
                 */
-               void issueRedo(XML::Event* log)
+               void issueRedo(Event* log)
                {
                        this->_observer.notifyRedoEvent(log);
                }
@@ -71,7 +67,7 @@ public:
                 *
                 * \param log The event log generated by the undo event.
                 */
-               void issueUndo(XML::Event* log)
+               void issueUndo(Event* log)
                {
                        this->_observer.notifyUndoEvent(log);
                }
@@ -82,7 +78,7 @@ public:
                 *
                 * \param log The event log being committed to the undo stack.
                 */
-               void issueUndoCommit(XML::Event* log)
+               void issueUndoCommit(Event* log)
                {
                        this->_observer.notifyUndoCommitEvent(log);
                }
@@ -120,21 +116,21 @@ public:
         *
         * \param log The event log generated by the undo event.
         */
-       void notifyUndoEvent(XML::Event* log);
+       void notifyUndoEvent(Event* log);
 
        /**
         * Notify all registered UndoStackObservers of a redo event.
         *
         * \param log The event log generated by the redo event.
         */
-       void notifyRedoEvent(XML::Event* log);
+       void notifyRedoEvent(Event* log);
 
        /**
         * Notify all registered UndoStackObservers of an event log being committed to the undo stack.
         *
         * \param log The event log being committed to the undo stack.
         */
-       void notifyUndoCommitEvent(XML::Event* log);
+       void notifyUndoCommitEvent(Event* log);
 
 private:
        // Remove an observer from a given list
index 7343d6250c51a14e2a6049ef33c50df04307972a..417734fd57d49c5be45f8693073d7133ebb35e2f 100644 (file)
@@ -713,7 +713,8 @@ connector_handle_button_release(SPConnectorContext *const cc, GdkEventButton con
                 cc->clickeditem->setHidden(false);
                 sp_conn_adjust_path(SP_PATH(cc->clickeditem));
                 cc->clickeditem->updateRepr();
-                sp_document_done(doc);
+                sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, 
+                                 /* TODO: annotate */ "connector-context.cpp:717");
                 cc_set_active_conn(cc, cc->clickeditem);
                 sp_document_ensure_up_to_date(doc);
                 cc->state = SP_CONNECTOR_CONTEXT_IDLE;
@@ -920,7 +921,8 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc)
     sp_curve_unref(c);
 
     /* Flush pending updates */
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, 
+                     /* TODO: annotate */ "connector-context.cpp:925");
     sp_document_ensure_up_to_date(doc);
 }
 
@@ -1274,7 +1276,8 @@ void cc_selection_set_avoid(bool const set_avoid)
         return;
     }
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_CONTEXT_CONNECTOR,
+                     /* TODO: annotate */ "connector-context.cpp:1280");
 }
 
 
index 6aa49b727aada2768d19d55d3783da44b70748c9..7035e89feb1fb7450b2cabc7915ecaa2eb9d30fd 100644 (file)
 namespace Inkscape {
 
 void
-ConsoleOutputUndoObserver::notifyUndoEvent(XML::Event* log)
+ConsoleOutputUndoObserver::notifyUndoEvent(Event* log)
 {
-       g_message("notifyUndoEvent (sp_document_undo) called; log=%p\n", log);
+    // g_message("notifyUndoEvent (sp_document_undo) called; log=%p\n", log->event);
 }
 
 void
-ConsoleOutputUndoObserver::notifyRedoEvent(XML::Event* log)
+ConsoleOutputUndoObserver::notifyRedoEvent(Event* log)
 {
-       g_message("notifyRedoEvent (sp_document_redo) called; log=%p\n", log);
+    // g_message("notifyRedoEvent (sp_document_redo) called; log=%p\n", log->event);
 }
 
 void
-ConsoleOutputUndoObserver::notifyUndoCommitEvent(XML::Event* log)
+ConsoleOutputUndoObserver::notifyUndoCommitEvent(Event* log)
 {
-       g_message("notifyUndoCommitEvent (sp_document_maybe_done) called; log=%p\n", log);
+    //g_message("notifyUndoCommitEvent (sp_document_maybe_done) called; log=%p\n", log->event);
 }
 
 }
index 6ab299894234ec3c96fe14c9ef4506557531102a..32149c15dc012b13b83d5d68e2897938826a11ee 100644 (file)
 
 namespace Inkscape {
 
-namespace XML {
-
-class Event;
-
-}
-
 class ConsoleOutputUndoObserver : public UndoStackObserver {
 public:
-       ConsoleOutputUndoObserver() : UndoStackObserver() { }
-       ~ConsoleOutputUndoObserver() { }
+    ConsoleOutputUndoObserver() : UndoStackObserver() { }
+    ~ConsoleOutputUndoObserver() { }
 
-       void notifyUndoEvent(XML::Event* log);
-       void notifyRedoEvent(XML::Event* log);
-       void notifyUndoCommitEvent(XML::Event* log);
+    void notifyUndoEvent(Event* log);
+    void notifyRedoEvent(Event* log);
+    void notifyUndoCommitEvent(Event* log);
 
 };
-
 }
 
 #endif
index a2dc1a492bfcef863b2180273d25237db3ebfaa6..5531abfefbe7c51562325ddcceb38b8be5e2491b 100644 (file)
@@ -123,7 +123,8 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge
                     sp_repr_set_svg_double(repr, "position", guide_pos_dt);
                     SP_OBJECT_REPR(desktop->namedview)->appendChild(repr);
                     Inkscape::GC::release(repr);
-                    sp_document_done(sp_desktop_document(desktop));
+                    sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                                     /* TODO: annotate */ "desktop-events.cpp:127");
                 }
                 desktop->set_coordinate_status(event_dt);
             }
@@ -202,7 +203,8 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
                         sp_guide_remove(guide);
                     }
                     moved = false;
-                    sp_document_done(sp_desktop_document(desktop));
+                    sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                                     /* TODO: annotate */ "desktop-events.cpp:207");
                     desktop->set_coordinate_status(event_dt);
                     desktop->setPosition (event_dt);
                 }
index e47437c724c61e0c86ebd2ff44bdd518164d02e8..5f6c557f14ac01c8d588c326ea09424a839436b5 100644 (file)
@@ -863,7 +863,8 @@ clonetiler_unclump (GtkWidget *widget, void *)
 
     g_slist_free (to_unclump);
 
-    sp_document_done (sp_desktop_document (desktop));
+    sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER, 
+                      /* TODO: annotate */ "clonetiler.cpp:867");
 }
 
 static guint
@@ -915,7 +916,8 @@ clonetiler_remove (GtkWidget *widget, void *, bool do_undo = true)
     clonetiler_change_selection (NULL, selection, dlg);
 
     if (do_undo)
-        sp_document_done (sp_desktop_document (desktop));
+        sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER, 
+                          /* TODO: annotate */ "clonetiler.cpp:920");
 }
 
 static NR::Rect
@@ -1294,7 +1296,8 @@ clonetiler_apply (GtkWidget *widget, void *)
 
     clonetiler_change_selection (NULL, selection, dlg);
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_CLONETILER, 
+                     /* TODO: annotate */ "clonetiler.cpp:1300");
 }
 
 static GtkWidget *
index 1efae59e1a56da5c1ffc20843f6618d0cac78b76..1bdc49f7e96c6d117e65afb6dfe3a4c7287a2637 100644 (file)
@@ -285,7 +285,8 @@ sp_fill_style_widget_fillrule_changed ( SPPaintSelector *psel,
 
     sp_repr_css_attr_unref (css);
 
-    sp_document_done (SP_ACTIVE_DOCUMENT);
+    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "fill-style.cpp:289");
 }
 
 static gchar *undo_label_1 = "fill:flatcolor:1";
@@ -324,7 +325,8 @@ sp_fill_style_widget_paint_dragged (SPPaintSelector *psel, SPWidget *spw)
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, SP_ACTIVE_DESKTOP, "fill", "fill-opacity");
-            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label);
+            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
+                                    /* TODO: annotate */ "fill-style.cpp:329");
             g_object_set_data (G_OBJECT (spw), "local", GINT_TO_POINTER (TRUE)); // local change, do not update from selection
             break;
         }
@@ -385,7 +387,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
             sp_repr_css_attr_unref (css);
 
-            sp_document_done (document);
+            sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                              /* TODO: annotate */ "fill-style.cpp:391");
             break;
         }
 
@@ -393,7 +396,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, desktop, "fill", "fill-opacity");
-            sp_document_maybe_done (sp_desktop_document(desktop), undo_label);
+            sp_document_maybe_done (sp_desktop_document(desktop), undo_label, SP_VERB_DIALOG_FILL_STROKE,
+                                    /* TODO: annotate */ "fill-style.cpp:400");
 
             // on release, toggle undo_label so that the next drag will not be lumped with this one
             if (undo_label == undo_label_1)
@@ -459,7 +463,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
                 sp_repr_css_attr_unref (css);
 
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                  /* TODO: annotate */ "fill-style.cpp:467");
             }
             break;
 
@@ -505,7 +510,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
 
                 } // end if
 
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                  /* TODO: annotate */ "fill-style.cpp:514");
 
             } // end if
 
@@ -519,7 +525,8 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                     sp_desktop_set_style (desktop, css);
                     sp_repr_css_attr_unref (css);
 
-                    sp_document_done (document);
+                    sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                      /* TODO: annotate */ "fill-style.cpp:529");
             }
             break;
 
index 7be2545f0d56a4304f99473e6d2bae41e24cf3e5..479cab8ec1dbb9995dbad27a6d43eb0ad29e983a 100644 (file)
@@ -73,7 +73,8 @@ void GuidelinePropertiesDialog::_onApply()
                              ? points
                              : _guide->position + points );
     sp_guide_moveto(*_guide, newpos, true);
-    sp_document_done(SP_OBJECT_DOCUMENT(_guide));
+    sp_document_done(SP_OBJECT_DOCUMENT(_guide), SP_VERB_NONE, 
+                     /* TODO: annotate */ "guidelinedialog.cpp:77");
 }
 
 void GuidelinePropertiesDialog::_onOK()
@@ -85,7 +86,8 @@ void GuidelinePropertiesDialog::_onDelete()
 {
     SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
     sp_guide_remove(_guide);
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_NONE, 
+                     /* TODO: annotate */ "guidelinedialog.cpp:90");
 }
 
 void GuidelinePropertiesDialog::_response(gint response)
index 51b0abd61c51a59f7128685774e6a9c024d05eb7..6f12a48f12a3d3225011aa9c6ac687186c5248e3 100644 (file)
@@ -345,7 +345,8 @@ sp_item_widget_sensitivity_toggled (GtkWidget *widget, SPWidget *spw)
 
     item->setLocked(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
 
-    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:insensitive");
+    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:insensitive", SP_VERB_NONE, 
+                            /* TODO: annotate */ "item-properties.cpp:349");
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
 }
@@ -363,7 +364,8 @@ sp_item_widget_hidden_toggled(GtkWidget *widget, SPWidget *spw)
 
     item->setExplicitlyHidden(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
 
-    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:visiblity");
+    sp_document_maybe_done (SP_ACTIVE_DOCUMENT,  "ItemDialog:visiblity", SP_VERB_NONE, 
+                            /* TODO: annotate */ "item-properties.cpp:368");
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
 }
@@ -395,7 +397,8 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
         gtk_label_set_markup_with_mnemonic (GTK_LABEL (id_label), _("_Id"));
         SP_EXCEPTION_INIT (&ex);
         sp_object_setAttribute (SP_OBJECT (item), "id", id, &ex);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "ItemDialog:id");
+        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "ItemDialog:id", SP_VERB_NONE, 
+                                /* TODO: annotate */ "item-properties.cpp:401");
     }
 
     /* Retrieve the label widget for the object's label */
@@ -409,7 +412,8 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
     SPObject *obj = (SPObject*)item;
     if (strcmp (label, obj->defaultLabel())) {
         obj->setLabel(label);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "inkscape:label");
+        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "inkscape:label", SP_VERB_NONE,
+                                /* TODO: annotate */ "item-properties.cpp:416");
     }
 
     /* Retrieve the title */
@@ -417,14 +421,16 @@ sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
     gchar *title = (gchar *)gtk_entry_get_text (GTK_ENTRY (w));
     if (title != NULL) {
         obj->setTitle(title);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "title");
+        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "title", SP_VERB_NONE, 
+                                /* TODO: annotate */ "item-properties.cpp:425");
     }
 
     /* Retrieve the description */
     gchar *desc = NULL; /* TODO:  get text from text buffer */
     if (desc != NULL) {
         obj->setDesc(desc);
-        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "desc");
+        sp_document_maybe_done (SP_ACTIVE_DOCUMENT, "desc", SP_VERB_NONE, 
+                                /* TODO: annotate */ "item-properties.cpp:433");
     }
 
     gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
index e407c7082299e03a7a814a205b8355c8f4cfbcde..e35cc9550a5440dfeb3b00254a76dfe1420d4637 100644 (file)
@@ -111,7 +111,8 @@ LayerPropertiesDialog::_apply()
     g_assert(_strategy != NULL);
 
     _strategy->perform(*this);
-    sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP));
+    sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_NONE,
+                     /* TODO: annotate */ "layer-properties.cpp:115");
 
     _close();
 }
@@ -190,7 +191,8 @@ void LayerPropertiesDialog::Rename::perform(LayerPropertiesDialog &dialog) {
     desktop->layer_manager->renameLayer( desktop->currentLayer(),
                                          ( name.empty() ? NULL : (gchar *)name.c_str() )
     );
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                     /* TODO: annotate */ "layer-properties.cpp:195");
     // TRANSLATORS: This means "The layer has been renamed"
     desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Renamed layer"));
 }
index e89e5050d8bd0166a6f792edbd77d0d2fdb8de12..3a7463ff30dfb1d891a6eb4e404c46c51a08ecf1 100644 (file)
@@ -587,7 +587,8 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol )
                 row[_model->_colVisible] = newValue;
                 item->setHidden( !newValue  );
                 item->updateRepr();
-                sp_document_done( _desktop->doc() );
+                sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, 
+                                  /* TODO: annotate */ "layers-panel.cpp:591");
             }
             break;
 
@@ -597,7 +598,8 @@ void LayersPanel::_toggled( Glib::ustring const& str, int targetCol )
                 row[_model->_colLocked] = newValue;
                 item->setLocked( newValue );
                 item->updateRepr();
-                sp_document_done( _desktop->doc() );
+                sp_document_done( _desktop->doc() , SP_VERB_DIALOG_LAYERS, 
+                                  /* TODO: annotate */ "layers-panel.cpp:602");
             }
             break;
         }
@@ -693,7 +695,8 @@ void LayersPanel::_opacityChanged()
 
         sp_repr_css_attr_unref( css );
 
-        sp_document_maybe_done( _desktop->doc(), "layers:opacity" );
+        sp_document_maybe_done( _desktop->doc(), "layers:opacity", SP_VERB_NONE, 
+                                /* TODO: annotate */ "layers-panel.cpp:699" );
 
         _opacityConnection.unblock();
     }
index 7be1b8a1ce359b38c7edc4bb0a78d6eb661fef64..f96949f5b1444eed439059b9f33938e10542c69a 100644 (file)
@@ -307,7 +307,8 @@ sp_fillstroke_opacity_changed (GtkAdjustment *a, SPWidget *dlg)
 
     sp_repr_css_attr_unref (css);
 
-    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity");
+    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_NONE, 
+                            /* TODO: annotate */ "object-properties.cpp:311");
 
     gtk_object_set_data (GTK_OBJECT (dlg), "blocked", GUINT_TO_POINTER (FALSE));
 }
index d7c4316e1d99cb9cd2dd6a0e303f0e8c5072400a..670da965e763d8b10f75b26c6494be42006f3543 100644 (file)
@@ -156,7 +156,8 @@ sp_attribute_widget_changed (GtkEditable *editable)
                 text = SP_OBJECT_REPR (spaw->src.object)->attribute(spaw->attribute);
                 gtk_entry_set_text (GTK_ENTRY (spaw), text ? text : "");
             }
-            sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object));
+            sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE, 
+                              /* TODO: annotate */ "sp-attribute-widget.cpp:160");
             
         } else if (spaw->src.repr) {
         
@@ -767,7 +768,8 @@ sp_attribute_table_entry_changed ( GtkEditable *editable,
                         gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]), 
                                              text ? text : (const gchar *) "");
                     }
-                    sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object));
+                    sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE, 
+                                      /* TODO: annotate */ "sp-attribute-widget.cpp:772");
                     
                 } else if (spat->src.repr) {
                     
index 8f345d83797c46a34afb96065dd79939e55f0860..80099eb82718809fa03371e46b4f87555abe4310 100644 (file)
@@ -261,7 +261,8 @@ sp_stroke_style_paint_dragged(SPPaintSelector *psel, SPWidget *spw)
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, SP_ACTIVE_DESKTOP, "stroke", "stroke-opacity");
-            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label);
+            sp_document_maybe_done (sp_desktop_document(SP_ACTIVE_DESKTOP), undo_label, SP_VERB_NONE, 
+                                    /* TODO: annotate */ "stroke-style.cpp:265");
             break;
         }
 
@@ -306,7 +307,8 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
 
             sp_repr_css_attr_unref(css);
 
-            sp_document_done(document);
+            sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
+                             /* TODO: annotate */ "stroke-style.cpp:311");
             break;
         }
 
@@ -314,7 +316,8 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
         case SP_PAINT_SELECTOR_MODE_COLOR_CMYK:
         {
             sp_paint_selector_set_flat_color (psel, desktop, "stroke", "stroke-opacity");
-            sp_document_maybe_done (sp_desktop_document(desktop), undo_label);
+            sp_document_maybe_done (sp_desktop_document(desktop), undo_label, SP_VERB_DIALOG_FILL_STROKE, 
+                                    /* TODO: annotate */ "stroke-style.cpp:320");
 
             // on release, toggle undo_label so that the next drag will not be lumped with this one
             if (undo_label == undo_label_1)
@@ -365,7 +368,8 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                     }
                 }
 
-                sp_document_done(document);
+                sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
+                                 /* TODO: annotate */ "stroke-style.cpp:372");
             }
             break;
 
@@ -408,7 +412,8 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
 
                 } // end if
 
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                  /* TODO: annotate */ "stroke-style.cpp:416");
             } // end if
 
             break;
@@ -421,7 +426,8 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                     sp_desktop_set_style (desktop, css);
                     sp_repr_css_attr_unref (css);
 
-                    sp_document_done (document);
+                    sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE, 
+                                      /* TODO: annotate */ "stroke-style.cpp:430");
             }
             break;
 
@@ -879,7 +885,8 @@ sp_marker_select(GtkOptionMenu *mnu, GtkWidget *spw)
 
     sp_repr_css_attr_unref(css);
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
+                     /* TODO: annotate */ "stroke-style.cpp:889");
 }
 
 static gboolean stroke_width_set_unit(SPUnitSelector *,
@@ -1451,7 +1458,8 @@ sp_stroke_style_scale_line(SPWidget *spw)
 
     sp_repr_css_attr_unref(css);
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE, 
+                     /* TODO: annotate */ "stroke-style.cpp:1462");
 
     gtk_object_set_data(GTK_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));
 }
@@ -1537,7 +1545,8 @@ sp_stroke_style_any_toggled(GtkToggleButton *tb, SPWidget *spw)
 
         sp_repr_css_attr_unref(css);
 
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_FILL_STROKE,
+                         /* TODO: annotate */ "stroke-style.cpp:1549");
     }
 }
 
index 50da6153995ef1e41ba2b379e96117e4137389e5..1f5ae5c7cc526786ba641e0c91af66b81f86bdd1 100644 (file)
@@ -417,7 +417,8 @@ void ColorItem::_colorDefChanged(void* data)
                         str = 0;
 
                         if ( bruteForce( document, rroot, paletteName, item->def.getR(), item->def.getG(), item->def.getB() ) ) {
-                            sp_document_done( document );
+                            sp_document_done( document , SP_VERB_DIALOG_SWATCHES, 
+                                              /* TODO: annotate */ "swatches.cpp:421");
                         }
                     }
                 }
@@ -551,7 +552,8 @@ void ColorItem::buttonClicked(bool secondary)
         sp_desktop_set_style(desktop, css);
 
         sp_repr_css_attr_unref(css);
-        sp_document_done (sp_desktop_document (desktop));
+        sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_SWATCHES, 
+                          /* TODO: annotate */ "swatches.cpp:556");
     }
 }
 
index 30e7f7a0e47ef259bc833a03555b1c6c503a9a4f..8ea0a72368c288ea529ba546c35829e168faff0a 100644 (file)
@@ -630,7 +630,8 @@ sp_text_edit_dialog_apply (GtkButton *button, GtkWidget *dlg)
     }
 
     // complete the transaction
-    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
+                      /* TODO: annotate */ "text-edit.cpp:634");
     gtk_widget_set_sensitive (apply, FALSE);
     sp_repr_css_attr_unref (css);
     g_object_set_data (G_OBJECT (dlg), "blocked", GINT_TO_POINTER (FALSE));
index 72b1cdaa8dadbb4329d711b025fad3a512f59f5b..ed8e19a05349304d35e492c172fb3cda3471da28 100644 (file)
@@ -326,7 +326,8 @@ g_print("\n row = %f     col = %f selection x= %f selection y = %f", total_row_h
     NRRect b;
             selection->bounds(&b);
 
-    sp_document_done (sp_desktop_document (desktop));
+            sp_document_done (sp_desktop_document (desktop), SP_VERB_NONE, 
+                              /* TODO: annotate */ "tiledialog.cpp:330");
 
 }
 
index 6b37b65d4bb68cfab8e7913a6967ad1089297848..e515a3f37440f3eb3d5cef0beaaff6e0873b57bd 100644 (file)
@@ -884,7 +884,8 @@ void after_tree_move(GtkCTree *tree,
     if (GTK_CTREE_ROW(node)->parent  == new_parent &&
         GTK_CTREE_ROW(node)->sibling == new_sibling)
     {
-        sp_document_done(current_document);
+        sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                         /* TODO: annotate */ "xml-tree.cpp:888");
     } else {
         sp_document_cancel(current_document);
     }
@@ -1383,7 +1384,8 @@ void cmd_new_text_node(GtkObject *object, gpointer data)
     Inkscape::XML::Node *text = sp_repr_new_text("");
     selected_repr->appendChild(text);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     /* TODO: annotate */ "xml-tree.cpp:1388");
 
     set_tree_select(text);
     set_dt_select(text);
@@ -1400,7 +1402,8 @@ void cmd_duplicate_node(GtkObject *object, gpointer data)
     Inkscape::XML::Node *dup = selected_repr->duplicate();
     parent->addChild(dup, selected_repr);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     /* TODO: annotate */ "xml-tree.cpp:1406");
 
     GtkCTreeNode *node = sp_xmlview_tree_get_repr_node(SP_XMLVIEW_TREE(tree), dup);
 
@@ -1416,7 +1419,8 @@ void cmd_delete_node(GtkObject *object, gpointer data)
     g_assert(selected_repr != NULL);
     sp_repr_unparent(selected_repr);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     /* TODO: annotate */ "xml-tree.cpp:1423");
 }
 
 
@@ -1433,7 +1437,8 @@ void cmd_delete_attr(GtkObject *object, gpointer data)
         updated->updateRepr();
     }
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
+                     /* TODO: annotate */ "xml-tree.cpp:1441");
 }
 
 
@@ -1465,7 +1470,8 @@ void cmd_set_attr(GtkObject *object, gpointer data)
         updated->updateRepr();
     }
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     /* TODO: annotate */ "xml-tree.cpp:1474");
 
     /* TODO: actually, the row won't have been created yet.  why? */
     gint row = sp_xmlview_attr_list_find_row_from_key(GTK_CLIST(attributes),
@@ -1494,7 +1500,8 @@ void cmd_raise_node(GtkObject *object, gpointer data)
 
     parent->changeOrder(selected_repr, ref);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
+                     /* TODO: annotate */ "xml-tree.cpp:1504");
 
     set_tree_select(selected_repr);
     set_dt_select(selected_repr);
@@ -1510,7 +1517,8 @@ void cmd_lower_node(GtkObject *object, gpointer data)
 
     parent->changeOrder(selected_repr, selected_repr->next());
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+                     /* TODO: annotate */ "xml-tree.cpp:1521");
 
     set_tree_select(selected_repr);
     set_dt_select(selected_repr);
@@ -1539,7 +1547,8 @@ void cmd_indent_node(GtkObject *object, gpointer data)
     parent->removeChild(repr);
     prev->addChild(repr, ref);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
+                     /* TODO: annotate */ "xml-tree.cpp:1551");
     set_tree_select(repr);
     set_dt_select(repr);
 
@@ -1559,7 +1568,8 @@ void cmd_unindent_node(GtkObject *object, gpointer data)
     parent->removeChild(repr);
     grandparent->addChild(repr, parent);
 
-    sp_document_done(current_document);
+    sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR, 
+                     /* TODO: annotate */ "xml-tree.cpp:1572");
     set_tree_select(repr);
     set_dt_select(repr);
 
index 549a4530f49985a752cc6a69f33ac18987afb3da..18d35f446a7f3d7ac5592d0ffb1b1d2521ec9633 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "composite-undo-stack-observer.h"
 
+#include "event-log.h"
+
 // XXX only for testing!
 #include "console-output-undo-observer.h"
 
@@ -65,6 +67,9 @@ struct SPDocumentPrivate {
        /* Undo listener */
        Inkscape::CompositeUndoStackObserver undoStackObservers;
 
+        /* Event log */
+        Inkscape::EventLog event_log;
+
        // XXX only for testing!
        Inkscape::ConsoleOutputUndoObserver console_output_undo_observer;
 };
index f37a3fcafb9450b14de2bac28075782bbfe048b6..35b35c88830baa97421d6a3cc66e445328dda681 100644 (file)
@@ -22,7 +22,7 @@
  * stack. Two methods exist to indicate that the given action is completed:
  *
  * \verbatim
-   void sp_document_done (SPDocument *document)
+   void sp_document_done (SPDocument *document);
    void sp_document_maybe_done (SPDocument *document, const unsigned char *key) \endverbatim
  *
  * Both move the recent action list into the undo stack and clear the
@@ -62,6 +62,7 @@
 #include "inkscape.h"
 #include "debug/event-tracker.h"
 #include "debug/simple-event.h"
+#include "event.h"
 
 
 /*
@@ -108,9 +109,9 @@ gboolean sp_document_get_undo_sensitive(SPDocument const *document) {
 }
 
 void
-sp_document_done (SPDocument *doc)
+sp_document_done (SPDocument *doc, const unsigned int event_type, Glib::ustring event_description)
 {
-       sp_document_maybe_done (doc, NULL);
+        sp_document_maybe_done (doc, NULL, event_type, event_description);
 }
 
 void
@@ -121,7 +122,8 @@ sp_document_reset_key (Inkscape::Application *inkscape, SPDesktop *desktop, GtkO
 }
 
 void
-sp_document_maybe_done (SPDocument *doc, const gchar *key)
+sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int event_type,
+                        Glib::ustring event_description)
 {
        g_assert (doc != NULL);
        g_assert (doc->priv != NULL);
@@ -142,11 +144,14 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key)
        }
 
        if (key && doc->actionkey && !strcmp (key, doc->actionkey) && doc->priv->undo) {
-               doc->priv->undo->data = sp_repr_coalesce_log ((Inkscape::XML::Event *)doc->priv->undo->data, log);
+                doc->priv->undo->data = 
+                    new Inkscape::Event(sp_repr_coalesce_log (((Inkscape::Event *)
+                                                               doc->priv->undo->data)->event, log));
        } else {
-               doc->priv->undo = g_slist_prepend (doc->priv->undo, log);
+                Inkscape::Event *event = new Inkscape::Event(log, event_type, event_description);
+                doc->priv->undo = g_slist_prepend (doc->priv->undo, event);
                doc->priv->history_size++;
-               doc->priv->undoStackObservers.notifyUndoCommitEvent(log);
+               doc->priv->undoStackObservers.notifyUndoCommitEvent(event);
        }
 
        doc->actionkey = key;
@@ -214,13 +219,13 @@ sp_document_undo (SPDocument *doc)
        finish_incomplete_transaction(*doc);
 
        if (doc->priv->undo) {
-               Inkscape::XML::Event *log=(Inkscape::XML::Event *)doc->priv->undo->data;
+               Inkscape::Event *log=(Inkscape::Event *)doc->priv->undo->data;
                doc->priv->undo = g_slist_remove (doc->priv->undo, log);
-               sp_repr_undo_log (log);
+               sp_repr_undo_log (log->event);
                doc->priv->redo = g_slist_prepend (doc->priv->redo, log);
 
                doc->rroot->setAttribute("sodipodi:modified", "true");
-               doc->priv->undoStackObservers.notifyUndoEvent(log);
+                doc->priv->undoStackObservers.notifyUndoEvent(log);
 
                ret = TRUE;
        } else {
@@ -258,9 +263,9 @@ sp_document_redo (SPDocument *doc)
        finish_incomplete_transaction(*doc);
 
        if (doc->priv->redo) {
-               Inkscape::XML::Event *log=(Inkscape::XML::Event *)doc->priv->redo->data;
+               Inkscape::Event *log=(Inkscape::Event *)doc->priv->redo->data;
                doc->priv->redo = g_slist_remove (doc->priv->redo, log);
-               sp_repr_replay_log (log);
+               sp_repr_replay_log (log->event);
                doc->priv->undo = g_slist_prepend (doc->priv->undo, log);
 
                doc->rroot->setAttribute("sodipodi:modified", "true");
@@ -291,7 +296,7 @@ sp_document_clear_undo (SPDocument *doc)
                doc->priv->undo = current->next;
                doc->priv->history_size--;
 
-               sp_repr_free_log ((Inkscape::XML::Event *)current->data);
+                delete ((Inkscape::Event *) current->data);
                g_slist_free_1 (current);
        }
 }
@@ -306,7 +311,7 @@ sp_document_clear_redo (SPDocument *doc)
                doc->priv->redo = current->next;
                doc->priv->history_size--;
 
-               sp_repr_free_log ((Inkscape::XML::Event *)current->data);
+                delete ((Inkscape::Event *) current->data);
                g_slist_free_1 (current);
        }
 }
index cf03f4188391a87adb218d3c5744c6b5736f6eff..a6b6e4e45ecb5827ac24ec941ae3ce47cc3113d3 100644 (file)
@@ -105,6 +105,8 @@ SPDocument::SPDocument() {
     p->undo = NULL;
     p->redo = NULL;
 
+    p->undoStackObservers.add(p->event_log);
+
     priv = p;
 
     // XXX only for testing!
@@ -648,6 +650,12 @@ SPDocument::removeUndoObserver(Inkscape::UndoStackObserver& observer)
        this->priv->undoStackObservers.remove(observer);
 }
 
+Inkscape::EventLog&
+SPDocument::getEventLog() const
+{
+  return priv->event_log;
+}
+
 SPObject *SPDocument::getObjectById(gchar const *id) {
     g_return_val_if_fail(id != NULL, NULL);
 
index 9739b69719baca6dbc9a4c38e76c87387b1e67cc..f7ce73fe8d2e629ab0cd1aaa611b80e7fa084b33 100644 (file)
@@ -27,6 +27,7 @@
 #include "gc-finalized.h"
 #include "gc-anchored.h"
 #include <glibmm/ustring.h>
+#include "verbs.h"
 
 namespace Avoid {
 class Router;
@@ -42,6 +43,7 @@ namespace Inkscape {
     struct Application;
     class Selection; 
     class UndoStackObserver;
+    class EventLog;
     namespace XML {
         class Document;
         class Node;
@@ -111,6 +113,8 @@ struct SPDocument : public Inkscape::GC::Managed<>,
        void addUndoObserver(Inkscape::UndoStackObserver& observer);
        void removeUndoObserver(Inkscape::UndoStackObserver& observer);
 
+       Inkscape::EventLog& getEventLog() const;
+
 private:
        SPDocument(SPDocument const &); // no copy
        void operator=(SPDocument const &); // no assign
@@ -184,8 +188,8 @@ void sp_document_request_modified (SPDocument *doc);
 gint sp_document_ensure_up_to_date (SPDocument *doc);
 
 /* Save all previous actions to stack, as one undo step */
-void sp_document_done (SPDocument *document);
-void sp_document_maybe_done (SPDocument *document, const gchar *key);
+void sp_document_done (SPDocument *document, unsigned int event_type, Glib::ustring event_description);
+void sp_document_maybe_done (SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description);
 void sp_document_reset_key (Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
 
 /* Cancel (and revert) current unsaved actions */
index 6bea0851b8d465ae9aad488edc4aae69d9aebef4..bb1f56044b0813eddb55a8d905093128f5623d0a 100644 (file)
@@ -557,7 +557,8 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
             item->updateRepr();
         }
 
-        sp_document_done(doc);
+        sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL, 
+                         /* TODO: annotate */ "draw-context.cpp:561");
     }
 
     sp_curve_unref(c);
index b05c92bc05d809a57bdbab6f424ff8650135b012..ba9949b8b4b4ba4645efaa7a706253097754d03b 100644 (file)
@@ -385,7 +385,8 @@ static gint sp_dropper_context_root_handler(SPEventContext *ec, GdkEvent *event)
 
 
                 if (!(sp_desktop_selection(ec->desktop)->isEmpty())) {
-                    sp_document_done(sp_desktop_document(ec->desktop));
+                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_DROPPER, 
+                                     /* TODO: annotate */ "dropper-context.cpp:389");
                 }
 
                 ret = TRUE;
index 0e330aaad347066aa029ca1fa47f781f62fd4656..3233198f606ecef0a60322deab9ce52b2372fe33 100644 (file)
@@ -685,7 +685,8 @@ set_to_accumulated(SPDynaDrawContext *dc)
         dc->repr = NULL;
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_CALLIGRAPHIC, 
+                     /* TODO: annotate */ "dyna-draw-context.cpp:689");
 }
 
 static void
index aefdeefa75a875de03056715fad4f150fe794a69..2f884aa1cf0a0126cd95360129392aa916b6f299 100644 (file)
@@ -222,7 +222,8 @@ Effect::effect (Inkscape::UI::View::View * doc)
     set_last_effect(this);
     imp->effect(this, doc);
 
-    sp_document_done(doc->doc());
+    sp_document_done(doc->doc(), SP_VERB_NONE, 
+                     /* TODO: annotate */ "effect.cpp:226");
 
     return;
 }
index 679c28801c5a6a40a5e8f2ce918e7a9012bd28d6..0ad55e2aca7382d05170e8da06891effdf5be3f7 100644 (file)
@@ -511,7 +511,8 @@ sp_file_vacuum()
 
     unsigned int diff = vacuum_document (doc);
 
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_FILE_VACUUM, 
+                     /* TODO: annotate */ "file.cpp:515");
 
     SPDesktop *dt = SP_ACTIVE_DESKTOP;
     if (diff > 0) {
@@ -895,7 +896,8 @@ file_import(SPDocument *in_doc, gchar const *uri, Inkscape::Extension::Extension
         }
 
         sp_document_unref(doc);
-        sp_document_done(in_doc);
+        sp_document_done(in_doc, SP_VERB_FILE_IMPORT,
+                         /* TODO: annotate */ "file.cpp:900");
 
     } else {
         gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), uri);
index 56fe5c7d8ad73ba715ab32eb8a27e8fa2cec1442..bf1281f82a43b56e11ddeab1fee96d47359049cb 100644 (file)
@@ -160,7 +160,8 @@ static gint sp_gradient_context_root_handler(SPEventContext *event_context, GdkE
                 sp_gradient_reset_to_userspace(priv, item);
             }
 
-            sp_document_done (sp_desktop_document (desktop));
+            sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+                              /* TODO: annotate */ "gradient-context.cpp:164");
 
             ret = TRUE;
         }
@@ -365,7 +366,8 @@ static gint sp_gradient_context_root_handler(SPEventContext *event_context, GdkE
                     }
                 }
                 // we did an undoable action
-                sp_document_done (sp_desktop_document (desktop));
+                sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+                                  /* TODO: annotate */ "gradient-context.cpp:370");
                 ret = TRUE;
             }
             break;
index 008397e8922afc25377f16e04e0dc54e57f57eb9..e4c7a62da43d49bab0378ca3eb30dfe455165952 100644 (file)
@@ -382,7 +382,8 @@ gr_knot_moved_handler(SPKnot *knot, NR::Point const *ppointer, guint state, gpoi
                 d_new->updateKnotShape ();
                 d_new->updateTip ();
                 d_new->updateDependencies(true);
-                sp_document_done (sp_desktop_document (d_new->parent->desktop));
+                sp_document_done (sp_desktop_document (d_new->parent->desktop), SP_VERB_CONTEXT_GRADIENT,
+                                  /* TODO: annotate */ "gradient-drag.cpp:386");
                 return;
             }
         }
@@ -513,7 +514,8 @@ gr_knot_ungrabbed_handler (SPKnot *knot, unsigned int state, gpointer data)
     dragger->updateDependencies(true);
 
     // we did an undoable action
-    sp_document_done (sp_desktop_document (dragger->parent->desktop));
+    sp_document_done (sp_desktop_document (dragger->parent->desktop), SP_VERB_CONTEXT_GRADIENT, 
+                      /* TODO: annotate */ "gradient-drag.cpp:518");
 }
 
 /**
@@ -1065,7 +1067,8 @@ GrDrag::selected_move (double x, double y)
     selected->updateDependencies(true);
 
     // we did an undoable action
-    sp_document_done (sp_desktop_document (desktop));
+    sp_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+                      /* TODO: annotate */ "gradient-drag.cpp:1071");
 }
 
 void
index 2f4a4d033b4693e60931aa9f8bc305658bd8a55a..91a26226fe6a8108521217e74aba69dab53dc309 100644 (file)
@@ -1043,7 +1043,8 @@ sp_ui_drag_data_received(GtkWidget *widget,
                     item->updateRepr();
 
                     SPDocument *doc = SP_ACTIVE_DOCUMENT;
-                    sp_document_done( doc );
+                    sp_document_done( doc , SP_VERB_NONE, 
+                                      /* TODO: annotate */ "interface.cpp:1047");
 
                     if ( srgbProf ) {
                         cmsCloseProfile( srgbProf );
@@ -1084,7 +1085,8 @@ sp_ui_drag_data_received(GtkWidget *widget,
                     item->updateRepr();
 
                     SPDocument *doc = SP_ACTIVE_DOCUMENT;
-                    sp_document_done( doc );
+                    sp_document_done( doc , SP_VERB_NONE, 
+                                      /* TODO: annotate */ "interface.cpp:1089");
                 }
             }
         }
@@ -1137,7 +1139,8 @@ sp_ui_drag_data_received(GtkWidget *widget,
             }
 
             Inkscape::GC::release(newgroup);
-            sp_document_done(doc);
+            sp_document_done(doc, SP_VERB_NONE, 
+                             /* TODO: annotate */ "interface.cpp:1143");
             break;
         }
 
@@ -1196,7 +1199,8 @@ sp_ui_drag_data_received(GtkWidget *widget,
             desktop->currentLayer()->appendChildRepr(newImage);
 
             Inkscape::GC::release(newImage);
-            sp_document_done( doc );
+            sp_document_done( doc , SP_VERB_NONE, 
+                              /* TODO: annotate */ "interface.cpp:1203");
             break;
         }
     }
index ff6a819702bfc8711c75142637c48fac03565156..7b30a2814d2009bc73cefed07b68a5cab6e3bd95 100644 (file)
 #include "knot.h"
 #include "knotholder.h"
 #include "knot-holder-entity.h"
+#include "rect-context.h"
+#include "sp-rect.h"
+#include "arc-context.h"
+#include "sp-ellipse.h"
+#include "star-context.h"
+#include "sp-star.h"
+#include "spiral-context.h"
+#include "sp-spiral.h"
+
 #include <libnr/nr-matrix-div.h>
 
 class SPDesktop;
@@ -221,8 +230,20 @@ static void knot_clicked_handler(SPKnot *knot, guint state, gpointer data)
     knotholder_update_knots(knot_holder, item);
     g_object_unref(knot_holder);
 
+    unsigned int object_verb = SP_VERB_NONE;
+
+    if (SP_IS_RECT(item))
+        object_verb = SP_VERB_CONTEXT_RECT;
+    else if (SP_IS_GENERICELLIPSE(item))
+        object_verb = SP_VERB_CONTEXT_ARC;
+    else if (SP_IS_STAR(item))
+        object_verb = SP_VERB_CONTEXT_STAR;
+    else if (SP_IS_SPIRAL(item))
+        object_verb = SP_VERB_CONTEXT_SPIRAL;
+
     // for drag, this is done by ungrabbed_handler, but for click we must do it here
-    sp_document_done(SP_OBJECT_DOCUMENT(knot_holder->item));
+    sp_document_done(SP_OBJECT_DOCUMENT(knot_holder->item), object_verb, 
+                     /* TODO: annotate */ "knotholder.cpp:246");
 }
 
 static void knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state, gpointer data)
@@ -255,7 +276,20 @@ static void knot_ungrabbed_handler(SPKnot *knot, unsigned int state, SPKnotHolde
     } else {
         SPObject *object = (SPObject *) kh->item;
         object->updateRepr(object->repr, SP_OBJECT_WRITE_EXT);
-        sp_document_done(SP_OBJECT_DOCUMENT (object));
+
+        unsigned int object_verb = SP_VERB_NONE;
+
+        if (SP_IS_RECT(object))
+            object_verb = SP_VERB_CONTEXT_RECT;
+        else if (SP_IS_GENERICELLIPSE(object))
+            object_verb = SP_VERB_CONTEXT_ARC;
+        else if (SP_IS_STAR(object))
+            object_verb = SP_VERB_CONTEXT_STAR;
+        else if (SP_IS_SPIRAL(object))
+            object_verb = SP_VERB_CONTEXT_SPIRAL;
+
+        sp_document_done(SP_OBJECT_DOCUMENT (object), object_verb, 
+                         /* TODO: annotate */ "knotholder.cpp:292");
     }
 }
 
index 66d1acb897e1a3fc6b852b47b5566dc22fd34cbe..b3709c9d49eece818239cadc1d0c58795ac3825d 100644 (file)
@@ -54,6 +54,7 @@ static char const menus_skeleton[] =
 "   <submenu name=\"" N_("_Edit") "\">\n"
 "       <verb verb-id=\"EditUndo\" />\n"
 "       <verb verb-id=\"EditRedo\" />\n"
+"       <verb verb-id=\"DialogUndoHistory\" />\n"
 "       <separator/>\n"
 "       <verb verb-id=\"EditCut\" />\n"
 "       <verb verb-id=\"EditCopy\" />\n"
@@ -130,6 +131,7 @@ static char const menus_skeleton[] =
 "       <separator/>\n"
 "       <verb verb-id=\"ViewNew\" />\n"
 "       <verb verb-id=\"ViewIconPreview\" />\n"
+"       <separator/>\n"
 "   </submenu>\n"
 "   <submenu name=\"" N_("_Layer") "\">\n"
 "       <verb verb-id=\"LayerNew\" />\n"
index f9f6f169132f4205cb5eff0fb7f52b61ff2acbe8..455a0e7d8c67c2468148f847381592c9c6131993 100644 (file)
@@ -40,6 +40,7 @@
 #include "libnr/nr-matrix-ops.h"
 #include "splivarot.h"
 #include "svg/svg.h"
+#include "verbs.h"
 #include "display/bezier-utils.h"
 #include <vector>
 #include <algorithm>
@@ -479,7 +480,8 @@ static void update_repr_internal(Inkscape::NodePath::Path *np)
 void sp_nodepath_update_repr(Inkscape::NodePath::Path *np)
 {
     update_repr_internal(np);
-    sp_document_done(sp_desktop_document(np->desktop));
+    sp_document_done(sp_desktop_document(np->desktop), SP_VERB_CONTEXT_NODE, 
+                     /* TODO: annotate */ "nodepath.cpp:484");
 
     if (np->livarot_path) {
         delete np->livarot_path;
@@ -499,7 +501,8 @@ void sp_nodepath_update_repr(Inkscape::NodePath::Path *np)
 static void sp_nodepath_update_repr_keyed(Inkscape::NodePath::Path *np, gchar const *key)
 {
     update_repr_internal(np);
-    sp_document_maybe_done(sp_desktop_document(np->desktop), key);
+    sp_document_maybe_done(sp_desktop_document(np->desktop), key, SP_VERB_CONTEXT_NODE, 
+                           /* TODO: annotate */ "nodepath.cpp:505");
 
     if (np->livarot_path) {
         delete np->livarot_path;
@@ -541,7 +544,8 @@ static void stamp_repr(Inkscape::NodePath::Path *np)
     // move to the saved position
     new_repr->setPosition(pos > 0 ? pos : 0);
 
-    sp_document_done(sp_desktop_document(np->desktop));
+    sp_document_done(sp_desktop_document(np->desktop), SP_VERB_CONTEXT_NODE,
+                     /* TODO: annotate */ "nodepath.cpp:548");
 
     Inkscape::GC::release(new_repr);
     g_free(svgpath);
@@ -2003,7 +2007,8 @@ void sp_node_delete_preserve(GList *nodes_to_delete)
             //delete this nodepath's object, not the entire selection! (though at this time, this
             //does not matter)
             sp_selection_delete();
-            sp_document_done (document);
+            sp_document_done (document, SP_VERB_CONTEXT_NODE,
+                              /* TODO: annotate */ "nodepath.cpp:2011");
         } else {
             sp_nodepath_update_repr(nodepath);
             sp_nodepath_update_statusbar(nodepath);
@@ -2039,7 +2044,8 @@ void sp_node_selected_delete()
         sp_nodepath_get_node_count(nodepath) < 2) {
         SPDocument *document = sp_desktop_document (nodepath->desktop);
         sp_selection_delete();
-        sp_document_done (document);
+        sp_document_done (document, SP_VERB_CONTEXT_NODE, 
+                          /* TODO: annotate */ "nodepath.cpp:2048");
         return;
     }
 
index ba181476f8add21aa3660c6c1ceb04888de58410..61e61bee3431aa87fb5f94b12f4e3a5bf36191a0 100644 (file)
@@ -135,7 +135,8 @@ sp_selected_path_combine(void)
     // move to the position of the topmost, reduced by the number of deleted items
     repr->setPosition(topmost > 0 ? topmost + 1 : 0);
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_COMBINE, 
+                     /* TODO: annotate */ "path-chemistry.cpp:139");
 
     selection->set(repr);
 
@@ -228,7 +229,8 @@ sp_selected_path_break_apart(void)
     }
 
     if (did) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_BREAK_APART, 
+                         /* TODO: annotate */ "path-chemistry.cpp:233");
     } else {
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No path(s)</b> to break apart in the selection."));
         return;
@@ -294,7 +296,8 @@ sp_selected_path_to_curves0(gboolean interactive, guint32 text_grouping_policy)
 
     if (interactive) {
         if (did) {
-            sp_document_done(sp_desktop_document(desktop));
+            sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_TO_CURVE, 
+                             /* TODO: annotate */ "path-chemistry.cpp:300");
         } else {
             sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No objects</b> to convert to path in the selection."));
             return;
@@ -371,7 +374,8 @@ sp_selected_path_reverse()
     }
 
     if (did) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_REVERSE,
+                         /* TODO: annotate */ "path-chemistry.cpp:378");
     } else {
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to reverse in the selection."));
     }
index 3edfe49182c975bbe66ff70ed64b2369ec5ab8c6..f8759d8c2a301c1c1e3b7cb7518d445854b0126b 100644 (file)
@@ -155,6 +155,7 @@ static char const preferences_skeleton[] =
 "    <group id=\"script\" />\n"
 "    <group id=\"input\" />\n"
 "    <group id=\"colorpickerwindow\" />\n"
+"    <group id=\"undo-history\" />\n"
 "  </group>\n"
 "  <group id=\"printing\">\n"
 "    <settings id=\"ps\"/>\n"
index ffd57c415d985a4c118bfee730b35365b4e32b93..7e1b76e2c8bd9565b251466815f4648626e09d41 100644 (file)
@@ -486,7 +486,8 @@ static void sp_rect_finish(SPRectContext *rc)
         SP_OBJECT(rc->item)->updateRepr();
 
         sp_desktop_selection(dt)->set(rc->item);
-        sp_document_done(sp_desktop_document(dt));
+        sp_document_done(sp_desktop_document(dt), SP_VERB_CONTEXT_RECT, 
+                         /* TODO: annotate */ "rect-context.cpp:490");
 
         rc->item = NULL;
     }
index 352a0b6ad5943353c39b350242585079c10193e1..ca2768a88183922838c0b55f56be24920eb9612c 100644 (file)
@@ -213,7 +213,8 @@ void sp_selection_delete()
 
     if (tools_isactive (desktop, TOOLS_TEXT))
         if (sp_text_delete_selection(desktop->event_context)) {
-            sp_document_done(sp_desktop_document(desktop));
+            sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+                             /* TODO: annotate */ "selection-chemistry.cpp:217");
             return;
         }
 
@@ -238,7 +239,8 @@ void sp_selection_delete()
      */
     tools_switch ( desktop, tools_active ( desktop ) );
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_DELETE, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:243");
 }
 
 /* fixme: sequencing */
@@ -276,7 +278,8 @@ void sp_selection_duplicate()
         Inkscape::GC::release(copy);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_DUPLICATE, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:282");
 
     selection->setReprList(newsel);
 
@@ -300,7 +303,8 @@ void sp_edit_clear_all()
         items = g_slist_remove(items, items->data);
     }
 
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_EDIT_CLEAR_ALL,
+                     /* TODO: annotate */ "selection-chemistry.cpp:307");
 }
 
 GSList *
@@ -501,7 +505,8 @@ void sp_selection_group()
     // Move to the position of the topmost, reduced by the number of items deleted from topmost_parent
     group->setPosition(topmost + 1);
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_GROUP, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:509");
 
     selection->set(group);
     Inkscape::GC::release(group);
@@ -562,7 +567,8 @@ void sp_selection_ungroup()
 
     g_slist_free(items);
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_UNGROUP, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:571");
 }
 
 static SPGroup *
@@ -663,7 +669,8 @@ sp_selection_raise()
         rev = g_slist_remove(rev, child);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_RAISE,
+                     /* TODO: annotate */ "selection-chemistry.cpp:673");
 }
 
 void sp_selection_raise_to_top()
@@ -698,7 +705,8 @@ void sp_selection_raise_to_top()
 
     g_slist_free(rl);
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_SELECTION_TO_FRONT, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:709");
 }
 
 void
@@ -754,7 +762,8 @@ sp_selection_lower()
         rev = g_slist_remove(rev, child);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_LOWER, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:766");
 
 }
 
@@ -802,7 +811,8 @@ void sp_selection_lower_to_bottom()
 
     g_slist_free(rl);
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_SELECTION_TO_BACK, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:815");
 }
 
 void
@@ -1110,7 +1120,8 @@ void sp_selection_paste(bool in_place)
         sp_selection_move_relative(selection, m);
     }
 
-    sp_document_done(document);
+    sp_document_done(document, SP_VERB_EDIT_PASTE, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:1124");
 }
 
 void sp_selection_paste_style()
@@ -1136,7 +1147,8 @@ void sp_selection_paste_style()
 
     sp_desktop_set_style (desktop, style_clipboard);
 
-    sp_document_done(sp_desktop_document (desktop));
+    sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_PASTE_STYLE,
+                     /* TODO: annotate */ "selection-chemistry.cpp:1151");
 }
 
 void sp_selection_paste_size (bool apply_x, bool apply_y)
@@ -1171,7 +1183,8 @@ void sp_selection_paste_size (bool apply_x, bool apply_y)
                                      apply_x? scale_x : (desktop->isToolboxButtonActive ("lock")? scale_y : 1.0),
                                      apply_y? scale_y : (desktop->isToolboxButtonActive ("lock")? scale_x : 1.0)));
 
-    sp_document_done(sp_desktop_document (desktop));
+    sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_PASTE_SIZE,
+                     /* TODO: annotate */ "selection-chemistry.cpp:1187");
 }
 
 void sp_selection_paste_size_separately (bool apply_x, bool apply_y)
@@ -1211,7 +1224,8 @@ void sp_selection_paste_size_separately (bool apply_x, bool apply_y)
 
     }
 
-    sp_document_done(sp_desktop_document (desktop));
+    sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_PASTE_SIZE_SEPARATELY,
+                     /* TODO: annotate */ "selection-chemistry.cpp:1228");
 }
 
 void sp_selection_to_next_layer ()
@@ -1246,7 +1260,8 @@ void sp_selection_to_next_layer ()
         g_slist_free (copied);
         if (temp_clip) g_slist_free (temp_clip);
         if (next) dt->setCurrentLayer(next);
-        sp_document_done(sp_desktop_document (dt));
+        sp_document_done(sp_desktop_document (dt), SP_VERB_LAYER_MOVE_TO_NEXT, 
+                         /* TODO: annotate */ "selection-chemistry.cpp:1264");
     } else {
         no_more = true;
     }
@@ -1290,7 +1305,8 @@ void sp_selection_to_prev_layer ()
         g_slist_free (copied);
         if (temp_clip) g_slist_free (temp_clip);
         if (next) dt->setCurrentLayer(next);
-        sp_document_done(sp_desktop_document (dt));
+        sp_document_done(sp_desktop_document (dt), SP_VERB_LAYER_MOVE_TO_PREV,
+                         /* TODO: annotate */ "selection-chemistry.cpp:1309");
     } else {
         no_more = true;
     }
@@ -1437,7 +1453,8 @@ void sp_selection_remove_transform()
         l = l->next;
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_FLATTEN, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:1457");
 }
 
 void
@@ -1545,7 +1562,8 @@ void sp_selection_rotate_90_cw()
         sp_item_rotate_rel(item, rot_neg_90);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_ROTATE_90_CCW, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:1566");
 }
 
 
@@ -1572,7 +1590,8 @@ void sp_selection_rotate_90_ccw()
         sp_item_rotate_rel(item, rot_neg_90);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_OBJECT_ROTATE_90_CW,
+                     /* TODO: annotate */ "selection-chemistry.cpp:1594");
 }
 
 void
@@ -1588,7 +1607,9 @@ sp_selection_rotate(Inkscape::Selection *selection, gdouble const angle_degrees)
     sp_document_maybe_done(sp_desktop_document(selection->desktop()),
                            ( ( angle_degrees > 0 )
                              ? "selector:rotate:ccw"
-                             : "selector:rotate:cw" ));
+                             : "selector:rotate:cw" ), 
+                           SP_VERB_CONTEXT_SELECT, 
+                           /* TODO: annotate */ "selection-chemistry.cpp:1612");
 }
 
 /**
@@ -1615,7 +1636,9 @@ sp_selection_rotate_screen(Inkscape::Selection *selection, gdouble angle)
     sp_document_maybe_done(sp_desktop_document(selection->desktop()),
                            ( (angle > 0)
                              ? "selector:rotate:ccw"
-                             : "selector:rotate:cw" ));
+                             : "selector:rotate:cw" ),
+                           SP_VERB_CONTEXT_SELECT, 
+                           /* TODO: annotate */ "selection-chemistry.cpp:1641");
 }
 
 void
@@ -1639,7 +1662,9 @@ sp_selection_scale(Inkscape::Selection *selection, gdouble grow)
     sp_document_maybe_done(sp_desktop_document(selection->desktop()),
                            ( (grow > 0)
                              ? "selector:scale:larger"
-                             : "selector:scale:smaller" ));
+                             : "selector:scale:smaller" ),
+                           SP_VERB_CONTEXT_SELECT,
+                           /* TODO: annotate */ "selection-chemistry.cpp:1667");
 }
 
 void
@@ -1657,7 +1682,8 @@ sp_selection_scale_times(Inkscape::Selection *selection, gdouble times)
 
     NR::Point const center(selection->bounds().midpoint());
     sp_selection_scale_relative(selection, center, NR::scale(times, times));
-    sp_document_done(sp_desktop_document(selection->desktop()));
+    sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_CONTEXT_SELECT, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:1685");
 }
 
 void
@@ -1672,11 +1698,14 @@ sp_selection_move(gdouble dx, gdouble dy)
     sp_selection_move_relative(selection, dx, dy);
 
     if (dx == 0) {
-        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:vertical");
+        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:vertical", SP_VERB_CONTEXT_SELECT, 
+                               /* TODO: annotate */ "selection-chemistry.cpp:1702");
     } else if (dy == 0) {
-        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:horizontal");
+        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:horizontal", SP_VERB_CONTEXT_SELECT, 
+                               /* TODO: annotate */ "selection-chemistry.cpp:1705");
     } else {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SELECT, 
+                         /* TODO: annotate */ "selection-chemistry.cpp:1707");
     }
 }
 
@@ -1697,11 +1726,14 @@ sp_selection_move_screen(gdouble dx, gdouble dy)
     sp_selection_move_relative(selection, zdx, zdy);
 
     if (dx == 0) {
-        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:vertical");
+        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:vertical", SP_VERB_CONTEXT_SELECT, 
+                               /* TODO: annotate */ "selection-chemistry.cpp:1730");
     } else if (dy == 0) {
-        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:horizontal");
+        sp_document_maybe_done(sp_desktop_document(desktop), "selector:move:horizontal", SP_VERB_CONTEXT_SELECT, 
+                               /* TODO: annotate */ "selection-chemistry.cpp:1733");
     } else {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SELECT, 
+                         /* TODO: annotate */ "selection-chemistry.cpp:1735");
     }
 }
 
@@ -1961,7 +1993,8 @@ sp_selection_clone()
         Inkscape::GC::release(clone);
     }
     
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_CLONE, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:1996");
 
     selection->setReprList(newsel);
  
@@ -2012,7 +2045,8 @@ sp_selection_unlink()
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No clones to unlink</b> in the selection."));
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_UNLINK_CLONE,
+                     /* TODO: annotate */ "selection-chemistry.cpp:2048");
 }
 
 void
@@ -2157,7 +2191,8 @@ sp_selection_tile(bool apply)
 
     g_slist_free (items);
 
-    sp_document_done (document);
+    sp_document_done (document, SP_VERB_EDIT_TILE, 
+                      /* TODO: annotate */ "selection-chemistry.cpp:2194");
 }
 
 void
@@ -2228,7 +2263,8 @@ sp_selection_untile()
     if (!did) {
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No pattern fills</b> in the selection."));
     } else {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_UNTILE, 
+                         /* TODO: annotate */ "selection-chemistry.cpp:2266");
         selection->setList(new_select);
     }
 }
@@ -2377,7 +2413,8 @@ sp_selection_create_bitmap_copy ()
         gdk_pixbuf_unref (pb);
 
         // Complete undoable transaction
-        sp_document_done (document);
+        sp_document_done (document, SP_VERB_SELECTION_CREATE_BITMAP,
+                          /* TODO: annotate */ "selection-chemistry.cpp:2416");
     }
 
     g_free (filename);
@@ -2502,7 +2539,8 @@ sp_selection_set_mask(bool apply_clip_path, bool apply_to_layer)
     g_slist_free (mask_items);
     g_slist_free (apply_to_items);
 
-    sp_document_done (document);
+    sp_document_done (document, SP_VERB_OBJECT_SET_MASK,
+                      /* TODO: annotate */ "selection-chemistry.cpp:2542");
 }
 
 void sp_selection_unset_mask(bool apply_clip_path) {
@@ -2582,7 +2620,8 @@ void sp_selection_unset_mask(bool apply_clip_path) {
         g_slist_free (items_to_move);
     }
 
-    sp_document_done (document);
+    sp_document_done (document, SP_VERB_OBJECT_UNSET_MASK, 
+                      /* TODO: annotate */ "selection-chemistry.cpp:2623");
 }
 
 void fit_canvas_to_selection(SPDesktop *desktop) {
@@ -2625,7 +2664,8 @@ void fit_canvas_to_selection_or_drawing(SPDesktop *desktop) {
         fit_canvas_to_selection(desktop);
     }
 
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_FIT_CANVAS_TO_DRAWING, 
+                     /* TODO: annotate */ "selection-chemistry.cpp:2667");
 };
 
 /*
index 6b61beac49b796eb6d804b691b7f7d59ac2208b6..3f40103e7e52f8a746c097be6d66a5b1bebe4204 100644 (file)
@@ -39,6 +39,7 @@
 #include "seltrans.h"
 #include "selection-chemistry.h"
 #include "sp-metrics.h"
+#include "verbs.h"
 #include <glibmm/i18n.h>
 #include "display/sp-ctrlline.h"
 #include "prefs-utils.h"
@@ -222,7 +223,8 @@ void Inkscape::SelTrans::setCenter(NR::Point const &p)
         it->setCenter(p);
         SP_OBJECT(it)->updateRepr();
     }
-    sp_document_maybe_done (sp_desktop_document(_desktop), "center::move");
+    sp_document_maybe_done (sp_desktop_document(_desktop), "center::move", SP_VERB_CONTEXT_SELECT, 
+                            /* TODO: annotate */ "seltrans.cpp:227");
 
     _updateHandles();
 }
@@ -340,7 +342,8 @@ void Inkscape::SelTrans::ungrab()
             }
         }
 
-        sp_document_done(sp_desktop_document(_desktop));
+        sp_document_done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_SELECT,
+                         /* TODO: annotate */ "seltrans.cpp:346");
         updh = false;
     }
 
@@ -436,7 +439,8 @@ void Inkscape::SelTrans::stamp()
             Inkscape::GC::release(copy_repr);
             l = l->next;
         }
-        sp_document_done(sp_desktop_document(_desktop));
+        sp_document_done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_SELECT,
+                         /* TODO: annotate */ "seltrans.cpp:443");
     }
 
     if ( fixup && _stamp_cache ) {
@@ -621,7 +625,8 @@ void Inkscape::SelTrans::handleClick(SPKnot *knot, guint state, SPSelTransHandle
                     _center_is_set = false;  // center has changed
                     _updateHandles();
                 }
-                sp_document_maybe_done (sp_desktop_document(_desktop), "center::unset");
+                sp_document_maybe_done (sp_desktop_document(_desktop), "center::unset", SP_VERB_CONTEXT_SELECT, 
+                                        /* TODO: annotate */ "seltrans.cpp:629");
             }
             break;
         default:
index 3e4568de05ab65febf319b908feaa07986a86189..8a39eb0b4f576fd7ed26d390d56e4f55d411d03b 100644 (file)
@@ -613,7 +613,8 @@ void SPFlowtext::convert_to_text()
     selection->set(new_item);
     item->deleteObject();
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                     /* TODO: annotate */ "sp-flowtext.cpp:617");
 }
 
 SPItem *SPFlowtext::get_frame(SPItem *after)
index a4aa83ad2f569c85d74f4f79ee1209fb7ebaf460..e91349ad901af89d4f230658df3b95ae172554fd 100644 (file)
@@ -444,7 +444,8 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done)
                items = g_slist_remove (items, items->data);
        }
 
-       if (do_done) sp_document_done (doc);
+       if (do_done) sp_document_done (doc, SP_VERB_NONE, 
+                                      /* TODO: annotate */ "sp-item-group.cpp:448");
 }
 
 /*
index 92c338d846db8cfdeb3f979463a6ad7bc2a5e4b4..1dc6bd6cbbd9064e8a89ef8b2cc35a075477452c 100644 (file)
@@ -458,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;
     }
index ed7e341478ecf28af15eccecb4e46043ae75b98b..9083f9b06f98d85d10379c0bdd67ec5a4017e60e 100644 (file)
@@ -405,7 +405,8 @@ sp_selected_path_boolop(bool_op bop)
         {
             SP_OBJECT(l->data)->deleteObject();
         }
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                         /* TODO: annotate */ "splivarot.cpp:409");
         selection->clear();
 
         delete res;
@@ -540,7 +541,18 @@ sp_selected_path_boolop(bool_op bop)
         Inkscape::GC::release(repr);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    unsigned int operation_verb = SP_VERB_NONE;
+    switch(bop) {
+        case bool_op_union   : operation_verb = SP_VERB_SELECTION_UNION;     break;
+        case bool_op_inters  : operation_verb = SP_VERB_SELECTION_INTERSECT; break;
+        case bool_op_diff    : operation_verb = SP_VERB_SELECTION_DIFF;      break;
+        case bool_op_symdiff : operation_verb = SP_VERB_SELECTION_SYMDIFF;   break;
+        case bool_op_cut     : operation_verb = SP_VERB_SELECTION_CUT;       break;
+        case bool_op_slice   : operation_verb = SP_VERB_SELECTION_SLICE;     break;
+    }
+
+    sp_document_done(sp_desktop_document(desktop), operation_verb, 
+                     /* TODO: annotate */ "splivarot.cpp:555");
 
     delete res;
 }
@@ -830,7 +842,8 @@ sp_selected_path_outline()
     }
 
     if (did) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_OUTLINE, 
+                         /* TODO: annotate */ "splivarot.cpp:846");
     } else {
         // TRANSLATORS: "to outline" means "to convert stroke to path"
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No stroked paths</b> to outline in the selection."));
@@ -1034,7 +1047,8 @@ sp_selected_path_create_offset_object(int expand, bool updating)
     {
         // pas vraiment de points sur le resultat
         // donc il ne reste rien
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                         /* TODO: annotate */ "splivarot.cpp:1051");
         selection->clear();
 
         delete res;
@@ -1098,7 +1112,8 @@ sp_selected_path_create_offset_object(int expand, bool updating)
         selection->set(nitem);
     }
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                     /* TODO: annotate */ "splivarot.cpp:1116");
 
     delete res;
     delete orig;
@@ -1340,7 +1355,8 @@ sp_selected_path_do_offset(bool expand, double prefOffset)
     }
 
     if (did) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_NONE, 
+                         /* TODO: annotate */ "splivarot.cpp:1359");
     } else {
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to inset/outset in the selection."));
         return;
@@ -1500,7 +1516,8 @@ sp_selected_path_simplify_selection(float threshold, bool justCoalesce,
 
 
     if (didSomething)
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_SELECTION_SIMPLIFY, 
+                         /* TODO: annotate */ "splivarot.cpp:1520");
     else
         desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No paths</b> to simplify in the selection."));
 
index 603365feb032a6c8a138272fa5668ce06c8b4638..74b252860ee13c083eec82d085e8abb5f9573f9b 100644 (file)
@@ -470,7 +470,8 @@ sp_star_finish (SPStarContext * sc)
         object->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_STAR, 
+                         /* TODO: annotate */ "star-context.cpp:474");
 
         sc->item = NULL;
     }
index 21c74d1a77e238b0c94cb46f60279441fa265975..453ddfc1949f6699101f9590ac32ecfd7a64db02 100644 (file)
@@ -153,7 +153,8 @@ text_put_on_path()
     SP_OBJECT_REPR(text)->setAttribute("x", NULL);
     SP_OBJECT_REPR(text)->setAttribute("y", NULL);
 
-    sp_document_done(sp_desktop_document(desktop));
+    sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, 
+                     /* TODO: annotate */ "text-chemistry.cpp:157");
     g_slist_free(text_reprs);
 }
 
@@ -190,7 +191,8 @@ text_remove_from_path()
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No texts-on-paths</b> in the selection."));
     } else {
         selection->setList(g_slist_copy((GSList *) selection->itemList())); // reselect to update statusbar description
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, 
+                         /* TODO: annotate */ "text-chemistry.cpp:195");
     }
 }
 
@@ -237,7 +239,8 @@ text_remove_all_kerns()
     if (!did) {
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("Select <b>text(s)</b> to remove kerns from."));
     } else {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, 
+                         /* TODO: annotate */ "text-chemistry.cpp:243");
     }
 }
 
@@ -305,7 +308,8 @@ text_flow_into_shape()
 
     SP_OBJECT(text)->deleteObject (true);
 
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_CONTEXT_TEXT,
+                     /* TODO: annotate */ "text-chemistry.cpp:312");
 
     sp_desktop_selection(desktop)->set(SP_ITEM(root_object));
 
@@ -390,7 +394,8 @@ text_unflow ()
     g_slist_free (old_objs);
     g_slist_free (new_objs);
 
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_CONTEXT_TEXT, 
+                     /* TODO: annotate */ "text-chemistry.cpp:398");
 }
 
 
index 945813f1b4574859c559bde8da75ecdbfced50d6..1185e08ef6053fcb593f15bf29d0d328bc2a0d31 100644 (file)
@@ -50,6 +50,7 @@
 #include "rubberband.h"
 #include "sp-metrics.h"
 #include "context-fns.h"
+#include "verbs.h"
 
 #include "text-editing.h"
 
@@ -510,7 +511,8 @@ sp_text_context_setup_text(SPTextContext *tc)
     Inkscape::GC::release(rtext);
     text_item->transform = SP_ITEM(ec->desktop->currentRoot())->getRelativeTransform(ec->desktop->currentLayer());
     text_item->updateRepr();
-    sp_document_done(sp_desktop_document(ec->desktop));
+    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                     /* TODO: annotate */ "text-context.cpp:515");
 }
 
 /**
@@ -548,7 +550,8 @@ insert_uni_char(SPTextContext *const tc)
         tc->text_sel_start = tc->text_sel_end = sp_te_replace(tc->text, tc->text_sel_start, tc->text_sel_end, u);
         sp_text_context_update_cursor(tc);
         sp_text_context_update_text_selection(tc);
-        sp_document_done(sp_desktop_document(tc->desktop));
+        sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_DIALOG_TRANSFORM, 
+                         /* TODO: annotate */ "text-context.cpp:554");
     }
 }
 
@@ -711,7 +714,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                         SPItem *ft = create_flowtext_with_internal_frame (desktop, tc->p0, p1);
                         sp_desktop_selection(desktop)->set(ft);
                         ec->desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Flowed text is created."));
-                        sp_document_done(sp_desktop_document(desktop));
+                        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, 
+                                         /* TODO: annotate */ "text-context.cpp:718");
                     } else {
                         ec->desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("The frame is <b>too small</b> for the current font size. Flowed text not created."));
                     }
@@ -840,7 +844,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                     sp_text_context_update_cursor(tc);
                                     sp_text_context_update_text_selection(tc);
                                     ec->desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("No-break space"));
-                                    sp_document_done(sp_desktop_document(ec->desktop));
+                                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                     /* TODO: annotate */ "text-context.cpp:848");
                                     return TRUE;
                                 }
                                 break;
@@ -876,7 +881,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                         sp_repr_css_set_property(css, "font-weight", "normal");
                                     sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
                                     sp_repr_css_attr_unref(css);
-                                    sp_document_done(sp_desktop_document(ec->desktop));
+                                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                     /* TODO: annotate */ "text-context.cpp:885");
                                     sp_text_context_update_cursor(tc);
                                     sp_text_context_update_text_selection(tc);
                                     return TRUE;
@@ -893,7 +899,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                         sp_repr_css_set_property(css, "font-style", "normal");
                                     sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
                                     sp_repr_css_attr_unref(css);
-                                    sp_document_done(sp_desktop_document(ec->desktop));
+                                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                     /* TODO: annotate */ "text-context.cpp:903");
                                     sp_text_context_update_cursor(tc);
                                     sp_text_context_update_text_selection(tc);
                                     return TRUE;
@@ -924,7 +931,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                 tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
                                 sp_text_context_update_cursor(tc);
                                 sp_text_context_update_text_selection(tc);
-                                sp_document_done(sp_desktop_document(ec->desktop));
+                                sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                 /* TODO: annotate */ "text-context.cpp:935");
                                 return TRUE;
                             case GDK_BackSpace:
                                 if (tc->text) { // if nascent_object, do nothing, but return TRUE; same for all other delete and move keys
@@ -933,7 +941,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                     tc->text_sel_start = tc->text_sel_end = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end);
                                     sp_text_context_update_cursor(tc);
                                     sp_text_context_update_text_selection(tc);
-                                    sp_document_done(sp_desktop_document(ec->desktop));
+                                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                     /* TODO: annotate */ "text-context.cpp:945");
                                 }
                                 return TRUE;
                             case GDK_Delete:
@@ -944,7 +953,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                     tc->text_sel_start = tc->text_sel_end = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end);
                                     sp_text_context_update_cursor(tc);
                                     sp_text_context_update_text_selection(tc);
-                                    sp_document_done(sp_desktop_document(ec->desktop));
+                                    sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                                                     /* TODO: annotate */ "text-context.cpp:957");
                                 }
                                 return TRUE;
                             case GDK_Left:
@@ -958,7 +968,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                             sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, NR::Point(-1, 0));
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:left");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:left", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:972");
                                     } else {
                                         cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorLeftWithControl
                                                                              : &Inkscape::Text::Layout::iterator::cursorLeft;
@@ -977,7 +988,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                             sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, NR::Point(1, 0));
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:right");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:right", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:992");
                                     } else {
                                         cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorRightWithControl
                                                                              : &Inkscape::Text::Layout::iterator::cursorRight;
@@ -996,7 +1008,9 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                             sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, NR::Point(0, -1));
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:up");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:up", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:1012");
+
                                     } else {
                                         cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorUpWithControl
                                                                              : &Inkscape::Text::Layout::iterator::cursorUp;
@@ -1015,7 +1029,9 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                             sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, NR::Point(0, 1));
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:down");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "kern:down", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:1033");
+
                                     } else {
                                         cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorDownWithControl
                                                                              : &Inkscape::Text::Layout::iterator::cursorDown;
@@ -1069,7 +1085,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                         } else {
                                             sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, -90);
                                         }
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "textrot:ccw");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "textrot:ccw", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:1089");
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
                                         return TRUE;
@@ -1089,7 +1106,8 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                         } else {
                                             sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, 90);
                                         }
-                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "textrot:cw");
+                                        sp_document_maybe_done(sp_desktop_document(ec->desktop), "textrot:cw", SP_VERB_CONTEXT_TEXT, 
+                                                               /* TODO: annotate */ "text-context.cpp:1110");
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
                                         return TRUE;
@@ -1105,13 +1123,17 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                                 sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, -10);
                                             else
                                                 sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, -1);
-                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "linespacing:dec");
+                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "linespacing:dec", SP_VERB_CONTEXT_TEXT, 
+                                                                   /* TODO: annotate */ "text-context.cpp:1127");
+
                                         } else {
                                             if (MOD__SHIFT)
                                                 sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, -10);
                                             else
                                                 sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, -1);
-                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "letterspacing:dec");
+                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "letterspacing:dec", SP_VERB_CONTEXT_TEXT, 
+                                                                   /* TODO: annotate */ "text-context.cpp:1135");
+
                                         }
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
@@ -1128,13 +1150,17 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                                 sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, 10);
                                             else
                                                 sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, 1);
-                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "linespacing:inc");
+                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "linespacing:inc", SP_VERB_CONTEXT_TEXT, 
+                                                                   /* TODO: annotate */ "text-context.cpp:1154");
+
                                         } else {
                                             if (MOD__SHIFT)
                                                 sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, 10);
                                             else
                                                 sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, ec->desktop, 1);
-                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "letterspacing:inc");
+                                            sp_document_maybe_done(sp_desktop_document(ec->desktop), "letterspacing:inc", SP_VERB_CONTEXT_TEXT, 
+                                                                   /* TODO: annotate */ "text-context.cpp:1162");
+
                                         }
                                         sp_text_context_update_cursor(tc);
                                         sp_text_context_update_text_selection(tc);
@@ -1236,7 +1262,8 @@ sp_text_paste_inline(SPEventContext *ec)
                 tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
                 begin = end + 1;
             }
-            sp_document_done(sp_desktop_document(ec->desktop));
+            sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT, 
+                             /* TODO: annotate */ "text-context.cpp:1266");
 
             return true;
         }
@@ -1349,7 +1376,8 @@ sp_text_context_style_set(SPCSSAttr const *css, SPTextContext *tc)
         return false;    // will get picked up by the parent and applied to the whole text object
 
     sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
-    sp_document_done(sp_desktop_document(tc->desktop));
+    sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT, 
+                     /* TODO: annotate */ "text-context.cpp:1380");
     sp_text_context_update_cursor(tc);
     sp_text_context_update_text_selection(tc);
 
@@ -1547,7 +1575,8 @@ sptc_commit(GtkIMContext *imc, gchar *string, SPTextContext *tc)
     sp_text_context_update_cursor(tc);
     sp_text_context_update_text_selection(tc);
 
-    sp_document_done(SP_OBJECT_DOCUMENT(tc->text));
+    sp_document_done(SP_OBJECT_DOCUMENT(tc->text), SP_VERB_CONTEXT_TEXT, 
+                     /* TODO: annotate */ "text-context.cpp:1579");
 }
 
 
index ae4191a6d5bcd3056182c0df35877e366fab9b1b..13885eb5bf2082a2c133a7faa897fc8d1941a5fe 100644 (file)
@@ -563,7 +563,8 @@ void Tracer::traceThread()
         }
 
     //## inform the document, so we can undo
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_NONE, 
+                    /* TODO: annotate */ "trace.cpp:567");
 
     engine = NULL;
 
index a86ce2ddc565f4c1a418edd8c64141aa187243f3..c17fd72697e23e590d17156c7f3f6ebeb30637c5 100644 (file)
@@ -168,7 +168,8 @@ sp_item_create_link(GtkMenuItem *menuitem, SPItem *item)
     SP_OBJECT(item)->deleteObject(false);
     repr->addChild(child, NULL);
     child->setAttribute("id", id);
-    sp_document_done(SP_OBJECT_DOCUMENT(object));
+    sp_document_done(SP_OBJECT_DOCUMENT(object), SP_VERB_NONE, 
+                     /* TODO: annotate */ "context-menu.cpp:172");
 
     sp_object_attributes_dialog(object, "SPAnchor");
 
index 4e40b645d8648aec3036a8a23a05c306ebc2a376..4a76a68caed7e5156a8dce3bbea5f718df2dfa2c 100644 (file)
@@ -42,6 +42,9 @@ ui_dialog_libuidialog_a_SOURCES =             \
        ui/dialog/transformation.h              \
        ui/dialog/tree-editor.cpp               \
        ui/dialog/tree-editor.h                 \
+       ui/dialog/undo-history.cpp              \
+       ui/dialog/undo-history.h                \
+       $(inkboard_dialogs)     \
        ui/dialog/xml-editor.cpp                \
        ui/dialog/xml-editor.h                  \
        ui/dialog/aboutbox.cpp          \
index 08e1975867ce860407c6968f66cb76d7c3666ece..a7b2aa991ecdc59b9656700fea347e16757c00dd 100644 (file)
@@ -215,7 +215,8 @@ private :
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
         if (changed) {
-            sp_document_done ( sp_desktop_document (desktop) );
+            sp_document_done ( sp_desktop_document (desktop) , SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+                               /* TODO: annotate */ "align-and-distribute.cpp:219" );
         }
 
 
@@ -374,7 +375,8 @@ private :
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
         if (changed) {
-            sp_document_done ( sp_desktop_document (desktop) );
+            sp_document_done ( sp_desktop_document (desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                               /* TODO: annotate */ "align-and-distribute.cpp:379");
         }
     }
     guint _index;
@@ -484,7 +486,8 @@ private :
         // restore compensation setting
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
-        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP));
+        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                         /* TODO: annotate */ "align-and-distribute.cpp:490");
     }
 };
 
@@ -513,7 +516,8 @@ private :
         // restore compensation setting
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
-        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP));
+        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                         /* TODO: annotate */ "align-and-distribute.cpp:520");
     }
 };
 
@@ -542,7 +546,8 @@ private :
         // restore compensation setting
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
-        sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+        sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                          /* TODO: annotate */ "align-and-distribute.cpp:550");
     }
 };
 
@@ -605,7 +610,8 @@ private :
         // restore compensation setting
         prefs_set_int_attribute("options.clonecompensation", "value", saved_compensation);
 
-        sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+        sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                          /* TODO: annotate */ "align-and-distribute.cpp:614");
     }
 };
 
@@ -717,7 +723,8 @@ private :
         }
 
         if (changed) {
-            sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+            sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_DIALOG_ALIGN_DISTRIBUTE, 
+                              /* TODO: annotate */ "align-and-distribute.cpp:727");
         }
     }
 };
index f4099b0500bb9c46bcfb82faa979a4ec8a370d6b..d685f2e59bab7bd9ad65c9699870feab692db62a 100644 (file)
@@ -32,7 +32,7 @@
 #include "ui/dialog/text-properties.h"
 #include "ui/dialog/tracedialog.h"
 #include "ui/dialog/transformation.h"
-
+#include "ui/dialog/undo-history.h"
 #include "ui/dialog/xml-editor.h"
 
 #include "dialogs/tiledialog.h"
@@ -85,6 +85,7 @@ DialogManager::DialogManager() {
     registerFactory("TileDialog",          &create<TileDialog>);
     registerFactory("Trace",               &create<TraceDialog>);
     registerFactory("Transformation",      &create<Transformation>);
+    registerFactory("UndoHistory",         &create<UndoHistory>);
     registerFactory("XmlEditor",           &create<XmlEditor>);
 }
 
index 97ef5618e56cb0747dc71d70749fff00bf29d883..921d71bb8c5c8063770c1071d1972d1300aa6119 100644 (file)
@@ -182,7 +182,8 @@ SessionPlaybackDialogImpl::_respCallback(int resp)
                        switch (result) {
                                case Gtk::RESPONSE_OK:
                                        this->_sm->clearDocument();
-                                       sp_document_done(sp_desktop_document(this->_desktop));
+                                       sp_document_done(sp_desktop_document(this->_desktop), SP_VERB_NONE, 
+                                                        /* TODO: annotate */ "session-player.cpp:186");
                                        this->_sm->loadSessionFile(sessionfiledlg.get_filename());
                                        this->_openfile.set_text(this->_sfp->filename());
                                        break;
index 8fa2c5dcb0b5c5733ba0b13559a90cf5d82e9264..2cd21a560152b7e556b4e777020f7096761c44f7 100644 (file)
@@ -581,7 +581,8 @@ Transformation::applyPageMove(Inkscape::Selection *selection)
             x - bbox.min()[NR::X], y - bbox.min()[NR::Y]);
     }
 
-    sp_document_done ( sp_desktop_document (selection->desktop()) );
+    sp_document_done ( sp_desktop_document (selection->desktop()) , SP_VERB_DIALOG_TRANSFORM, 
+                       /* TODO: annotate */ "transformation.cpp:585");
 }
 
 void
@@ -632,7 +633,8 @@ Transformation::applyPageScale(Inkscape::Selection *selection)
         sp_selection_scale_relative(selection, center, scale);
     }
 
-    sp_document_done(sp_desktop_document(selection->desktop()));
+    sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, 
+                     /* TODO: annotate */ "transformation.cpp:637");
 }
 
 void
@@ -650,7 +652,8 @@ Transformation::applyPageRotate(Inkscape::Selection *selection)
         sp_selection_rotate_relative(selection, center, angle);
     }
 
-    sp_document_done(sp_desktop_document(selection->desktop()));
+    sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, 
+                     /* TODO: annotate */ "transformation.cpp:656");
 }
 
 void
@@ -702,7 +705,8 @@ Transformation::applyPageSkew(Inkscape::Selection *selection)
         }
     }
 
-    sp_document_done(sp_desktop_document(selection->desktop()));
+    sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, 
+                     /* TODO: annotate */ "transformation.cpp:709");
 }
 
 
@@ -728,7 +732,8 @@ Transformation::applyPageTransform(Inkscape::Selection *selection)
         sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform
     }
 
-    sp_document_done(sp_desktop_document(selection->desktop()));
+    sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, 
+                     /* TODO: annotate */ "transformation.cpp:736");
 }
 
 
index aa8c5d53c588caf79dff64df1db8761731329ee4..c65066c36f3fbcec96a4157af834447274fdf529 100644 (file)
@@ -65,6 +65,12 @@ init()
     icons->add(Stock::VACUUM_DEFS, _vacuum_defs);
 
     // Edit menu
+    //  Undo History
+    Gtk::IconSet _undo_history;
+    src.set_icon_name("UndoHistory");
+    src.set_filename(get_icon_path("undo-history.svg"));
+    _undo_history.add_source(src);
+    icons->add(Stock::UNDO_HISTORY, _undo_history);
     //  Paste In Place
     Gtk::IconSet _paste_in_place;
     src.set_icon_name("PasteInPlace");
index b7dbddcc9dd61c22163a8c5ad699ce10a9006279..7ceb86660e0107bdb5e7122473ca78808202e3bf 100644 (file)
@@ -21,6 +21,7 @@ Gtk::StockID const IMPORT("import");
 Gtk::StockID const EXPORT("export");
 Gtk::StockID const VACUUM_DEFS("vacuum-defs");
 // Edit menu
+Gtk::StockID const UNDO_HISTORY("undo-history");
 Gtk::StockID const PASTE_IN_PLACE("paste-in-place");
 Gtk::StockID const PASTE_STYLE("paste-style");
 Gtk::StockID const DUPLICATE("duplicate");
index d990186cbf2d881cfcd1540d4f80bc36ba96ebc3..069ab66f315abe66b4e12965cd92448af7aafc00 100644 (file)
@@ -24,6 +24,7 @@ extern Gtk::StockID const IMPORT;
 extern Gtk::StockID const EXPORT;
 extern Gtk::StockID const VACUUM_DEFS;
 // Edit menu
+extern Gtk::StockID const UNDO_HISTORY;
 extern Gtk::StockID const PASTE_IN_PLACE;
 extern Gtk::StockID const PASTE_STYLE;
 extern Gtk::StockID const DUPLICATE;
index 55f63b443b586eaad8d6f84217af0f39985fa42f..8eb96b29150c28bf8af3e140a5a22aaf3813f016 100644 (file)
@@ -408,6 +408,10 @@ EditWidget::initMenuActions()
                                       Gtk::Stock::REDO, Glib::ustring(),
                                       _("PLACEHOLDER, do not translate")));
 
+    _act_grp->add(Gtk::Action::create("UndoHistory",
+                                      Stock::UNDO_HISTORY, Glib::ustring(),
+                                      _("PLACEHOLDER, do not translate")));
+
     _act_grp->add(Gtk::Action::create("Cut",
                                       Gtk::Stock::CUT, Glib::ustring(),
                                       _("PLACEHOLDER, do not translate")));
index f79334e317d293d94c87bce0ca409d825ac58177..d5c4899c67624b3a2b8197a6fd3f77fd8db576a5 100644 (file)
@@ -126,7 +126,8 @@ sp_color_picker_color_mod(SPColorSelector *csel, GObject *cp)
     (ptr->_preview).setRgba32 (rgba);
 
     if (ptr->_undo && SP_ACTIVE_DESKTOP)
-        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP));
+        sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_NONE, 
+                         /* TODO: annotate */ "color-picker.cpp:130");
 
     ptr->on_changed (rgba);
     _in_use = false;
index 1b4048ab0a8c8cbbc2403a129ca09ea41ebef18e..6563040dc33c33963775d5a5341db268d3e6a1b2 100644 (file)
@@ -97,7 +97,8 @@ EntityLineEntry::on_changed()
     SPDocument *doc = SP_ACTIVE_DOCUMENT;
     char const *text = reinterpret_cast<Gtk::Entry*>(_packable)->get_text().c_str();
     if (rdf_set_work_entity (doc, _entity, text))
-        sp_document_done (doc);
+        sp_document_done (doc, SP_VERB_NONE, 
+                          /* TODO: annotate */ "entity-entry.cpp:101");
     _wr->setUpdating (false);
 }
 
@@ -141,7 +142,8 @@ EntityMultiLineEntry::on_changed()
     Gtk::TextView *tv = reinterpret_cast<Gtk::TextView*>(s->get_child());
     char const *text = tv->get_buffer()->get_text().c_str();
     if (rdf_set_work_entity (doc, _entity, text))
-        sp_document_done (doc);
+        sp_document_done (doc, SP_VERB_NONE, 
+                          /* TODO: annotate */ "entity-entry.cpp:146");
     _wr->setUpdating (false);
 }
 
index 72c4663e422d237a85cbe0039242db72bc5aba15..50c49e9122da129e902694b9dfae0e92bced8338 100644 (file)
@@ -61,7 +61,8 @@ LicenseItem::on_toggled()
 
     _wr.setUpdating (true);
     rdf_set_license (SP_ACTIVE_DOCUMENT, _lic->details ? _lic : 0);
-    sp_document_done (SP_ACTIVE_DOCUMENT);
+    sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_NONE, 
+                      /* TODO: annotate */ "licensor.cpp:65");
     _wr.setUpdating (false);
     reinterpret_cast<Gtk::Entry*>(_eep->_packable)->set_text (_lic->uri);
     _eep->on_changed();
index b6b8503c48a99b81b915780e3cb4d7955795c034..5882d465118bd9e0bc656a2b881a2c24fca5ef83 100644 (file)
@@ -297,7 +297,8 @@ PageSizer::setDim (double w, double h)
         SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
         sp_document_set_width (doc, w, &_px_unit);
         sp_document_set_height (doc, h, &_px_unit);
-        sp_document_done (doc);
+        sp_document_done (doc, SP_VERB_NONE, 
+                          /* TODO: annotate */ "page-sizer.cpp:301");
     } 
     
     _landscape = w>h;
index 1bfcb1f8465ead4dd15ff062e910e744bcb277c1..4ac73e48476b049e0cef28f45eb9224501858f5c 100644 (file)
@@ -33,6 +33,7 @@
 #include "sp-namedview.h"
 
 #include "registered-widget.h"
+#include "verbs.h"
 
 namespace Inkscape {
 namespace UI {
@@ -98,7 +99,8 @@ RegisteredCheckButton::on_toggled()
     sp_repr_set_boolean(repr, _key.c_str(), _button->get_active());
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive (doc, saved);
-    sp_document_done (doc);
+    sp_document_done (doc, SP_VERB_NONE,
+                      /* TODO: annotate */ "registered-widget.cpp:103");
     
     _wr->setUpdating (false);
 }
@@ -156,7 +158,8 @@ RegisteredUnitMenu::on_changed()
     repr->setAttribute(_key.c_str(), os.str().c_str());
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive (doc, saved);
-    sp_document_done (doc);
+    sp_document_done (doc, SP_VERB_NONE, 
+                      /* TODO: annotate */ "registered-widget.cpp:162");
     
     _wr->setUpdating (false);
 }
@@ -223,7 +226,8 @@ RegisteredScalarUnit::on_value_changed()
     repr->setAttribute(_key.c_str(), os.str().c_str());
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive (doc, saved);
-    sp_document_done (doc);
+    sp_document_done (doc, SP_VERB_NONE, 
+                      /* TODO: annotate */ "registered-widget.cpp:230");
     
     _wr->setUpdating (false);
 }
@@ -333,7 +337,8 @@ RegisteredSuffixedInteger::on_value_changed()
     os << value;
 
     repr->setAttribute(_key.c_str(), os.str().c_str());
-    sp_document_done(sp_desktop_document(dt));
+    sp_document_done(sp_desktop_document(dt), SP_VERB_NONE, 
+                     /* TODO: annotate */ "registered-widget.cpp:341");
     
     _wr->setUpdating (false);
 }
@@ -396,7 +401,8 @@ RegisteredRadioButtonPair::on_value_changed()
     repr->setAttribute(_key.c_str(), second ? "true" : "false");
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive (doc, saved);
-    sp_document_done (doc);
+    sp_document_done (doc, SP_VERB_NONE, 
+                      /* TODO: annotate */ "registered-widget.cpp:405");
     
     _wr->setUpdating (false);
 }
index eab05ca44e5adfbd0bf961bced1bd74de8f7dc75..30a1761bd5f9c6dcb434875f4989fd8f7465d542 100644 (file)
@@ -29,6 +29,7 @@
 #include "desktop-handles.h"
 #include "document.h"
 #include "sp-namedview.h"
+#include "verbs.h"
 
 namespace Inkscape {
 namespace UI {
@@ -152,7 +153,8 @@ Ruler::on_button_release_event(GdkEventButton *evb)
             sp_repr_set_svg_double(repr, "position", guide_pos_dt);
             SP_OBJECT_REPR(_dt->namedview)->appendChild(repr);
             Inkscape::GC::release(repr);
-            sp_document_done(sp_desktop_document(_dt));
+            sp_document_done(sp_desktop_document(_dt), SP_VERB_NONE, 
+                             /* TODO: annotate */ "ruler.cpp:157");
         }
         _dt->set_coordinate_status(event_dt);
     }
index a2e57d6000a315003ab097d31408d0af5e857d30..ad4c7a9cd6908409389570dc8e4ab72f305ff9c0 100644 (file)
@@ -35,6 +35,7 @@
 #include "svg/svg-color.h"
 #include "svg/css-ostringstream.h"
 #include "helper/units.h"
+#include "verbs.h"
 
 static gdouble const _sw_presets[]     = { 32 ,  16 ,  10 ,  8 ,  6 ,  4 ,  3 ,  2 ,  1.5 ,  1 ,  0.75 ,  0.5 ,  0.25 ,  0.1 };
 static gchar* const _sw_presets_str[] = {"32", "16", "10", "8", "6", "4", "3", "2", "1.5", "1", "0.75", "0.5", "0.25", "0.1"};
@@ -425,7 +426,8 @@ void SelectedStyle::dragDataReceived( GtkWidget *widget,
                 sp_repr_css_set_property( css, (tracker->item == SS_FILL) ? "fill":"stroke", c );
                 sp_desktop_set_style( tracker->parent->_desktop, css );
                 sp_repr_css_attr_unref( css );
-                sp_document_done( sp_desktop_document(tracker->parent->_desktop) );
+                sp_document_done( sp_desktop_document(tracker->parent->_desktop) , SP_VERB_NONE, 
+                                  /* TODO: annotate */ "selected-style.cpp:429");
             }
         }
         break;
@@ -437,7 +439,8 @@ void SelectedStyle::on_fill_remove() {
     sp_repr_css_set_property (css, "fill", "none");
     sp_desktop_set_style (_desktop, css, true, true); 
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:442");
 }
 
 void SelectedStyle::on_stroke_remove() {
@@ -445,7 +448,8 @@ void SelectedStyle::on_stroke_remove() {
     sp_repr_css_set_property (css, "stroke", "none");
     sp_desktop_set_style (_desktop, css, true, true); 
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:451");
 }
 
 void SelectedStyle::on_fill_unset() {
@@ -453,7 +457,8 @@ void SelectedStyle::on_fill_unset() {
     sp_repr_css_unset_property (css, "fill");
     sp_desktop_set_style (_desktop, css, true, true); 
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:460");
 }
 
 void SelectedStyle::on_stroke_unset() {
@@ -461,7 +466,8 @@ void SelectedStyle::on_stroke_unset() {
     sp_repr_css_unset_property (css, "stroke");
     sp_desktop_set_style (_desktop, css, true, true);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:469");
 }
 
 void SelectedStyle::on_fill_opaque() {
@@ -469,7 +475,8 @@ void SelectedStyle::on_fill_opaque() {
     sp_repr_css_set_property (css, "fill-opacity", "1");
     sp_desktop_set_style (_desktop, css, true);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:478");
 }
 
 void SelectedStyle::on_stroke_opaque() {
@@ -477,7 +484,8 @@ void SelectedStyle::on_stroke_opaque() {
     sp_repr_css_set_property (css, "stroke-opacity", "1");
     sp_desktop_set_style (_desktop, css, true);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:487");
 }
 
 void SelectedStyle::on_fill_lastused() {
@@ -488,7 +496,8 @@ void SelectedStyle::on_fill_lastused() {
     sp_repr_css_set_property (css, "fill", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:499");
 }
 
 void SelectedStyle::on_stroke_lastused() {
@@ -499,7 +508,8 @@ void SelectedStyle::on_stroke_lastused() {
     sp_repr_css_set_property (css, "stroke", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:511");
 }
 
 void SelectedStyle::on_fill_lastselected() {
@@ -509,7 +519,8 @@ void SelectedStyle::on_fill_lastselected() {
     sp_repr_css_set_property (css, "fill", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:522");
 }
 
 void SelectedStyle::on_stroke_lastselected() {
@@ -519,7 +530,8 @@ void SelectedStyle::on_stroke_lastselected() {
     sp_repr_css_set_property (css, "stroke", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:533");
 }
 
 void SelectedStyle::on_fill_invert() {
@@ -538,7 +550,8 @@ void SelectedStyle::on_fill_invert() {
     sp_repr_css_set_property (css, "fill", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:553");
 }
 
 void SelectedStyle::on_stroke_invert() {
@@ -557,7 +570,8 @@ void SelectedStyle::on_stroke_invert() {
     sp_repr_css_set_property (css, "stroke", c);
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:573");
 } 
 
 void SelectedStyle::on_fill_white() {
@@ -568,7 +582,8 @@ void SelectedStyle::on_fill_white() {
     sp_repr_css_set_property (css, "fill-opacity", "1");
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                      /* TODO: annotate */ "selected-style.cpp:585");
 }
 
 void SelectedStyle::on_stroke_white() {
@@ -579,7 +594,8 @@ void SelectedStyle::on_stroke_white() {
     sp_repr_css_set_property (css, "stroke-opacity", "1");
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:597");
 }
 
 void SelectedStyle::on_fill_black() {
@@ -590,7 +606,8 @@ void SelectedStyle::on_fill_black() {
     sp_repr_css_set_property (css, "fill-opacity", "1.0");
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:609");
 }
 
 void SelectedStyle::on_stroke_black() {
@@ -601,7 +618,8 @@ void SelectedStyle::on_stroke_black() {
     sp_repr_css_set_property (css, "stroke-opacity", "1.0");
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:621");
 }
 
 void SelectedStyle::on_fill_copy() {
@@ -643,7 +661,8 @@ void SelectedStyle::on_fill_paste() {
         sp_repr_css_set_property (css, "fill", text.c_str());
         sp_desktop_set_style (_desktop, css);
         sp_repr_css_attr_unref (css);
-        sp_document_done (sp_desktop_document(_desktop));
+        sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                          /* TODO: annotate */ "selected-style.cpp:664");
     }
 }
 
@@ -660,7 +679,8 @@ void SelectedStyle::on_stroke_paste() {
         sp_repr_css_set_property (css, "stroke", text.c_str());
         sp_desktop_set_style (_desktop, css);
         sp_repr_css_attr_unref (css);
-        sp_document_done (sp_desktop_document(_desktop));
+        sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                          /* TODO: annotate */ "selected-style.cpp:682");
     }
 }
 
@@ -715,7 +735,8 @@ void SelectedStyle::on_fillstroke_swap() {
 
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE, 
+                      /* TODO: annotate */ "selected-style.cpp:738");
 }
 
 void SelectedStyle::on_fill_edit() {
@@ -782,7 +803,8 @@ SelectedStyle::on_opacity_click(GdkEventButton *event)
         sp_repr_css_set_property (css, "opacity", opacity);
         sp_desktop_set_style (_desktop, css);
         sp_repr_css_attr_unref (css);
-        sp_document_done (sp_desktop_document (_desktop));
+        sp_document_done (sp_desktop_document (_desktop), SP_VERB_DIALOG_FILL_STROKE,
+                          /* TODO: annotate */ "selected-style.cpp:806");
         return true;
     }
 
@@ -815,7 +837,8 @@ void SelectedStyle::on_popup_preset(int i) {
     sp_repr_css_set_property (css, "stroke-width", os.str().c_str());
     sp_desktop_set_style (_desktop, css, true);
     sp_repr_css_attr_unref (css);
-    sp_document_done (sp_desktop_document(_desktop));
+    sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_SWATCHES,
+                      /* TODO: annotate */ "selected-style.cpp:840");
 }
 
 void
@@ -1055,7 +1078,8 @@ void SelectedStyle::on_opacity_changed () {
     sp_repr_css_set_property (css, "opacity", os.str().c_str());
     sp_desktop_set_style (_desktop, css);
     sp_repr_css_attr_unref (css);
-    sp_document_maybe_done (sp_desktop_document (_desktop), "fillstroke:opacity");
+    sp_document_maybe_done (sp_desktop_document (_desktop), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
+                            /* TODO: annotate */ "selected-style.cpp:1082");
     spinbutton_defocus(GTK_OBJECT(_opacity_sb.gobj()));
     _opacity_blocked = false;
 }
index 654936814ec61f824e465b7ee7652a993c49c023..b7839284a02b8baf7568080f0246c442c9b66e10 100644 (file)
@@ -169,7 +169,8 @@ ToleranceSlider::update (double val)
     repr->setAttribute(_key.c_str(), os.str().c_str());
     doc->rroot->setAttribute("sodipodi:modified", "true");
     sp_document_set_undo_sensitive (doc, saved);
-    sp_document_done (doc);
+    sp_document_done (doc, SP_VERB_NONE,
+                      /* TODO: annotate */ "tolerance-slider.cpp:173");
     
     _wr->setUpdating (false);
 }
index f9e3d9dd04bb6de0f0ac4c7146289046d7668f4c..cd17c467575ca2415c89d0fb8d5db2b78658c3fc 100644 (file)
 
 namespace Inkscape {
 
-namespace XML {
-
 class Event;
 
-}
-
 /**
  * Observes changes made to the undo and redo stacks.
  *
@@ -44,23 +40,23 @@ public:
        /**
         * Triggered when the user issues an undo command.
         *
-        * \param log Pointer to an XML::Event describing the undone event.
+        * \param log Pointer to an Event describing the undone event.
         */
-       virtual void notifyUndoEvent(XML::Event* log) = 0;
+       virtual void notifyUndoEvent(Event* log) = 0;
 
        /**
         * Triggered when the user issues a redo command.
         *
-        * \param log Pointer to an XML::Event describing the redone event.
+        * \param log Pointer to an Event describing the redone event.
         */
-       virtual void notifyRedoEvent(XML::Event* log) = 0;
+       virtual void notifyRedoEvent(Event* log) = 0;
 
        /**
         * Triggered when a set of transactions is committed to the undo log.
         *
-        * \param log Pointer to an XML::Event describing the committed events.
+        * \param log Pointer to an Event describing the committed events.
         */
-       virtual void notifyUndoCommitEvent(XML::Event* log) = 0;
+       virtual void notifyUndoCommitEvent(Event* log) = 0;
 };
 
 }
index 5649d08956942ed724d7b04113b5cd40163f7a09..6c529cfcb2c922d71c44716f9bf2e997ec02270f 100644 (file)
@@ -1073,7 +1073,8 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata)
             SPObject *next=Inkscape::next_layer(dt->currentRoot(), dt->currentLayer());
             if (next) {
                 dt->setCurrentLayer(next);
-                sp_document_done(sp_desktop_document(dt));
+                sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_NEXT, 
+                                 /* TODO: annotate */ "verbs.cpp:1077");
                 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Moved to next layer."));
             } else {
                 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move past last layer."));
@@ -1084,7 +1085,8 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata)
             SPObject *prev=Inkscape::previous_layer(dt->currentRoot(), dt->currentLayer());
             if (prev) {
                 dt->setCurrentLayer(prev);
-                sp_document_done(sp_desktop_document(dt));
+                sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_PREV, 
+                                 /* TODO: annotate */ "verbs.cpp:1089");
                 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Moved to previous layer."));
             } else {
                 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move past first layer."));
@@ -1140,7 +1142,8 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata)
                         message = g_strdup_printf(_("Lowered layer <b>%s</b>."), layer->defaultLabel());
                         break;
                 };
-                sp_document_done(sp_desktop_document(dt));
+                sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_LOWER, 
+                                 /* TODO: annotate */ "verbs.cpp:1146");
                 if (message) {
                     dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, message);
                     g_free((void *) message);
@@ -1173,7 +1176,8 @@ LayerVerb::perform(SPAction *action, void *data, void *pdata)
                     dt->setCurrentLayer(survivor);
                 }
 
-                sp_document_done(sp_desktop_document(dt));
+                sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_DELETE, 
+                                 /* TODO: annotate */ "verbs.cpp:1180");
 
                 // TRANSLATORS: this means "The layer has been deleted."
                 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Deleted layer."));
@@ -1232,7 +1236,8 @@ ObjectVerb::perform( SPAction *action, void *data, void *pdata )
             } else {
                 sp_selection_scale_relative(sel, center, NR::scale(-1.0, 1.0));
             }
-            sp_document_done(sp_desktop_document(dt));
+            sp_document_done(sp_desktop_document(dt), SP_VERB_OBJECT_FLIP_HORIZONTAL,
+                             /* TODO: annotate */ "verbs.cpp:1240");
             break;
         case SP_VERB_OBJECT_FLIP_VERTICAL:
             if (tools_isactive(dt, TOOLS_NODES)) {
@@ -1240,7 +1245,8 @@ ObjectVerb::perform( SPAction *action, void *data, void *pdata )
             } else {
                 sp_selection_scale_relative(sel, center, NR::scale(1.0, -1.0));
             }
-            sp_document_done(sp_desktop_document(dt));
+            sp_document_done(sp_desktop_document(dt), SP_VERB_OBJECT_FLIP_VERTICAL,
+                             /* TODO: annotate */ "verbs.cpp:1249");
             break;
         case SP_VERB_OBJECT_SET_MASK:
             sp_selection_set_mask(false, false);
@@ -1562,6 +1568,9 @@ DialogVerb::perform(SPAction *action, void *data, void *pdata)
         case SP_VERB_DIALOG_SCRIPT:
             dt->_dlg_mgr->showDialog("Script");
             break;
+        case SP_VERB_DIALOG_UNDO_HISTORY:
+            dt->_dlg_mgr->showDialog("UndoHistory");
+            break;
         case SP_VERB_DIALOG_TOGGLE:
             inkscape_dialogs_toggle();
             break;
@@ -2242,6 +2251,8 @@ Verb *Verb::_base_verbs[] = {
                    N_("Precisely control objects' transformations"), "object_trans"),
     new DialogVerb(SP_VERB_DIALOG_ALIGN_DISTRIBUTE, "DialogAlignDistribute", N_("_Align and Distribute..."),
                    N_("Align and distribute objects"), "object_align"),
+    new DialogVerb(SP_VERB_DIALOG_UNDO_HISTORY, "DialogUndoHistory", N_("Undo _History..."),
+                   N_("Undo History"), "edit_undo_history"),
     new DialogVerb(SP_VERB_DIALOG_TEXT, "DialogText", N_("_Text and Font..."),
                    N_("View and select font family, font size and other text properties"), "object_font"),
     new DialogVerb(SP_VERB_DIALOG_XML_EDITOR, "DialogXMLEditor", N_("_XML Editor..."),
index 37f6f424bccaf0287ef46d03bf36b6372f5712e5..8474203f63ec3c9d43deca58f282f1fdbde2e00c 100644 (file)
@@ -187,6 +187,7 @@ enum {
     SP_VERB_DIALOG_SWATCHES,
     SP_VERB_DIALOG_TRANSFORM,
     SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+    SP_VERB_DIALOG_UNDO_HISTORY,
     SP_VERB_DIALOG_TEXT,
     SP_VERB_DIALOG_XML_EDITOR,
     SP_VERB_DIALOG_FIND,
@@ -307,6 +308,8 @@ public:
     gchar const * get_id (void) { return _id; }
     /** \brief Accessor to get the internal variable. */
     gchar const * get_name (void) { return _name; }
+    /** \brief Accessor to get the internal variable. */
+    gchar const * get_image (void) { return _image; }
 
     /** \brief Set the name after initialization. */
     gchar const * set_name (gchar const * name) { _name = name; return _name; }
index 2ba59b10c611355c8b0db8c1e016527400cc60cd..da84eafca659ad5161ed310e53588293adcbd6c4 100644 (file)
@@ -142,7 +142,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_document_done (sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
+                      /* TODO: annotate */ "gradient-toolbar.cpp:146");
 }
 
 gchar *
@@ -414,7 +415,8 @@ gr_fork (GtkWidget *button, GtkWidget *widget)
             SPGradient *gr_new = sp_gradient_fork_vector_if_necessary (gr);
             if (gr_new != gr) {
                 gr_apply_gradient (selection, ev? ev->get_drag() : NULL, gr_new);
-                sp_document_done (document);
+                sp_document_done (document, SP_VERB_CONTEXT_GRADIENT,
+                                  /* TODO: annotate */ "gradient-toolbar.cpp:419");
             }
         }
     }
index 5befb11d03c774ddaf16e2885324b212fce1fba2..be1adcfe03d5f8c204c66a1ca6a9a8c89a09c733 100644 (file)
@@ -346,7 +346,8 @@ sp_gvs_gradient_activate (GtkMenuItem *mi, SPGradientVectorSelector *gvs)
        if (norm != gr) {
                /* We do extra undo push here */
                /* If handler has already done it, it is just NOP */
-               sp_document_done (SP_OBJECT_DOCUMENT (norm));
+           sp_document_done (SP_OBJECT_DOCUMENT (norm), SP_VERB_CONTEXT_GRADIENT,
+                             /* TODO: annotate */ "gradient-vector.cpp:350");
        }
 }
 
@@ -637,7 +638,8 @@ offadjustmentChanged( GtkAdjustment *adjustment, GtkWidget *vb)
     stop->offset = adjustment->value;
     sp_repr_set_css_double(SP_OBJECT_REPR(stop), "offset", stop->offset);
 
-    sp_document_done (SP_OBJECT_DOCUMENT (stop));
+    sp_document_done (SP_OBJECT_DOCUMENT (stop), SP_VERB_CONTEXT_GRADIENT,
+                     /* TODO: annotate */ "gradient-vector.cpp:642");
 
        blocked = FALSE;
 }
@@ -709,7 +711,8 @@ sp_grd_ed_add_stop (GtkWidget *widget,  GtkWidget *vb)
        GtkWidget *offslide =GTK_WIDGET (g_object_get_data (G_OBJECT (vb), "offslide"));
        gtk_widget_set_sensitive (offslide, TRUE);
        gtk_widget_set_sensitive (GTK_WIDGET (offspin), TRUE);
-       sp_document_done (SP_OBJECT_DOCUMENT (gradient));
+       sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT, 
+                         /* TODO: annotate */ "gradient-vector.cpp:715");
 }
 
 static void
@@ -740,7 +743,8 @@ sp_grd_ed_del_stop (GtkWidget *widget,  GtkWidget *vb)
                SP_OBJECT_REPR(gradient)->removeChild(SP_OBJECT_REPR(stop));
                sp_gradient_vector_widget_load_gradient (vb, gradient);
                update_stop_list(GTK_WIDGET(mnu), gradient, NULL);
-               sp_document_done (SP_OBJECT_DOCUMENT (gradient));
+               sp_document_done (SP_OBJECT_DOCUMENT (gradient), SP_VERB_CONTEXT_GRADIENT, 
+                                 /* TODO: annotate */ "gradient-vector.cpp:747");
        }
 
 }
@@ -1116,7 +1120,8 @@ sp_gradient_vector_color_changed (SPColorSelector *csel, GtkObject *object)
                //      g_snprintf (c, 256, "stop-color:#%06x;stop-opacity:%g;", rgb >> 8, (gdouble) alpha);
                //SP_OBJECT_REPR (stop)->setAttribute("style", c);
 
-       sp_document_done (SP_OBJECT_DOCUMENT (ngr));
+       sp_document_done (SP_OBJECT_DOCUMENT (ngr), SP_VERB_CONTEXT_GRADIENT,
+                         /* TODO: annotate */ "gradient-vector.cpp:1124");
 
        blocked = FALSE;
 }
index 94a891dc24106c7eca22eb889a977a9ae858d85c..3b732c90d1e69903263ecbe7801e4ceefc5a834e 100644 (file)
@@ -30,6 +30,7 @@
 #include "dialogs/layer-properties.h"
 #include "layer-manager.h"
 #include "xml/node-event-vector.h"
+#include "verbs.h"
 
 namespace Inkscape {
 namespace Widgets {
@@ -577,14 +578,16 @@ void LayerSelector::_prepareLabelRenderer(
 void LayerSelector::_lockLayer(bool lock) {
     if ( _layer && SP_IS_ITEM(_layer) ) {
         SP_ITEM(_layer)->setLocked(lock);
-        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:lock");
+        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:lock", SP_VERB_NONE, 
+                               /* TODO: annotate */ "layer-selector.cpp:582");
     }
 }
 
 void LayerSelector::_hideLayer(bool hide) {
     if ( _layer && SP_IS_ITEM(_layer) ) {
         SP_ITEM(_layer)->setHidden(hide);
-        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:hide");
+        sp_document_maybe_done(sp_desktop_document(_desktop), "LayerSelector:hide", SP_VERB_NONE, 
+                               /* TODO: annotate */ "layer-selector.cpp:590");
     }
 }
 
index 6bcb24d2d34459934725b73d8dd41630a6266c4a..2f42d590fd3e96ddd923ca0b37dfa475d7e9fb46 100644 (file)
@@ -219,7 +219,8 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
         NR::Matrix scaler = get_scale_transform_with_stroke (bbox, strokewidth, transform_stroke, x0, y0, x1, y1);
 
         sp_selection_apply_affine(selection, scaler);
-        sp_document_maybe_done (document, actionkey);
+        sp_document_maybe_done (document, actionkey, SP_VERB_CONTEXT_SELECT, 
+                                /* TODO: annotate */ "select-toolbar.cpp:223");
 
         // defocus spinbuttons by moving focus to the canvas, unless "stay" is on
         spinbutton_defocus(GTK_OBJECT(spw));
index ffec0b7232016e66be076b605d514ba257c2b024..7961a45117a05c9928e72e3a9fe2ab8147ef65a6 100644 (file)
@@ -160,6 +160,7 @@ sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text)
                text->repr->setContent(data);
                g_free (data);
                text->blocked = FALSE;
-               sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+               sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_NONE, 
+                                 /* TODO: annotate */ "sp-xmlview-content.cpp:164");
        }
 }
index c8e484e3b75fff912897430a90a21efd4e061b22..7ff4f115e2e00d4ef5732fdb84f0442d1d822c7f 100644 (file)
@@ -850,7 +850,8 @@ sp_stb_magnitude_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
             modmade = true;
         }
     }
-    if (modmade)  sp_document_done(sp_desktop_document(desktop));
+    if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
+                                   /* TODO: annotate */ "toolbox.cpp:854");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -894,7 +895,8 @@ sp_stb_proportion_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
         }
     }
 
-    if (modmade) sp_document_done(sp_desktop_document(desktop));
+    if (modmade) sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
+                                  /* TODO: annotate */ "toolbox.cpp:899");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -947,7 +949,8 @@ sp_stb_sides_flat_state_changed(GtkWidget *widget, GtkObject *tbl)
             }
         }
     }
-    if (modmade) sp_document_done(sp_desktop_document(desktop));
+    if (modmade) sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
+                                  /* TODO: annotate */ "toolbox.cpp:953");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -983,7 +986,8 @@ sp_stb_rounded_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
             modmade = true;
         }
     }
-    if (modmade)  sp_document_done(sp_desktop_document(desktop));
+    if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
+                                   /* TODO: annotate */ "toolbox.cpp:990");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -1020,7 +1024,8 @@ sp_stb_randomized_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
             modmade = true;
         }
     }
-    if (modmade)  sp_document_done(sp_desktop_document(desktop));
+    if (modmade)  sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, 
+                                   /* TODO: annotate */ "toolbox.cpp:1028");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
 
@@ -1359,7 +1364,8 @@ sp_rtb_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const *value_name
     sp_rtb_sensitivize (tbl);
 
     if (modmade) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_RECT, 
+                         /* TODO: annotate */ "toolbox.cpp:1368");
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -1675,7 +1681,8 @@ sp_spl_tb_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const *value_n
     g_free(namespaced_name);
 
     if (modmade) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL, 
+                         /* TODO: annotate */ "toolbox.cpp:1685");
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -2236,7 +2243,8 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GtkWidget *tbl, gchar const
     sp_arctb_sensitivize (tbl, adj->value, other->value);
 
     if (modmade) {
-        sp_document_maybe_done(sp_desktop_document(desktop), value_name);
+        sp_document_maybe_done(sp_desktop_document(desktop), value_name, SP_VERB_CONTEXT_ARC, 
+                               /* TODO: annotate */ "toolbox.cpp:2247");
     }
 
     // defocus spinbuttons by moving focus to the canvas, unless "stay" is on
@@ -2308,7 +2316,8 @@ sp_arctb_open_state_changed(GtkWidget *widget, GtkObject *tbl)
     }
 
     if (modmade) {
-        sp_document_done(sp_desktop_document(desktop));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ARC, 
+                         /* TODO: annotate */ "toolbox.cpp:2320");
     }
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));
@@ -3011,7 +3020,8 @@ sp_text_toolbox_family_changed (GtkTreeSelection    *selection,
         sp_desktop_set_style (desktop, css, true, true);
     }
 
-    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
+                      /* TODO: annotate */ "toolbox.cpp:3024");
     sp_repr_css_attr_unref (css);
     free (family);
     gtk_widget_hide (GTK_WIDGET (g_object_get_data (G_OBJECT(tbl), "warning-image")));        
@@ -3093,7 +3103,8 @@ sp_text_toolbox_anchoring_toggled (GtkRadioButton   *button,
     }
 
     sp_desktop_set_style (desktop, css, true, true);
-    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
+                      /* TODO: annotate */ "toolbox.cpp:3107");
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3138,7 +3149,8 @@ sp_text_toolbox_style_toggled (GtkToggleButton  *button,
     }
 
     sp_desktop_set_style (desktop, css, true, true);
-    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
+                      /* TODO: annotate */ "toolbox.cpp:3153");
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3184,7 +3196,8 @@ sp_text_toolbox_orientation_toggled (GtkRadioButton  *button,
     }
 
     sp_desktop_set_style (desktop, css, true, true);
-    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP));
+    sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, 
+                      /* TODO: annotate */ "toolbox.cpp:3200");
     sp_repr_css_attr_unref (css);
 
     gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
@@ -3279,7 +3292,8 @@ sp_text_toolbox_size_changed  (GtkComboBox *cbox,
     }
 
     sp_desktop_set_style (desktop, css, true, true);
-    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:size");
+    sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:size", SP_VERB_NONE, 
+                            /* TODO: annotate */ "toolbox.cpp:3296");
     sp_repr_css_attr_unref (css);
 
 
@@ -3833,7 +3847,8 @@ static void connector_spacing_changed(GtkAdjustment *adj, GtkWidget *tbl)
         g_slist_free(items);
     }
     
-    sp_document_done(doc);
+    sp_document_done(doc, SP_VERB_CONTEXT_CONNECTOR, 
+                     /* TODO: annotate */ "toolbox.cpp:3851");
 
     g_object_set_data(G_OBJECT(tbl), "freeze", GINT_TO_POINTER(FALSE));