diff options
| author | Michael G. Sloan <mgsloan@gmail.com> | 2006-08-26 01:31:22 +0000 |
|---|---|---|
| committer | mgsloan <mgsloan@users.sourceforge.net> | 2006-08-26 01:31:22 +0000 |
| commit | 36a1242bc96b3afee539421ec2c38d9934dd5095 (patch) | |
| tree | 0148b856984f87a8229675a65753d5ca451d1565 /src/extension | |
| parent | Fixed a crash in modifying filter parameters in XML editor. (diff) | |
| download | inkscape-36a1242bc96b3afee539421ec2c38d9934dd5095.tar.gz inkscape-36a1242bc96b3afee539421ec2c38d9934dd5095.zip | |
gboolean -> bool conversion commit 1. Modifies code to do with getting the undo system to ignore actions, as well as
SVG/XML save/load. Shouldn't cause problems though.
(bzr r1639)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/input.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 5 | ||||
| -rw-r--r-- | src/extension/system.cpp | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 68eb31e7b..94b0f6ab4 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -165,8 +165,8 @@ Input::open (const gchar *uri) if (doc != NULL) { Inkscape::XML::Node * repr = sp_document_repr_root(doc); - gboolean saved = sp_document_get_undo_sensitive(doc); - sp_document_set_undo_sensitive (doc, FALSE); + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive (doc, false); repr->setAttribute("inkscape:output_extension", output_extension); sp_document_set_undo_sensitive (doc, saved); } diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index eadae090f..7f44fb553 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -21,7 +21,8 @@ SPDocument * GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) { SPDocument *doc = sp_document_new(NULL, TRUE, TRUE); - sp_document_set_undo_sensitive(doc, FALSE); // no need to undo in this temporary document + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL ); Inkscape::XML::Node *rdoc = sp_document_repr_root(doc); gchar const *docbase = rdoc->attribute("sodipodi:docbase"); @@ -92,7 +93,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) //alter the canvas size to fit the image size fit_canvas_to_drawing(doc); // restore undo, as now this document may be shown to the user if a bitmap was opened - sp_document_set_undo_sensitive(doc, TRUE); + sp_document_set_undo_sensitive(doc, saved); } else { printf("GdkPixbuf loader failed\n"); } diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 41d6e7513..c20212930 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -104,8 +104,8 @@ open(Extension *key, gchar const *filename) /* This kinda overkill as most of these are already set, but I want to make sure for this release -- TJG */ Inkscape::XML::Node *repr = sp_document_repr_root(doc); - gboolean saved = sp_document_get_undo_sensitive(doc); - sp_document_set_undo_sensitive(doc, FALSE); + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive(doc, false); repr->setAttribute("sodipodi:modified", NULL); sp_document_set_undo_sensitive(doc, saved); @@ -250,10 +250,10 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, if (official) { // save the filename for next use sp_document_set_uri(doc, fileName); - gboolean saved = sp_document_get_undo_sensitive(doc); + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive (doc, false); // also save the extension for next use Inkscape::XML::Node *repr = sp_document_repr_root(doc); - sp_document_set_undo_sensitive (doc, FALSE); repr->setAttribute("inkscape:output_extension", omod->get_id()); // set the "dataloss" attribute if the chosen extension is lossy repr->setAttribute("inkscape:dataloss", NULL); |
