summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96748c2)
raw | patch | inline | side by side (parent: 96748c2)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 29 Jun 2006 20:15:48 +0000 (20:15 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 29 Jun 2006 20:15:48 +0000 (20:15 +0000) |
80 files changed:
diff --git a/share/icons/icons.svg b/share/icons/icons.svg
index e294bdc932cd92d6cb5c727a52549ee01902fc11..20e4026e28484d080c02290865ffc00efc033d40 100644 (file)
--- a/share/icons/icons.svg
+++ b/share/icons/icons.svg
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"
</g>
<g
id="edit_duplicate"
- transform="translate(50.0399,-139.9404)">
+ transform="translate(50.0399,-119.9404)">
<g
id="g6144">
<rect
height="1250" />
</g>
<g
- transform="translate(-298.3567,-167.1852)"
+ transform="translate(-298.3567,-147.1852)"
id="edit_clone">
<g
id="use6150"
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)"
<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 "
</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"
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
<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">
<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"
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>
diff --git a/share/keys/default.xml b/share/keys/default.xml
index 497acf43fe38ebf6b30a8e3235bff031c31a64a1..ba5c855622588494f972331950a1c266fecc1ac2 100644 (file)
--- a/share/keys/default.xml
+++ b/share/keys/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)
--- a/share/keys/inkscape.xml
+++ b/share/keys/inkscape.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)
--- a/share/ui/menus-bars.xml
+++ b/share/ui/menus-bars.xml
<menu action='MenuEdit'>
<menuitem action='Undo'/>
<menuitem action='Redo'/>
+ <menuitem action='UndoHistory'/>
<separator/>
<menuitem action='Cut'/>
<menuitem action='Copy'/>
diff --git a/src/Makefile_insert b/src/Makefile_insert
index c3182f3cc1115309ddb096514a8b7bd12e251891..4b797f233727eaa4d828b7f1ef7a5d432b8fb049 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
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 \
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index 830f4c5119810bd0c78a80e60bd6893bae115716..8151445b37b563c4385044bbcdebe684f245a4fb 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
#include "desktop.h"
#include "desktop-style.h"
#include "context-fns.h"
+#include "verbs.h"
#include "arc-context.h"
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)
}
void
-CompositeUndoStackObserver::notifyUndoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyUndoEvent(Event* log)
{
this->_lock();
for(UndoObserverRecordList::iterator i = this->_active.begin(); i != _active.end(); ++i) {
}
void
-CompositeUndoStackObserver::notifyRedoEvent(XML::Event* log)
+CompositeUndoStackObserver::notifyRedoEvent(Event* log)
{
this->_lock();
}
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.
*
* \param log The event log generated by the redo event.
*/
- void issueRedo(XML::Event* log)
+ void issueRedo(Event* log)
{
this->_observer.notifyRedoEvent(log);
}
*
* \param log The event log generated by the undo event.
*/
- void issueUndo(XML::Event* log)
+ void issueUndo(Event* log)
{
this->_observer.notifyUndoEvent(log);
}
*
* \param log The event log being committed to the undo stack.
*/
- void issueUndoCommit(XML::Event* log)
+ void issueUndoCommit(Event* log)
{
this->_observer.notifyUndoCommitEvent(log);
}
*
* \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;
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);
}
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
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index a2dc1a492bfcef863b2180273d25237db3ebfaa6..5531abfefbe7c51562325ddcceb38b8be5e2491b 100644 (file)
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -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);
}
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)
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
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
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)
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";
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;
}
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;
}
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)
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;
} // end if
- sp_document_done (document);
+ sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE,
+ /* TODO: annotate */ "fill-style.cpp:514");
} // end if
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)
? 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()
{
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)
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));
}
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));
}
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 */
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 */
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)
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();
}
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)
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;
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;
}
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)
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)
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) {
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)
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;
}
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;
}
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)
}
}
- sp_document_done(document);
+ sp_document_done(document, SP_VERB_DIALOG_FILL_STROKE,
+ /* TODO: annotate */ "stroke-style.cpp:372");
}
break;
} // end if
- sp_document_done (document);
+ sp_document_done (document, SP_VERB_DIALOG_FILL_STROKE,
+ /* TODO: annotate */ "stroke-style.cpp:416");
} // end if
break;
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;
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 *,
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));
}
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)
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
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");
}
}
}
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)
}
// 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)
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)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
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);
}
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);
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);
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");
}
updated->updateRepr();
}
- sp_document_done(current_document);
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ /* TODO: annotate */ "xml-tree.cpp:1441");
}
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),
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);
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);
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);
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);
diff --git a/src/document-private.h b/src/document-private.h
index 549a4530f49985a752cc6a69f33ac18987afb3da..18d35f446a7f3d7ac5592d0ffb1b1d2521ec9633 100644 (file)
--- a/src/document-private.h
+++ b/src/document-private.h
#include "composite-undo-stack-observer.h"
+#include "event-log.h"
+
// XXX only for testing!
#include "console-output-undo-observer.h"
/* Undo listener */
Inkscape::CompositeUndoStackObserver undoStackObservers;
+ /* Event log */
+ Inkscape::EventLog event_log;
+
// XXX only for testing!
Inkscape::ConsoleOutputUndoObserver console_output_undo_observer;
};
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index f37a3fcafb9450b14de2bac28075782bbfe048b6..35b35c88830baa97421d6a3cc66e445328dda681 100644 (file)
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
* 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
#include "inkscape.h"
#include "debug/event-tracker.h"
#include "debug/simple-event.h"
+#include "event.h"
/*
}
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);
}
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;
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 {
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");
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);
}
}
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);
}
}
diff --git a/src/document.cpp b/src/document.cpp
index cf03f4188391a87adb218d3c5744c6b5736f6eff..a6b6e4e45ecb5827ac24ec941ae3ce47cc3113d3 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
p->undo = NULL;
p->redo = NULL;
+ p->undoStackObservers.add(p->event_log);
+
priv = p;
// XXX only for testing!
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);
diff --git a/src/document.h b/src/document.h
index 9739b69719baca6dbc9a4c38e76c87387b1e67cc..f7ce73fe8d2e629ab0cd1aaa611b80e7fa084b33 100644 (file)
--- a/src/document.h
+++ b/src/document.h
#include "gc-finalized.h"
#include "gc-anchored.h"
#include <glibmm/ustring.h>
+#include "verbs.h"
namespace Avoid {
class Router;
struct Application;
class Selection;
class UndoStackObserver;
+ class EventLog;
namespace XML {
class Document;
class Node;
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
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 */
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 6bea0851b8d465ae9aad488edc4aae69d9aebef4..bb1f56044b0813eddb55a8d905093128f5623d0a 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
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)
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -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)
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)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
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;
}
diff --git a/src/file.cpp b/src/file.cpp
index 679c28801c5a6a40a5e8f2ce918e7a9012bd28d6..0ad55e2aca7382d05170e8da06891effdf5be3f7 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
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)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -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;
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 008397e8922afc25377f16e04e0dc54e57f57eb9..e4c7a62da43d49bab0378ca3eb30dfe455165952 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -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;
}
}
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");
}
/**
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
diff --git a/src/interface.cpp b/src/interface.cpp
index 2f4a4d033b4693e60931aa9f8bc305658bd8a55a..91a26226fe6a8108521217e74aba69dab53dc309 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
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 );
item->updateRepr();
SPDocument *doc = SP_ACTIVE_DOCUMENT;
- sp_document_done( doc );
+ sp_document_done( doc , SP_VERB_NONE,
+ /* TODO: annotate */ "interface.cpp:1089");
}
}
}
}
Inkscape::GC::release(newgroup);
- sp_document_done(doc);
+ sp_document_done(doc, SP_VERB_NONE,
+ /* TODO: annotate */ "interface.cpp:1143");
break;
}
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;
}
}
diff --git a/src/knotholder.cpp b/src/knotholder.cpp
index ff6a819702bfc8711c75142637c48fac03565156..7b30a2814d2009bc73cefed07b68a5cab6e3bd95 100644 (file)
--- a/src/knotholder.cpp
+++ b/src/knotholder.cpp
#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;
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");
}
}
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 66d1acb897e1a3fc6b852b47b5566dc22fd34cbe..b3709c9d49eece818239cadc1d0c58795ac3825d 100644 (file)
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
" <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"
" <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"
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index f9f6f169132f4205cb5eff0fb7f52b61ff2acbe8..455a0e7d8c67c2468148f847381592c9c6131993 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
#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>
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;
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;
// 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);
//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);
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;
}
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index ba181476f8add21aa3660c6c1ceb04888de58410..61e61bee3431aa87fb5f94b12f4e3a5bf36191a0 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
// 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);
}
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;
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;
}
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)
" <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"
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index ffd57c415d985a4c118bfee730b35365b4e32b93..7e1b76e2c8bd9565b251466815f4648626e09d41 100644 (file)
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
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)
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;
}
*/
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 */
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);
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 *
// 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);
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 *
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()
g_slist_free(rl);
- sp_document_done(document);
+ sp_document_done(document, SP_VERB_SELECTION_TO_FRONT,
+ /* TODO: annotate */ "selection-chemistry.cpp:709");
}
void
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");
}
g_slist_free(rl);
- sp_document_done(document);
+ sp_document_done(document, SP_VERB_SELECTION_TO_BACK,
+ /* TODO: annotate */ "selection-chemistry.cpp:815");
}
void
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()
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)
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)
}
- 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 ()
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;
}
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;
}
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
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");
}
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");
}
/**
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
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
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
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");
}
}
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");
}
}
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);
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
g_slist_free (items);
- sp_document_done (document);
+ sp_document_done (document, SP_VERB_EDIT_TILE,
+ /* TODO: annotate */ "selection-chemistry.cpp:2194");
}
void
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);
}
}
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);
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) {
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) {
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");
};
/*
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 6b61beac49b796eb6d804b691b7f7d59ac2208b6..3f40103e7e52f8a746c097be6d66a5b1bebe4204 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
#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"
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();
}
}
}
- 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;
}
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:
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 3e4568de05ab65febf319b908feaa07986a86189..8a39eb0b4f576fd7ed26d390d56e4f55d411d03b 100644 (file)
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
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)
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index a4aa83ad2f569c85d74f4f79ee1209fb7ebaf460..e91349ad901af89d4f230658df3b95ae172554fd 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
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");
}
/*
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 92c338d846db8cfdeb3f979463a6ad7bc2a5e4b4..1dc6bd6cbbd9064e8a89ef8b2cc35a075477452c 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
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;
}
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index ed7e341478ecf28af15eccecb4e46043ae75b98b..9083f9b06f98d85d10379c0bdd67ec5a4017e60e 100644 (file)
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
{
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;
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;
}
}
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."));
{
// 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;
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;
}
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;
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."));
diff --git a/src/star-context.cpp b/src/star-context.cpp
index 603365feb032a6c8a138272fa5668ce06c8b4638..74b252860ee13c083eec82d085e8abb5f9573f9b 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
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;
}
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 21c74d1a77e238b0c94cb46f60279441fa265975..453ddfc1949f6699101f9590ac32ecfd7a64db02 100644 (file)
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
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);
}
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");
}
}
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");
}
}
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));
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");
}
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 945813f1b4574859c559bde8da75ecdbfced50d6..1185e08ef6053fcb593f15bf29d0d328bc2a0d31 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
#include "rubberband.h"
#include "sp-metrics.h"
#include "context-fns.h"
+#include "verbs.h"
#include "text-editing.h"
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");
}
/**
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");
}
}
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."));
}
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;
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;
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;
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
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:
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:
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;
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;
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;
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;
} 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;
} 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);
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;
}
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);
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");
}
diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp
index ae4191a6d5bcd3056182c0df35877e366fab9b1b..13885eb5bf2082a2c133a7faa897fc8d1941a5fe 100644 (file)
--- a/src/trace/trace.cpp
+++ b/src/trace/trace.cpp
}
//## 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)
--- a/src/ui/context-menu.cpp
+++ b/src/ui/context-menu.cpp
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)
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)
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" );
}
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;
// 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");
}
};
// 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");
}
};
// 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");
}
};
// 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");
}
};
}
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)
#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"
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)
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)
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
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
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
}
}
- 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");
}
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");
}
diff --git a/src/ui/icons.cpp b/src/ui/icons.cpp
index aa8c5d53c588caf79dff64df1db8761731329ee4..c65066c36f3fbcec96a4157af834447274fdf529 100644 (file)
--- a/src/ui/icons.cpp
+++ b/src/ui/icons.cpp
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");
diff --git a/src/ui/stock.cpp b/src/ui/stock.cpp
index b7dbddcc9dd61c22163a8c5ad699ce10a9006279..7ceb86660e0107bdb5e7122473ca78808202e3bf 100644 (file)
--- a/src/ui/stock.cpp
+++ b/src/ui/stock.cpp
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");
diff --git a/src/ui/stock.h b/src/ui/stock.h
index d990186cbf2d881cfcd1540d4f80bc36ba96ebc3..069ab66f315abe66b4e12965cd92448af7aafc00 100644 (file)
--- a/src/ui/stock.h
+++ b/src/ui/stock.h
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)
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)
(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)
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);
}
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)
_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)
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)
#include "sp-namedview.h"
#include "registered-widget.h"
+#include "verbs.h"
namespace Inkscape {
namespace UI {
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);
}
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);
}
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);
}
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);
}
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)
--- a/src/ui/widget/ruler.cpp
+++ b/src/ui/widget/ruler.cpp
#include "desktop-handles.h"
#include "document.h"
#include "sp-namedview.h"
+#include "verbs.h"
namespace Inkscape {
namespace UI {
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)
#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"};
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;
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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() {
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");
}
}
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");
}
}
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() {
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;
}
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
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)
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.
*
/**
* 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;
};
}
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 5649d08956942ed724d7b04113b5cd40163f7a09..6c529cfcb2c922d71c44716f9bf2e997ec02270f 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
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."));
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."));
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);
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."));
} 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)) {
} 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);
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;
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..."),
diff --git a/src/verbs.h b/src/verbs.h
index 37f6f424bccaf0287ef46d03bf36b6372f5712e5..8474203f63ec3c9d43deca58f282f1fdbde2e00c 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
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,
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)
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 *
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)
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");
}
}
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;
}
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
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");
}
}
// 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)
#include "dialogs/layer-properties.h"
#include "layer-manager.h"
#include "xml/node-event-vector.h"
+#include "verbs.h"
namespace Inkscape {
namespace Widgets {
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)
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)
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)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
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));
}
}
- 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));
}
}
}
- 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));
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));
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
}
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));
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")));
}
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));
}
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));
}
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));
}
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);
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));