~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/document-undo.cpp

  • Committer: kidproto
  • Date: 2006-08-25 07:03:19 UTC
  • Revision ID: kidproto@users.sourceforge.net-20060825070319-49nso3fdlwuveifv
peeled back the gboolean code as it hit on some complexity theory principles...
need to rethink and incrementally change gbooleans to bools

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 *   Since undo sensitivity needs to be nested, setting undo sensitivity
76
76
 *   should be done like this:
77
77
 *\verbatim
78
 
        bool saved = sp_document_get_undo_sensitive(document);
 
78
        gboolean saved = sp_document_get_undo_sensitive(document);
79
79
        sp_document_set_undo_sensitive(document, FALSE);
80
80
        ... do stuff ...
81
81
        sp_document_set_undo_sensitive(document, saved);  \endverbatim
82
82
 */
83
83
void
84
 
sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive)
 
84
sp_document_set_undo_sensitive (SPDocument *doc, gboolean sensitive)
85
85
{
86
86
        g_assert (doc != NULL);
87
87
        g_assert (doc->priv != NULL);
101
101
        doc->priv->sensitive = !!sensitive;
102
102
}
103
103
 
104
 
bool sp_document_get_undo_sensitive(SPDocument const *document) {
 
104
gboolean sp_document_get_undo_sensitive(SPDocument const *document) {
105
105
        g_assert(document != NULL);
106
106
        g_assert(document->priv != NULL);
107
107
 
200
200
 
201
201
}
202
202
 
203
 
bool
 
203
gboolean
204
204
sp_document_undo (SPDocument *doc)
205
205
{
206
206
        using Inkscape::Debug::EventTracker;
207
207
        using Inkscape::Debug::SimpleEvent;
208
208
 
209
 
        bool ret;
 
209
        gboolean ret;
210
210
 
211
211
        EventTracker<SimpleEvent<Inkscape::Debug::Event::DOCUMENT> > tracker("undo");
212
212
 
244
244
        return ret;
245
245
}
246
246
 
247
 
bool
 
247
gboolean
248
248
sp_document_redo (SPDocument *doc)
249
249
{
250
250
        using Inkscape::Debug::EventTracker;
251
251
        using Inkscape::Debug::SimpleEvent;
252
252
 
253
 
        bool ret;
 
253
        gboolean ret;
254
254
 
255
255
        EventTracker<SimpleEvent<Inkscape::Debug::Event::DOCUMENT> > tracker("redo");
256
256