From c87d0307348fcfdc65b6b4ab6999a3cb0de2431f Mon Sep 17 00:00:00 2001 From: kidproto Date: Wed, 23 Aug 2006 07:08:06 +0000 Subject: [PATCH] Ok, committed msgloan's patch to convert gbooleans to bools thus completing one major janitorial task we identified.... --- AUTHORS | 1 + src/color.cpp | 4 +-- src/color.h | 4 +-- src/conn-avoid-ref.cpp | 2 +- src/connector-context.cpp | 8 ++--- src/dialogs/clonetiler.cpp | 2 +- src/dialogs/dialog-events.cpp | 10 +++--- src/dialogs/dialog-events.h | 6 ++-- src/dialogs/filedialog-win32.cpp | 6 ++-- src/dialogs/find.cpp | 6 ++-- src/dialogs/input.cpp | 2 +- src/dialogs/item-properties.cpp | 2 +- src/dialogs/object-properties.cpp | 2 +- src/dialogs/stroke-style.cpp | 2 +- src/dialogs/swatches.cpp | 2 +- src/dialogs/text-edit.cpp | 14 ++++---- src/dialogs/xml-tree.cpp | 12 +++---- src/display/canvas-arena.cpp | 2 +- src/display/canvas-arena.h | 2 +- src/document-undo.cpp | 14 ++++---- src/document.cpp | 10 +++--- src/document.h | 14 ++++---- src/draw-anchor.cpp | 4 +-- src/draw-anchor.h | 4 +-- src/draw-context.cpp | 2 +- src/draw-context.h | 4 +-- src/dyna-draw-context.cpp | 10 +++--- src/extension/init.cpp | 4 +-- src/extension/input.cpp | 2 +- src/extension/internal/ps.cpp | 2 +- src/extension/internal/svg.cpp | 4 +-- src/extension/internal/win32.cpp | 6 ++-- src/extension/internal/win32.h | 2 +- src/extension/system.cpp | 2 +- src/file.cpp | 6 ++-- src/file.h | 2 +- src/helper/unit-menu.cpp | 6 ++-- src/helper/unit-menu.h | 2 +- src/helper/units.cpp | 2 +- src/helper/units.h | 2 +- src/helper/window.cpp | 2 +- src/inkscape.cpp | 10 +++--- src/inkscape.h | 2 +- src/interface.cpp | 10 +++--- src/interface.h | 2 +- src/knot.cpp | 4 +-- src/knotholder.h | 2 +- src/main.cpp | 30 ++++++++--------- src/node-context.cpp | 2 +- src/node-context.h | 8 ++--- src/nodepath.cpp | 48 +++++++++++++-------------- src/nodepath.h | 10 +++--- src/path-chemistry.cpp | 4 +-- src/pen-context.cpp | 4 +-- src/selection.cpp | 2 +- src/selection.h | 2 +- src/seltrans-handles.h | 12 +++---- src/seltrans.cpp | 28 ++++++++-------- src/seltrans.h | 12 +++---- src/sp-ellipse.cpp | 4 +-- src/sp-guide.cpp | 2 +- src/sp-guide.h | 2 +- src/sp-image.cpp | 14 ++++---- src/sp-metrics.cpp | 2 +- src/sp-metrics.h | 2 +- src/sp-namedview.cpp | 20 +++++------ src/sp-namedview.h | 2 +- src/sp-object.cpp | 2 +- src/sp-polygon.cpp | 4 +-- src/sp-polyline.cpp | 2 +- src/sp-rect.cpp | 4 +-- src/sp-rect.h | 4 +-- src/spiral-context.cpp | 2 +- src/star-context.cpp | 2 +- src/svg-view.cpp | 2 +- src/svg/svg-color.cpp | 2 +- src/svg/svg-path.cpp | 12 +++---- src/ui/dialog/dialog.cpp | 2 +- src/ui/view/view-widget.h | 4 +-- src/ui/widget/registered-widget.cpp | 8 ++--- src/ui/widget/tolerance-slider.cpp | 2 +- src/version.cpp | 4 +-- src/version.h | 4 +-- src/widgets/button.cpp | 2 +- src/widgets/button.h | 2 +- src/widgets/desktop-widget.h | 2 +- src/widgets/gradient-selector.cpp | 2 +- src/widgets/gradient-vector.cpp | 10 +++--- src/widgets/icon.cpp | 2 +- src/widgets/select-toolbar.cpp | 4 +-- src/widgets/sp-color-notebook.cpp | 12 +++---- src/widgets/sp-color-notebook.h | 6 ++-- src/widgets/sp-color-scales.cpp | 2 +- src/widgets/sp-color-scales.h | 6 ++-- src/widgets/sp-color-selector.cpp | 10 +++--- src/widgets/sp-color-selector.h | 8 ++--- src/widgets/sp-color-wheel-selector.h | 6 ++-- src/widgets/sp-color-wheel.cpp | 17 +++++----- src/widgets/sp-color-wheel.h | 8 ++--- src/widgets/spinbutton-events.cpp | 6 ++-- src/widgets/spinbutton-events.h | 4 +-- src/widgets/toolbox.cpp | 4 +-- src/xml/repr-io.cpp | 16 ++++----- src/xml/repr.h | 2 +- 104 files changed, 313 insertions(+), 313 deletions(-) diff --git a/AUTHORS b/AUTHORS index ea794f845..30b30322f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -85,3 +85,4 @@ Masatake Yamato Jos Hirth Alan Horkan Johan Engelen +mgsloan diff --git a/src/color.cpp b/src/color.cpp index 2a6da863c..78ef39188 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -69,7 +69,7 @@ sp_color_copy(SPColor *dst, SPColor const *src) /** * Returns TRUE if c0 or c1 is NULL, or if colors/opacities differ. */ -gboolean +bool sp_color_is_equal (SPColor const *c0, SPColor const *c1) { g_return_val_if_fail (c0 != NULL, TRUE); @@ -89,7 +89,7 @@ sp_color_is_equal (SPColor const *c0, SPColor const *c1) * with CMYK aditionally comparing opacity, or if c0 or c1 is NULL. * \note Do we want the latter? */ -gboolean +bool sp_color_is_close (SPColor const *c0, SPColor const *c1, float epsilon) { g_return_val_if_fail (c0 != NULL, TRUE); diff --git a/src/color.h b/src/color.h index 2c3f91fe7..824604afc 100644 --- a/src/color.h +++ b/src/color.h @@ -64,8 +64,8 @@ SPColorSpaceType sp_color_get_colorspace_type (const SPColor *color); void sp_color_copy (SPColor *dst, const SPColor *src); -gboolean sp_color_is_equal (const SPColor *c0, const SPColor *c1); -gboolean sp_color_is_close (const SPColor *c0, const SPColor *c1, float epsilon); +bool sp_color_is_equal (const SPColor *c0, const SPColor *c1); +bool sp_color_is_close (const SPColor *c0, const SPColor *c1, float epsilon); void sp_color_set_rgb_float (SPColor *color, float r, float g, float b); void sp_color_set_rgb_rgba32 (SPColor *color, guint32 value); diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 22ddb5425..0532a7668 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -273,7 +273,7 @@ void init_avoided_shape_geometry(SPDesktop *desktop) // Don't count this as changes to the document, // it is basically just llate initialisation. SPDocument *document = sp_desktop_document(desktop); - gboolean saved = sp_document_get_undo_sensitive(document); + bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, FALSE); bool initialised = false; diff --git a/src/connector-context.cpp b/src/connector-context.cpp index e38f8a627..ed0d6aad7 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -961,7 +961,7 @@ spcc_connector_finish(SPConnectorContext *const cc) } -static gboolean +static bool cc_generic_knot_handler(SPCanvasItem *, GdkEvent *event, SPKnot *knot) { g_assert (knot != NULL); @@ -971,7 +971,7 @@ cc_generic_knot_handler(SPCanvasItem *, GdkEvent *event, SPKnot *knot) SPConnectorContext *cc = SP_CONNECTOR_CONTEXT( knot->desktop->event_context); - gboolean consumed = FALSE; + bool consumed = FALSE; switch (event->type) { case GDK_ENTER_NOTIFY: @@ -1008,12 +1008,12 @@ cc_generic_knot_handler(SPCanvasItem *, GdkEvent *event, SPKnot *knot) } -static gboolean +static bool endpt_handler(SPKnot *knot, GdkEvent *event, SPConnectorContext *cc) { g_assert( SP_IS_CONNECTOR_CONTEXT(cc) ); - gboolean consumed = FALSE; + bool consumed = FALSE; switch (event->type) { case GDK_BUTTON_PRESS: diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 5f6c557f1..7cae37a93 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -109,7 +109,7 @@ clonetiler_dialog_destroy (GtkObject *object, gpointer data) } -static gboolean +static bool clonetiler_dialog_delete (GtkObject *object, GdkEvent * /*event*/, gpointer data) { gtk_window_get_position ((GtkWindow *) dlg, &x, &y); diff --git a/src/dialogs/dialog-events.cpp b/src/dialogs/dialog-events.cpp index deabcf383..983024d10 100644 --- a/src/dialogs/dialog-events.cpp +++ b/src/dialogs/dialog-events.cpp @@ -31,7 +31,7 @@ * \brief This function is called to zero the transientize semaphore by a * timeout. */ -gboolean +bool sp_allow_again (gpointer *wd) { ((win_data *) wd)->stop = 0; @@ -81,7 +81,7 @@ sp_dialog_defocus_on_enter (GtkWidget *w) -gboolean +bool sp_dialog_event_handler (GtkWindow *win, GdkEvent *event, gpointer data) { @@ -91,7 +91,7 @@ sp_dialog_event_handler (GtkWindow *win, GdkEvent *event, gpointer data) return FALSE; } - gboolean ret = FALSE; + bool ret = FALSE; switch (event->type) { @@ -210,7 +210,7 @@ void on_dialog_unhide (GtkWidget *w) gtk_widget_show (w); } -gboolean +bool sp_dialog_hide (GtkObject *object, gpointer data) { GtkWidget *dlg = (GtkWidget *) data; @@ -223,7 +223,7 @@ sp_dialog_hide (GtkObject *object, gpointer data) -gboolean +bool sp_dialog_unhide (GtkObject *object, gpointer data) { GtkWidget *dlg = (GtkWidget *) data; diff --git a/src/dialogs/dialog-events.h b/src/dialogs/dialog-events.h index 7cc64c6a2..a86ac0b9b 100644 --- a/src/dialogs/dialog-events.h +++ b/src/dialogs/dialog-events.h @@ -31,7 +31,7 @@ typedef struct { } win_data; -gboolean sp_dialog_event_handler ( GtkWindow *win, +bool sp_dialog_event_handler ( GtkWindow *win, GdkEvent *event, gpointer data ); @@ -49,8 +49,8 @@ void sp_transientize_callback ( Inkscape::Application *inkscape, void on_dialog_hide (GtkWidget *w); void on_dialog_unhide (GtkWidget *w); -gboolean sp_dialog_hide (GtkObject *object, gpointer data); -gboolean sp_dialog_unhide (GtkObject *object, gpointer data); +bool sp_dialog_hide (GtkObject *object, gpointer data); +bool sp_dialog_unhide (GtkObject *object, gpointer data); #endif diff --git a/src/dialogs/filedialog-win32.cpp b/src/dialogs/filedialog-win32.cpp index ca9ce5f6c..67e949d35 100644 --- a/src/dialogs/filedialog-win32.cpp +++ b/src/dialogs/filedialog-win32.cpp @@ -25,11 +25,11 @@ namespace Dialogs /*################################# # U T I L I T Y #################################*/ -static gboolean +static bool win32_is_os_wide() { - static gboolean initialized = FALSE; - static gboolean is_wide = FALSE; + static bool initialized = FALSE; + static bool is_wide = FALSE; static OSVERSIONINFOA osver; if ( !initialized ) diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index f3efeed81..c5d2e6eed 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -88,7 +88,7 @@ static void sp_find_dialog_destroy(GtkObject *object, gpointer) -static gboolean sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer data) +static bool sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer data) { gtk_window_get_position (GTK_WINDOW (dlg), &x, &y); gtk_window_get_size (GTK_WINDOW (dlg), &w, &h); @@ -476,7 +476,7 @@ toggle_shapes (GtkToggleButton *tb, gpointer data) GtkWidget * -sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active, +sp_find_types_checkbox (GtkWidget *w, const gchar *data, bool active, GtkTooltips *tt, const gchar *tip, const gchar *label, void (*toggled)(GtkToggleButton *, gpointer)) @@ -499,7 +499,7 @@ sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active, } GtkWidget * -sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean active, +sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, bool active, GtkTooltips *tt, const gchar *tip, const gchar *label, void (*toggled)(GtkToggleButton *, gpointer), guint indent) diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp index eac3a0c5a..643a4a764 100644 --- a/src/dialogs/input.cpp +++ b/src/dialogs/input.cpp @@ -43,7 +43,7 @@ sp_input_dialog_destroy (GtkObject *object, gpointer data) wd.stop = 0; } -static gboolean +static bool sp_input_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) { gtk_window_get_position ((GtkWindow *) dlg, &x, &y); diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 6f12a48f1..78482018b 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -64,7 +64,7 @@ sp_item_dialog_destroy (GtkObject *object, gpointer data) wd.stop = 0; } -static gboolean +static bool sp_item_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) { gtk_window_get_position ((GtkWindow *) dlg, &x, &y); diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index a4dd49aeb..7f326f476 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -66,7 +66,7 @@ sp_object_properties_dialog_destroy (GtkObject *object, gpointer data) wd.stop = 0; } -static gboolean +static bool sp_object_properties_dialog_delete ( GtkObject *object, GdkEvent *event, gpointer data ) diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index 80099eb82..6dcb80499 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -889,7 +889,7 @@ sp_marker_select(GtkOptionMenu *mnu, GtkWidget *spw) /* TODO: annotate */ "stroke-style.cpp:889"); } -static gboolean stroke_width_set_unit(SPUnitSelector *, +static bool stroke_width_set_unit(SPUnitSelector *, SPUnit const *old, SPUnit const *new_units, GObject *spw) diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 1f5ae5c7c..10f30e64b 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -202,7 +202,7 @@ static void dragBegin( GtkWidget *widget, GdkDragContext* dc, gpointer data ) } //"drag-drop" -// gboolean dragDropColorData( GtkWidget *widget, +// bool dragDropColorData( GtkWidget *widget, // GdkDragContext *drag_context, // gint x, // gint y, diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 8ea0a7236..f37cc645f 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -61,7 +61,7 @@ static void sp_text_edit_dialog_set_default (GtkButton *button, GtkWidget *dlg); static void sp_text_edit_dialog_apply (GtkButton *button, GtkWidget *dlg); static void sp_text_edit_dialog_close (GtkButton *button, GtkWidget *dlg); -static void sp_text_edit_dialog_read_selection (GtkWidget *dlg, gboolean style, gboolean content); +static void sp_text_edit_dialog_read_selection (GtkWidget *dlg, bool style, bool content); static void sp_text_edit_dialog_text_changed (GtkTextBuffer *tb, GtkWidget *dlg); static void sp_text_edit_dialog_font_changed (SPFontSelector *fontsel, font_instance *font, GtkWidget *dlg); @@ -93,7 +93,7 @@ sp_text_edit_dialog_destroy (GtkObject *object, gpointer data) -static gboolean +static bool sp_text_edit_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) { gtk_window_get_position ((GtkWindow *) dlg, &x, &y); @@ -116,7 +116,7 @@ sp_text_edit_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data) This flag is used to prevent passing keys from the dialog to canvas, so that the text editor can handle keys like Esc and Ctrl+Z itself. */ -gboolean +bool text_view_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data) { GObject *dlg = (GObject *) data; @@ -124,7 +124,7 @@ text_view_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data) return FALSE; } -gboolean +bool text_view_focus_out (GtkWidget *w, GdkEventKey *event, gpointer data) { GObject *dlg = (GObject *) data; @@ -452,7 +452,7 @@ sp_text_edit_dialog_selection_modified ( Inkscape::Application *inkscape, guint flags, GtkWidget *dlg ) { - gboolean style, content; + bool style, content; style = ((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG | @@ -645,8 +645,8 @@ sp_text_edit_dialog_close (GtkButton *button, GtkWidget *dlg) static void sp_text_edit_dialog_read_selection ( GtkWidget *dlg, - gboolean dostyle, - gboolean docontent ) + bool dostyle, + bool docontent ) { if (g_object_get_data (G_OBJECT (dlg), "blocked")) return; diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index e515a3f37..bcd3b31f7 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -110,7 +110,7 @@ static void on_tree_select_row(GtkCTree *tree, GtkCTreeNode *node, gint column, static void on_tree_unselect_row(GtkCTree *tree, GtkCTreeNode *node, gint column, gpointer data); static void after_tree_move(GtkCTree *tree, GtkCTreeNode *node, GtkCTreeNode *new_parent, GtkCTreeNode *new_sibling, gpointer data); static void on_destroy(GtkObject *object, gpointer data); -static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data); +static bool on_delete(GtkObject *object, GdkEvent *event, gpointer data); static void on_tree_select_row_enable_if_element(GtkCTree *tree, GtkCTreeNode *node, gint column, gpointer data); static void on_tree_select_row_enable_if_mutable(GtkCTree *tree, GtkCTreeNode *node, gint column, gpointer data); @@ -159,7 +159,7 @@ static void cmd_unindent_node(GtkObject *object, gpointer data); static void cmd_delete_attr(GtkObject *object, gpointer data); static void cmd_set_attr(GtkObject *object, gpointer data); -static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event); +static bool sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event); /* @@ -625,7 +625,7 @@ void sp_xml_tree_dialog() } // end of sp_xml_tree_dialog() -static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event) +static bool sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event) { unsigned int shortcut = get_group0_keyval(event) | @@ -913,7 +913,7 @@ static void on_destroy(GtkObject *object, gpointer data) -static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data) +static bool on_delete(GtkObject *object, GdkEvent *event, gpointer data) { gtk_window_get_position((GtkWindow *) dlg, &x, &y); gtk_window_get_size((GtkWindow *) dlg, &w, &h); @@ -991,7 +991,7 @@ void on_tree_select_row_show_if_text(GtkCTree *tree, GtkCTreeNode *node, } -gboolean xml_tree_node_mutable(GtkCTreeNode *node) +bool xml_tree_node_mutable(GtkCTreeNode *node) { // top-level is immutable, obviously if (!GTK_CTREE_ROW(node)->parent) { @@ -1141,7 +1141,7 @@ void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint column, void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node, gint column, gpointer data) { - gboolean indentable = FALSE; + bool indentable = FALSE; if (xml_tree_node_mutable(node)) { Inkscape::XML::Node *repr, *prev; diff --git a/src/display/canvas-arena.cpp b/src/display/canvas-arena.cpp index 2d192ac1b..8a999fe42 100644 --- a/src/display/canvas-arena.cpp +++ b/src/display/canvas-arena.cpp @@ -423,7 +423,7 @@ sp_canvas_arena_set_pick_delta (SPCanvasArena *ca, gdouble delta) } void -sp_canvas_arena_set_sticky (SPCanvasArena *ca, gboolean sticky) +sp_canvas_arena_set_sticky (SPCanvasArena *ca, bool sticky) { g_return_if_fail (ca != NULL); g_return_if_fail (SP_IS_CANVAS_ARENA (ca)); diff --git a/src/display/canvas-arena.h b/src/display/canvas-arena.h index 805bee60a..a2728a7b5 100644 --- a/src/display/canvas-arena.h +++ b/src/display/canvas-arena.h @@ -51,7 +51,7 @@ struct SPCanvasArenaClass { GtkType sp_canvas_arena_get_type (void); void sp_canvas_arena_set_pick_delta (SPCanvasArena *ca, gdouble delta); -void sp_canvas_arena_set_sticky (SPCanvasArena *ca, gboolean sticky); +void sp_canvas_arena_set_sticky (SPCanvasArena *ca, bool sticky); void sp_canvas_arena_render_pixblock (SPCanvasArena *ca, NRPixBlock *pb); diff --git a/src/document-undo.cpp b/src/document-undo.cpp index 09bb4e857..226183bda 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -75,13 +75,13 @@ * Since undo sensitivity needs to be nested, setting undo sensitivity * should be done like this: *\verbatim - gboolean saved = sp_document_get_undo_sensitive(document); + bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, FALSE); ... do stuff ... sp_document_set_undo_sensitive(document, saved); \endverbatim */ void -sp_document_set_undo_sensitive (SPDocument *doc, gboolean sensitive) +sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive) { g_assert (doc != NULL); g_assert (doc->priv != NULL); @@ -101,7 +101,7 @@ sp_document_set_undo_sensitive (SPDocument *doc, gboolean sensitive) doc->priv->sensitive = !!sensitive; } -gboolean sp_document_get_undo_sensitive(SPDocument const *document) { +bool sp_document_get_undo_sensitive(SPDocument const *document) { g_assert(document != NULL); g_assert(document->priv != NULL); @@ -200,13 +200,13 @@ void finish_incomplete_transaction(SPDocument &doc) { } -gboolean +bool sp_document_undo (SPDocument *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; - gboolean ret; + bool ret; EventTracker > tracker("undo"); @@ -244,13 +244,13 @@ sp_document_undo (SPDocument *doc) return ret; } -gboolean +bool sp_document_redo (SPDocument *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; - gboolean ret; + bool ret; EventTracker > tracker("redo"); diff --git a/src/document.cpp b/src/document.cpp index 20bbeb73e..04d3a147c 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -549,7 +549,7 @@ void sp_document_set_uri(SPDocument *document, gchar const *uri) // Update saveable repr attributes. Inkscape::XML::Node *repr = sp_document_repr_root(document); // changing uri in the document repr must not be not undoable - gboolean saved = sp_document_get_undo_sensitive(document); + bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, FALSE); if (document->base) repr->setAttribute("sodipodi:docbase", document->base); @@ -914,7 +914,7 @@ upwards in z-order and returns what it has found so far (i.e. the found item is guaranteed to be lower than upto). */ SPItem* -find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL) +find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, bool into_groups, bool take_insensitive = false, SPItem *upto = NULL) { SPItem *seen = NULL, *newseen = NULL; @@ -1015,7 +1015,7 @@ GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey SPItem * sp_document_item_at_point(SPDocument *document, unsigned const key, NR::Point const p, - gboolean const into_groups, SPItem *upto) + bool const into_groups, SPItem *upto) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(document->priv != NULL, NULL); @@ -1035,7 +1035,7 @@ sp_document_group_at_point(SPDocument *document, unsigned int key, NR::Point con /* Resource management */ -gboolean +bool sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *object) { GSList *rlist; @@ -1060,7 +1060,7 @@ sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *objec return TRUE; } -gboolean +bool sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *object) { GSList *rlist; diff --git a/src/document.h b/src/document.h index b0afba5ec..f29804db0 100644 --- a/src/document.h +++ b/src/document.h @@ -175,8 +175,8 @@ void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit * Undo & redo */ -void sp_document_set_undo_sensitive (SPDocument * document, gboolean sensitive); -gboolean sp_document_get_undo_sensitive (SPDocument const * document); +void sp_document_set_undo_sensitive (SPDocument * document, bool sensitive); +bool sp_document_get_undo_sensitive (SPDocument const * document); void sp_document_clear_undo (SPDocument * document); void sp_document_clear_redo (SPDocument * document); @@ -200,12 +200,12 @@ void sp_document_reset_key (Inkscape::Application *inkscape, SPDesktop *desktop, void sp_document_cancel (SPDocument *document); /* Undo and redo */ -gboolean sp_document_undo (SPDocument * document); -gboolean sp_document_redo (SPDocument * document); +bool sp_document_undo (SPDocument * document); +bool sp_document_redo (SPDocument * document); /* Resource management */ -gboolean sp_document_add_resource (SPDocument *document, const gchar *key, SPObject *object); -gboolean sp_document_remove_resource (SPDocument *document, const gchar *key, SPObject *object); +bool sp_document_add_resource (SPDocument *document, const gchar *key, SPObject *object); +bool sp_document_remove_resource (SPDocument *document, const gchar *key, SPObject *object); const GSList *sp_document_get_resource_list (SPDocument *document, const gchar *key); sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot); @@ -231,7 +231,7 @@ sigc::connection sp_document_resources_changed_connect(SPDocument *document, con GSList * sp_document_items_in_box(SPDocument *document, unsigned int dkey, NR::Rect const &box); GSList * sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, NR::Rect const &box); SPItem* sp_document_item_from_list_at_point_bottom (unsigned int dkey, SPGroup *group, const GSList *list, NR::Point const p, bool take_insensitive = false); -SPItem * sp_document_item_at_point (SPDocument *document, unsigned int key, NR::Point const p, gboolean into_groups, SPItem *upto = NULL); +SPItem * sp_document_item_at_point (SPDocument *document, unsigned int key, NR::Point const p, bool into_groups, SPItem *upto = NULL); SPItem * sp_document_group_at_point (SPDocument *document, unsigned int key, NR::Point const p); void sp_document_set_uri (SPDocument *document, const gchar *uri); diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp index b06e94a48..ce016aabb 100644 --- a/src/draw-anchor.cpp +++ b/src/draw-anchor.cpp @@ -23,7 +23,7 @@ * Creates an anchor object and initializes it. */ SPDrawAnchor * -sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point delta) +sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, bool start, NR::Point delta) { SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(dc); @@ -67,7 +67,7 @@ sp_draw_anchor_destroy(SPDrawAnchor *anchor) * pointer to it or NULL. */ SPDrawAnchor * -sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate) +sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, bool activate) { SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc); diff --git a/src/draw-anchor.h b/src/draw-anchor.h index 1036a5472..3662451a6 100644 --- a/src/draw-anchor.h +++ b/src/draw-anchor.h @@ -24,10 +24,10 @@ struct SPDrawAnchor { }; -SPDrawAnchor *sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, +SPDrawAnchor *sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, bool start, NR::Point delta); SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor); -SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate); +SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, bool activate); #endif /* !SEEN_DRAW_ANCHOR_H */ diff --git a/src/draw-context.cpp b/src/draw-context.cpp index bb1f56044..d94681703 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -405,7 +405,7 @@ reverse_then_unref(SPCurve *orig) * Invoke _flush_white to write result back to object. */ void -spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed) +spdc_concat_colors_and_flush(SPDrawContext *dc, bool forceclosed) { /* Concat RBG */ SPCurve *c = dc->green_curve; diff --git a/src/draw-context.h b/src/draw-context.h index 59ec5a92f..ded913283 100644 --- a/src/draw-context.h +++ b/src/draw-context.h @@ -57,7 +57,7 @@ struct SPDrawContext : public SPEventContext{ GSList *green_bpaths; SPCurve *green_curve; SPDrawAnchor *green_anchor; - gboolean green_closed; // a flag meaning we hit the green anchor, so close the path on itself + bool green_closed; // a flag meaning we hit the green anchor, so close the path on itself /* White */ SPItem *white_item; @@ -81,7 +81,7 @@ struct SPDrawContextClass : public SPEventContextClass{}; GType sp_draw_context_get_type(void); SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, NR::Point p); -void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed); +void spdc_concat_colors_and_flush(SPDrawContext *dc, bool forceclosed); void spdc_endpoint_snap_rotation(SPEventContext const *const ec, NR::Point &p, NR::Point const o, guint state); void spdc_endpoint_snap_free(SPEventContext const *ec, NR::Point &p, guint state); diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index 3233198f6..741513fa3 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -75,8 +75,8 @@ static void clear_current(SPDynaDrawContext *dc); static void set_to_accumulated(SPDynaDrawContext *dc); static void accumulate_calligraphic(SPDynaDrawContext *dc); -static void fit_and_split(SPDynaDrawContext *ddc, gboolean release); -static void fit_and_split_calligraphics(SPDynaDrawContext *ddc, gboolean release); +static void fit_and_split(SPDynaDrawContext *ddc, bool release); +static void fit_and_split_calligraphics(SPDynaDrawContext *ddc, bool release); static void sp_dyna_draw_reset(SPDynaDrawContext *ddc, NR::Point p); static NR::Point sp_dyna_draw_get_npoint(SPDynaDrawContext const *ddc, NR::Point v); @@ -327,7 +327,7 @@ sp_dyna_draw_extinput(SPDynaDrawContext *dc, GdkEvent *event) } -static gboolean +static bool sp_dyna_draw_apply(SPDynaDrawContext *dc, NR::Point p) { NR::Point n = sp_dyna_draw_get_npoint(dc, p); @@ -708,7 +708,7 @@ accumulate_calligraphic(SPDynaDrawContext *dc) static void fit_and_split(SPDynaDrawContext *dc, - gboolean release) + bool release) { fit_and_split_calligraphics(dc, release); } @@ -719,7 +719,7 @@ static double square(double const x) } static void -fit_and_split_calligraphics(SPDynaDrawContext *dc, gboolean release) +fit_and_split_calligraphics(SPDynaDrawContext *dc, bool release) { double const tolerance_sq = square( NR::expansion(SP_EVENT_CONTEXT(dc)->desktop->w2d()) * TOLERANCE_CALLIGRAPHIC ); diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 756fff964..e52600f8a 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -53,7 +53,7 @@ #include "prefs-utils.h" #include "io/sys.h" -extern gboolean inkscape_app_use_gui( Inkscape::Application const *app ); +extern bool inkscape_app_use_gui( Inkscape::Application const *app ); namespace Inkscape { namespace Extension { @@ -81,7 +81,7 @@ update_pref(gchar const *pref_path, gchar const *pref_attr, { gchar const *pref = prefs_get_string_attribute(pref_path,pref_attr); /* - gboolean missing=TRUE; + bool missing=TRUE; for (GSList *list = extension_family; list; list = g_slist_next(list)) { g_assert( list->data ); diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 68eb31e7b..aaa3f1415 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -165,7 +165,7 @@ 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); + 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/ps.cpp b/src/extension/internal/ps.cpp index 01387ca19..b4a3f8904 100644 --- a/src/extension/internal/ps.cpp +++ b/src/extension/internal/ps.cpp @@ -221,7 +221,7 @@ PrintPS::setup(Inkscape::Extension::Print * mod) unsigned int PrintPS::begin(Inkscape::Extension::Print *mod, SPDocument *doc) { - gboolean epsexport = false; + bool epsexport = false; _latin1_encoded_fonts.clear(); _newlatin1font_proc_defined = false; diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp index ab9c59830..55ba10ff9 100644 --- a/src/extension/internal/svg.cpp +++ b/src/extension/internal/svg.cpp @@ -198,7 +198,7 @@ Svg::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *uri) gchar *save_path = g_path_get_dirname (uri); - gboolean const spns = (!mod->get_id() + bool const spns = (!mod->get_id() || !strcmp (mod->get_id(), SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE) || !strcmp (mod->get_id(), SP_MODULE_KEY_OUTPUT_SVGZ_INKSCAPE)); @@ -214,7 +214,7 @@ Svg::save (Inkscape::Extension::Output *mod, SPDocument *doc, const gchar *uri) Inkscape::IO::fixupHrefs( doc, save_path, spns ); - gboolean const s = sp_repr_save_file (sp_repr_document (repr), uri, SP_SVG_NS_URI); + bool const s = sp_repr_save_file (sp_repr_document (repr), uri, SP_SVG_NS_URI); if (s == FALSE) { throw Inkscape::Extension::Output::save_failed(); } diff --git a/src/extension/internal/win32.cpp b/src/extension/internal/win32.cpp index 51dbd3a00..1ea51f6b9 100644 --- a/src/extension/internal/win32.cpp +++ b/src/extension/internal/win32.cpp @@ -97,11 +97,11 @@ my_timer (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) /* Platform detection */ -gboolean +bool PrintWin32::is_os_wide() { - static gboolean initialized = FALSE; - static gboolean is_wide = FALSE; + static bool initialized = FALSE; + static bool is_wide = FALSE; static OSVERSIONINFOA osver; if ( !initialized ) diff --git a/src/extension/internal/win32.h b/src/extension/internal/win32.h index d46b5b2fb..96b68f075 100644 --- a/src/extension/internal/win32.h +++ b/src/extension/internal/win32.h @@ -60,7 +60,7 @@ public: static void init (void); /* Platform detection */ - static gboolean is_os_wide(); + static bool is_os_wide(); /* Print functions */ virtual unsigned int setup (Inkscape::Extension::Print * module); diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 41d6e7513..482d6c5ea 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -104,7 +104,7 @@ 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); + 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); diff --git a/src/file.cpp b/src/file.cpp index de8ab2b5d..9b2b803c6 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1097,7 +1097,7 @@ sp_file_print_preview(gpointer object, gpointer data) } -void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, gboolean spns ) +void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, bool spns ) { //g_message("Inkscape::IO::fixupHrefs( , [%s], )", base ); @@ -1125,7 +1125,7 @@ void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, gboolean spns try { URI uri(things[i]); - gboolean isAbs = g_path_is_absolute( things[i] ); + bool isAbs = g_path_is_absolute( things[i] ); gchar *str = uri.toString(); g_message( "abs:%d isRel:%d scheme:[%s] path:[%s][%s] uri[%s] / [%s]", (int)isAbs, (int)uri.isRelative(), @@ -1144,7 +1144,7 @@ void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, gboolean spns if ( redo == NULL ) { URI again = URI::fromUtf8( things[i] ); - gboolean isAbs = g_path_is_absolute( things[i] ); + bool isAbs = g_path_is_absolute( things[i] ); gchar *str = again.toString(); g_message( "abs:%d isRel:%d scheme:[%s] path:[%s][%s] uri[%s] / [%s]", (int)isAbs, (int)again.isRelative(), diff --git a/src/file.h b/src/file.h index 18e4068a1..19835ae38 100644 --- a/src/file.h +++ b/src/file.h @@ -172,7 +172,7 @@ void sp_file_vacuum (); namespace Inkscape { namespace IO { -void fixupHrefs( SPDocument *doc, const gchar *uri, gboolean spns ); +void fixupHrefs( SPDocument *doc, const gchar *uri, bool spns ); } } diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp index 34a2b6344..bbda0a7c5 100644 --- a/src/helper/unit-menu.cpp +++ b/src/helper/unit-menu.cpp @@ -46,7 +46,7 @@ struct SPUnitSelector { struct SPUnitSelectorClass { GtkHBoxClass parent_class; - gboolean (* set_unit)(SPUnitSelector *us, SPUnit const *old, SPUnit const *new_unit); + bool (* set_unit)(SPUnitSelector *us, SPUnit const *old, SPUnit const *new_unit); }; enum {SET_UNIT, LAST_SIGNAL}; @@ -175,7 +175,7 @@ spus_unit_activate(GtkWidget *widget, SPUnitSelector *us) us->update = TRUE; - gboolean consumed = FALSE; + bool consumed = FALSE; g_signal_emit(G_OBJECT(us), signals[SET_UNIT], 0, old, unit, &consumed); if ( !consumed @@ -333,7 +333,7 @@ sp_unit_selector_remove_adjustment(SPUnitSelector *us, GtkAdjustment *adj) gtk_object_unref(GTK_OBJECT(adj)); } -gboolean +bool sp_unit_selector_update_test(SPUnitSelector const *selector) { g_return_val_if_fail(selector != NULL, FALSE); diff --git a/src/helper/unit-menu.h b/src/helper/unit-menu.h index bf5bb260e..9407afa3f 100644 --- a/src/helper/unit-menu.h +++ b/src/helper/unit-menu.h @@ -38,7 +38,7 @@ void sp_unit_selector_set_unit(SPUnitSelector *selector, SPUnit const *unit); void sp_unit_selector_add_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment); void sp_unit_selector_remove_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment); -gboolean sp_unit_selector_update_test(SPUnitSelector const *selector); +bool sp_unit_selector_update_test(SPUnitSelector const *selector); double sp_unit_selector_get_value_in_pixels(SPUnitSelector const *selector, GtkAdjustment *adj); void sp_unit_selector_set_value_in_pixels(SPUnitSelector *selector, GtkAdjustment *adj, double value); diff --git a/src/helper/units.cpp b/src/helper/units.cpp index 448f60302..af9560d7d 100644 --- a/src/helper/units.cpp +++ b/src/helper/units.cpp @@ -119,7 +119,7 @@ sp_unit_free_list(GSList *units) /* These are pure utility */ /* Return TRUE if conversion is possible */ -gboolean +bool sp_convert_distance(gdouble *distance, SPUnit const *from, SPUnit const *to) { g_return_val_if_fail(distance != NULL, FALSE); diff --git a/src/helper/units.h b/src/helper/units.h index 3acb65828..4746fccca 100644 --- a/src/helper/units.h +++ b/src/helper/units.h @@ -130,7 +130,7 @@ void sp_unit_free_list (GSList *units); /* These are pure utility */ /* Return TRUE if conversion is possible, FALSE if unit bases differ */ -gboolean sp_convert_distance (gdouble *distance, const SPUnit *from, const SPUnit *to); +bool sp_convert_distance (gdouble *distance, const SPUnit *from, const SPUnit *to); /* If either one is NULL, transconverting to/from that base fails */ /* Generic conversion between volatile units would be useless anyways */ diff --git a/src/helper/window.cpp b/src/helper/window.cpp index 346bd19f1..7bfc28b92 100644 --- a/src/helper/window.cpp +++ b/src/helper/window.cpp @@ -19,7 +19,7 @@ #include "desktop.h" #include "event-context.h" -static gboolean +static bool sp_window_key_press (GtkWidget *widget, GdkEventKey *event) { unsigned int shortcut; diff --git a/src/inkscape.cpp b/src/inkscape.cpp index d3cc1aa00..f976f6682 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -89,7 +89,7 @@ enum { # FORWARD DECLARATIONS ################################*/ -gboolean inkscape_app_use_gui( Inkscape::Application const * app ); +bool inkscape_app_use_gui( Inkscape::Application const * app ); static void inkscape_class_init (Inkscape::ApplicationClass *klass); static void inkscape_init (SPObject *object); @@ -112,8 +112,8 @@ struct Inkscape::Application { GSList *documents; GSList *desktops; gchar *argv0; - gboolean dialogs_toggle; - gboolean use_gui; // may want to consider a virtual function + bool dialogs_toggle; + bool use_gui; // may want to consider a virtual function // for overriding things like the warning dlg's }; @@ -540,7 +540,7 @@ inkscape_segv_handler (int signum) void -inkscape_application_init (const gchar *argv0, gboolean use_gui) +inkscape_application_init (const gchar *argv0, bool use_gui) { inkscape = (Inkscape::Application *)g_object_new (SP_TYPE_INKSCAPE, NULL); /* fixme: load application defaults */ @@ -590,7 +590,7 @@ inkscape_get_instance() return inkscape; } -gboolean inkscape_app_use_gui( Inkscape::Application const * app ) +bool inkscape_app_use_gui( Inkscape::Application const * app ) { return app->use_gui; } diff --git a/src/inkscape.h b/src/inkscape.h index 12f101901..79e2b0234 100644 --- a/src/inkscape.h +++ b/src/inkscape.h @@ -29,7 +29,7 @@ namespace Inkscape { #define INKSCAPE inkscape_get_instance() -void inkscape_application_init (const gchar *argv0, gboolean use_gui); +void inkscape_application_init (const gchar *argv0, bool use_gui); bool inkscape_load_config (const gchar *filename, Inkscape::XML::Document *config, const gchar *skeleton, unsigned int skel_size, const gchar *e_notreg, const gchar *e_notxml, const gchar *e_notsp, const gchar *warn); Inkscape::XML::Node *inkscape_get_repr (Inkscape::Application *inkscape, const gchar *key); diff --git a/src/interface.cpp b/src/interface.cpp index b31853cf3..0b2c80845 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -126,7 +126,7 @@ SPActionEventVector menu_item_event_vector = { }; void -sp_create_window(SPViewWidget *vw, gboolean editable) +sp_create_window(SPViewWidget *vw, bool editable) { g_return_if_fail(vw != NULL); g_return_if_fail(SP_IS_VIEW_WIDGET(vw)); @@ -346,7 +346,7 @@ sp_ui_menuitem_add_icon( GtkWidget *item, gchar *icon_name ) static GtkWidget * sp_ui_menu_append_item( GtkMenu *menu, gchar const *stock, gchar const *label, gchar const *tip, Inkscape::UI::View::View *view, GCallback callback, - gpointer data, gboolean with_mnemonic = TRUE ) + gpointer data, bool with_mnemonic = TRUE ) { GtkWidget *item; @@ -569,13 +569,13 @@ checkitem_toggled(GtkCheckMenuItem *menuitem, gpointer user_data) else pref_path = g_strconcat("window.", pref, NULL); - gboolean checked = gtk_check_menu_item_get_active(menuitem); + bool checked = gtk_check_menu_item_get_active(menuitem); prefs_set_int_attribute(pref_path, "state", checked); reinterpret_cast(view)->layoutWidget(); } -static gboolean +static bool checkitem_update(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { GtkCheckMenuItem *menuitem=GTK_CHECK_MENU_ITEM(widget); @@ -602,7 +602,7 @@ checkitem_update(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) void sp_ui_menu_append_check_item_from_verb(GtkMenu *menu, Inkscape::UI::View::View *view, gchar const *label, gchar const *tip, gchar const *pref, void (*callback_toggle)(GtkCheckMenuItem *, gpointer user_data), - gboolean (*callback_update)(GtkWidget *widget, GdkEventExpose *event, gpointer user_data), + bool (*callback_update)(GtkWidget *widget, GdkEventExpose *event, gpointer user_data), Inkscape::Verb *verb) { GtkWidget *item; diff --git a/src/interface.h b/src/interface.h index 099fdd277..becaf67b3 100644 --- a/src/interface.h +++ b/src/interface.h @@ -22,7 +22,7 @@ /** * Create a new document window. */ -void sp_create_window (SPViewWidget *vw, gboolean editable); +void sp_create_window (SPViewWidget *vw, bool editable); /** * diff --git a/src/knot.cpp b/src/knot.cpp index a8d694779..dd773ca75 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -290,7 +290,7 @@ static int sp_knot_handler(SPCanvasItem *item, GdkEvent *event, SPKnot *knot) g_object_ref(knot); tolerance = prefs_get_int_attribute_limited("options.dragtolerance", "value", 0, 0, 100); - gboolean consumed = FALSE; + bool consumed = FALSE; /* Run client universal event handler, if present */ @@ -505,7 +505,7 @@ void sp_knot_request_position(SPKnot *knot, NR::Point *p, guint state) g_return_if_fail(knot != NULL); g_return_if_fail(SP_IS_KNOT(knot)); - gboolean done = FALSE; + bool done = FALSE; g_signal_emit(knot, knot_signals[REQUEST], 0, diff --git a/src/knotholder.h b/src/knotholder.h index 971dae3b0..544ead795 100644 --- a/src/knotholder.h +++ b/src/knotholder.h @@ -41,7 +41,7 @@ struct SPKnotHolder : GObject { Inkscape::XML::Node *repr; ///< repr of the item, for setting and releasing listeners. - gboolean local_change; ///< if true, no need to recreate knotholder if repr was changed. + bool local_change; ///< if true, no need to recreate knotholder if repr was changed. }; struct SPKnotHolderClass : GObjectClass { diff --git a/src/main.cpp b/src/main.cpp index 6e184f4d7..9b6756ac6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -157,33 +157,33 @@ static void do_query_dimension (SPDocument *doc, bool extent, NR::Dim2 const axi static gchar *sp_global_printer = NULL; -static gboolean sp_global_slideshow = FALSE; +static bool sp_global_slideshow = FALSE; static gchar *sp_export_png = NULL; static gchar *sp_export_dpi = NULL; static gchar *sp_export_area = NULL; -static gboolean sp_export_area_drawing = FALSE; -static gboolean sp_export_area_canvas = FALSE; +static bool sp_export_area_drawing = FALSE; +static bool sp_export_area_canvas = FALSE; static gchar *sp_export_width = NULL; static gchar *sp_export_height = NULL; static gchar *sp_export_id = NULL; static gchar *sp_export_background = NULL; static gchar *sp_export_background_opacity = NULL; -static gboolean sp_export_area_snap = FALSE; -static gboolean sp_export_use_hints = FALSE; -static gboolean sp_export_id_only = FALSE; +static bool sp_export_area_snap = FALSE; +static bool sp_export_use_hints = FALSE; +static bool sp_export_id_only = FALSE; static gchar *sp_export_svg = NULL; static gchar *sp_export_ps = NULL; static gchar *sp_export_eps = NULL; static gchar *sp_export_pdf = NULL; -static gboolean sp_export_text_to_path = FALSE; -static gboolean sp_export_bbox_page = FALSE; -static gboolean sp_query_x = FALSE; -static gboolean sp_query_y = FALSE; -static gboolean sp_query_width = FALSE; -static gboolean sp_query_height = FALSE; +static bool sp_export_text_to_path = FALSE; +static bool sp_export_bbox_page = FALSE; +static bool sp_query_x = FALSE; +static bool sp_query_y = FALSE; +static bool sp_query_width = FALSE; +static bool sp_query_height = FALSE; static gchar *sp_query_id = NULL; static int sp_new_gui = FALSE; -static gboolean sp_vacuum_defs = FALSE; +static bool sp_vacuum_defs = FALSE; static gchar *sp_export_png_utf8 = NULL; static gchar *sp_export_svg_utf8 = NULL; @@ -410,7 +410,7 @@ main(int argc, char **argv) Inkscape::Debug::Logger::init(); - gboolean use_gui; + bool use_gui; #ifndef WIN32 use_gui = (getenv("DISPLAY") != NULL); #else @@ -624,7 +624,7 @@ sp_main_gui(int argc, char const **argv) filename = 0; if (!sp_global_slideshow) { - gboolean create_new = TRUE; + bool create_new = TRUE; /// \todo FIXME BROKEN - non-UTF-8 sneaks in here. inkscape_application_init(argv[0], true); diff --git a/src/node-context.cpp b/src/node-context.cpp index 3142e5b0e..603294e14 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -317,7 +317,7 @@ nodepath_event_attr_changed(Inkscape::XML::Node *repr, gchar const *name, bool is_interactive, gpointer data) { SPItem *item = NULL; - gboolean changed = FALSE; + bool changed = FALSE; g_assert(data); SPNodeContext *nc = ((SPNodeContext *) data); diff --git a/src/node-context.h b/src/node-context.h index a9b4beb07..a4086da2b 100644 --- a/src/node-context.h +++ b/src/node-context.h @@ -34,10 +34,10 @@ struct SPNodeContext { Inkscape::NodePath::Path *nodepath; - gboolean leftalt; - gboolean rightalt; - gboolean leftctrl; - gboolean rightctrl; + bool leftalt; + bool rightalt; + bool leftctrl; + bool rightctrl; /// If true, rubberband was cancelled by esc, so the next button release should not deselect. bool rb_escaped; diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 3398ac1a1..3f76a6548 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -94,9 +94,9 @@ static gchar *create_typestr(Inkscape::NodePath::Path *np); static void sp_node_update_handles(Inkscape::NodePath::Node *node, bool fire_move_signals = true); -static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, gboolean incremental, gboolean override); +static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, bool incremental, bool override); -static void sp_node_set_selected(Inkscape::NodePath::Node *node, gboolean selected); +static void sp_node_set_selected(Inkscape::NodePath::Node *node, bool selected); /* Adjust handle placement, if the node or the other handle is moved */ static void sp_node_adjust_handle(Inkscape::NodePath::Node *node, gint which_adjust); @@ -106,15 +106,15 @@ static void sp_node_adjust_handles(Inkscape::NodePath::Node *node); static void node_clicked(SPKnot *knot, guint state, gpointer data); static void node_grabbed(SPKnot *knot, guint state, gpointer data); static void node_ungrabbed(SPKnot *knot, guint state, gpointer data); -static gboolean node_request(SPKnot *knot, NR::Point *p, guint state, gpointer data); +static bool node_request(SPKnot *knot, NR::Point *p, guint state, gpointer data); /* Handle event callbacks */ static void node_handle_clicked(SPKnot *knot, guint state, gpointer data); static void node_handle_grabbed(SPKnot *knot, guint state, gpointer data); static void node_handle_ungrabbed(SPKnot *knot, guint state, gpointer data); -static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data); +static bool node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data); static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer data); -static gboolean node_handle_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n); +static bool node_handle_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n); /* Constructors and destructors */ @@ -1286,7 +1286,7 @@ static void sp_node_ensure_knot_exists (SPDesktop *desktop, Inkscape::NodePath:: /** * Ensure the given handle of the node is visible/invisible, update its screen position */ -static void sp_node_update_handle(Inkscape::NodePath::Node *node, gint which, gboolean show_handle, bool fire_move_signals) +static void sp_node_update_handle(Inkscape::NodePath::Node *node, gint which, bool show_handle, bool fire_move_signals) { g_assert(node != NULL); @@ -1351,7 +1351,7 @@ static void sp_node_update_handles(Inkscape::NodePath::Node *node, bool fire_mov sp_knot_moveto(node->knot, &node->pos); } - gboolean show_handles = node->selected; + bool show_handles = node->selected; if (node->p.other != NULL) { if (node->p.other->selected) show_handles = TRUE; } @@ -1558,11 +1558,11 @@ sp_nodepath_select_segment_near_point(Inkscape::NodePath::Path *nodepath, NR::Po //fixme: this can return NULL, so check before proceeding. g_return_if_fail(e != NULL); - gboolean force = FALSE; + bool force = FALSE; if (!(e->selected && (!e->p.other || e->p.other->selected))) { force = TRUE; } - sp_nodepath_node_select(e, (gboolean) toggle, force); + sp_nodepath_node_select(e, (bool) toggle, force); if (e->p.other) sp_nodepath_node_select(e->p.other, TRUE, force); @@ -2120,7 +2120,7 @@ sp_node_selected_delete_segment(void) if (a->subpath->closed) { - gboolean reversed = FALSE; + bool reversed = FALSE; //Since we can go in a circle, we need to find the shorter distance. // a->b or b->a @@ -2276,7 +2276,7 @@ sp_node_selected_set_type(Inkscape::NodePath::NodeType type) /** * Change select status of node, update its own and neighbour handles. */ -static void sp_node_set_selected(Inkscape::NodePath::Node *node, gboolean selected) +static void sp_node_set_selected(Inkscape::NodePath::Node *node, bool selected) { node->selected = selected; @@ -2303,7 +2303,7 @@ static void sp_node_set_selected(Inkscape::NodePath::Node *node, gboolean select \param incremental If true, add to selection, otherwise deselect others \param override If true, always select this node, otherwise toggle selected status */ -static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, gboolean incremental, gboolean override) +static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, bool incremental, bool override) { Inkscape::NodePath::Path *nodepath = node->subpath->nodepath; @@ -2520,7 +2520,7 @@ void sp_nodepath_select_prev(Inkscape::NodePath::Path *nodepath) /** * \brief Select all nodes that are within the rectangle. */ -void sp_nodepath_select_rect(Inkscape::NodePath::Path *nodepath, NR::Rect const &b, gboolean incremental) +void sp_nodepath_select_rect(Inkscape::NodePath::Path *nodepath, NR::Rect const &b, bool incremental) { if (!incremental) { sp_nodepath_deselect(nodepath); @@ -2855,9 +2855,9 @@ static void sp_node_adjust_handles(Inkscape::NodePath::Node *node) /** * Node event callback. */ -static gboolean node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n) +static bool node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n) { - gboolean ret = FALSE; + bool ret = FALSE; switch (event->type) { case GDK_ENTER_NOTIFY: active_node = n; @@ -2902,7 +2902,7 @@ static gboolean node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::No /** * Handle keypress on node; directly called. */ -gboolean node_key(GdkEvent *event) +bool node_key(GdkEvent *event) { Inkscape::NodePath::Path *np; @@ -3033,13 +3033,13 @@ static double point_line_distance(NR::Point *p, double a) * Callback for node "request" signal. * \todo fixme: This goes to "moved" event? (lauris) */ -static gboolean +static bool node_request(SPKnot *knot, NR::Point *p, guint state, gpointer data) { double yn, xn, yp, xp; double an, ap, na, pa; double d_an, d_ap, d_na, d_pa; - gboolean collinear = FALSE; + bool collinear = FALSE; NR::Point c; NR::Point pr; @@ -3282,7 +3282,7 @@ static void node_handle_ungrabbed(SPKnot *knot, guint state, gpointer data) /** * Node handle "request" signal callback. */ -static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data) +static bool node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data) { Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) data; @@ -3424,9 +3424,9 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer /** * Node handle event callback. */ -static gboolean node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePath::Node *n) +static bool node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePath::Node *n) { - gboolean ret = FALSE; + bool ret = FALSE; switch (event->type) { case GDK_KEY_PRESS: switch (get_group0_keyval (&event->key)) { @@ -3449,7 +3449,7 @@ static gboolean node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePa } static void node_rotate_one_internal(Inkscape::NodePath::Node const &n, gdouble const angle, - Radial &rme, Radial &rother, gboolean const both) + Radial &rme, Radial &rother, bool const both) { rme.a += angle; if ( both @@ -3461,7 +3461,7 @@ static void node_rotate_one_internal(Inkscape::NodePath::Node const &n, gdouble } static void node_rotate_one_internal_screen(Inkscape::NodePath::Node const &n, gdouble const angle, - Radial &rme, Radial &rother, gboolean const both) + Radial &rme, Radial &rother, bool const both) { gdouble const norm_angle = angle / n.subpath->nodepath->desktop->current_zoom(); @@ -3492,7 +3492,7 @@ static void node_rotate_one_internal_screen(Inkscape::NodePath::Node const &n, g /** * Rotate one node. */ -static void node_rotate_one (Inkscape::NodePath::Node *n, gdouble angle, int which, gboolean screen) +static void node_rotate_one (Inkscape::NodePath::Node *n, gdouble angle, int which, bool screen) { Inkscape::NodePath::NodeSide *me, *other; bool both = false; diff --git a/src/nodepath.h b/src/nodepath.h index 21c2957aa..edce23f76 100644 --- a/src/nodepath.h +++ b/src/nodepath.h @@ -147,7 +147,7 @@ class SubPath { /** The parent of this subpath */ Path * nodepath; /** Is this path closed (no endpoints) or not?*/ - gboolean closed; + bool closed; /** The nodes in this subpath. */ GList * nodes; /** The first node of the subpath (does not imply open/closed)*/ @@ -247,12 +247,12 @@ void sp_nodepath_select_all (Inkscape::NodePath::Path *nodepath, bool invert); void sp_nodepath_select_all_from_subpath(Inkscape::NodePath::Path *nodepath, bool invert); void sp_nodepath_select_next (Inkscape::NodePath::Path *nodepath); void sp_nodepath_select_prev (Inkscape::NodePath::Path *nodepath); -void sp_nodepath_select_rect (Inkscape::NodePath::Path * nodepath, NR::Rect const &b, gboolean incremental); +void sp_nodepath_select_rect (Inkscape::NodePath::Path * nodepath, NR::Rect const &b, bool incremental); GList *save_nodepath_selection (Inkscape::NodePath::Path *nodepath); void restore_nodepath_selection (Inkscape::NodePath::Path *nodepath, GList *r); -gboolean nodepath_repr_d_changed (Inkscape::NodePath::Path * np, const char *newd); -gboolean nodepath_repr_typestr_changed (Inkscape::NodePath::Path * np, const char *newtypestr); -gboolean node_key (GdkEvent * event); +bool nodepath_repr_d_changed (Inkscape::NodePath::Path * np, const char *newd); +bool nodepath_repr_typestr_changed (Inkscape::NodePath::Path * np, const char *newtypestr); +bool node_key (GdkEvent * event); void sp_nodepath_update_repr(Inkscape::NodePath::Path *np, const gchar *annotation); void sp_nodepath_update_statusbar (Inkscape::NodePath::Path *nodepath); void sp_nodepath_selected_align(Inkscape::NodePath::Path *nodepath, NR::Dim2 axis); diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 0c35020b7..82037fde3 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -34,7 +34,7 @@ #include "desktop-handles.h" /* Helper functions for sp_selected_path_to_curves */ -static void sp_selected_path_to_curves0(gboolean do_document_done, guint32 text_grouping_policy); +static void sp_selected_path_to_curves0(bool do_document_done, guint32 text_grouping_policy); static Inkscape::XML::Node *sp_selected_item_to_curved_repr(SPItem *item, guint32 text_grouping_policy); enum { /* Not used yet. This is the placeholder of Lauris's idea. */ @@ -245,7 +245,7 @@ sp_selected_path_to_curves(void) } static void -sp_selected_path_to_curves0(gboolean interactive, guint32 text_grouping_policy) +sp_selected_path_to_curves0(bool interactive, guint32 text_grouping_policy) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; diff --git a/src/pen-context.cpp b/src/pen-context.cpp index c1d7af150..30cd84180 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -55,7 +55,7 @@ static void spdc_pen_set_subsequent_point(SPPenContext *pc, NR::Point const p, b static void spdc_pen_set_ctrl(SPPenContext *pc, NR::Point const p, guint state); static void spdc_pen_finish_segment(SPPenContext *pc, NR::Point p, guint state); -static void spdc_pen_finish(SPPenContext *pc, gboolean closed); +static void spdc_pen_finish(SPPenContext *pc, bool closed); static gint pen_handle_button_press(SPPenContext *const pc, GdkEventButton const &bevent); static gint pen_handle_motion_notify(SPPenContext *const pc, GdkEventMotion const &mevent); @@ -1126,7 +1126,7 @@ spdc_pen_finish_segment(SPPenContext *const pc, NR::Point const p, guint const s } static void -spdc_pen_finish(SPPenContext *const pc, gboolean const closed) +spdc_pen_finish(SPPenContext *const pc, bool const closed) { SPDesktop *const desktop = pc->desktop; pc->_message_context->clear(); diff --git a/src/selection.cpp b/src/selection.cpp index a27e45cb2..3e4c622c1 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -66,7 +66,7 @@ void Selection::_schedule_modified(SPObject *obj, guint flags) { this->_flags |= flags; } -gboolean +bool Selection::_emit_modified(Selection *selection) { /* force new handler to be created if requested before we return */ diff --git a/src/selection.h b/src/selection.h index 1dcaa53ff..29fcbf361 100644 --- a/src/selection.h +++ b/src/selection.h @@ -317,7 +317,7 @@ private: void operator=(Selection const &); /** @brief Issues modification notification signals */ - static gboolean _emit_modified(Selection *selection); + static bool _emit_modified(Selection *selection); /** @brief Schedules an item modification signal to be sent */ void _schedule_modified(SPObject *obj, guint flags); diff --git a/src/seltrans-handles.h b/src/seltrans-handles.h index 0afa552ea..8e3851f2e 100644 --- a/src/seltrans-handles.h +++ b/src/seltrans-handles.h @@ -22,15 +22,15 @@ namespace Inkscape class SPSelTransHandle; // request handlers -gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); -gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); -gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); -gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); -gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_center_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); // action handlers @@ -45,7 +45,7 @@ struct SPSelTransHandle { GdkCursorType cursor; guint control; void (* action) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); - gboolean (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); + bool (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state); gdouble x, y; }; diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 675cb672e..31e69f7ad 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -53,11 +53,11 @@ static void sp_sel_trans_handle_grab(SPKnot *knot, guint state, gpointer data); static void sp_sel_trans_handle_ungrab(SPKnot *knot, guint state, gpointer data); static void sp_sel_trans_handle_click(SPKnot *knot, guint state, gpointer data); static void sp_sel_trans_handle_new_event(SPKnot *knot, NR::Point *position, guint32 state, gpointer data); -static gboolean sp_sel_trans_handle_request(SPKnot *knot, NR::Point *p, guint state, gboolean *data); +static bool sp_sel_trans_handle_request(SPKnot *knot, NR::Point *p, guint state, bool *data); extern GdkPixbuf *handles[]; -static gboolean sp_seltrans_handle_event(SPKnot *knot, GdkEvent *event, gpointer) +static bool sp_seltrans_handle_event(SPKnot *knot, GdkEvent *event, gpointer) { switch (event->type) { case GDK_MOTION_NOTIFY: @@ -609,7 +609,7 @@ static void sp_sel_trans_handle_new_event(SPKnot *knot, NR::Point *position, gui ); } -static gboolean sp_sel_trans_handle_request(SPKnot *knot, NR::Point *position, guint state, gboolean *data) +static bool sp_sel_trans_handle_request(SPKnot *knot, NR::Point *position, guint state, bool *data) { return SP_SELECT_CONTEXT(knot->desktop->event_context)->_seltrans->handleRequest( knot, position, state, *(SPSelTransHandle const *) data @@ -688,7 +688,7 @@ void Inkscape::SelTrans::handleNewEvent(SPKnot *knot, NR::Point *position, guint } -gboolean Inkscape::SelTrans::handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle) +bool Inkscape::SelTrans::handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle) { if (!SP_KNOT_IS_GRABBED(knot)) { return TRUE; @@ -752,37 +752,37 @@ static double sign(double const x) : 1 ); } -gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &, NR::Point &pt, guint state) { return seltrans->scaleRequest(pt, state); } -gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &pt, guint state) { return seltrans->stretchRequest(handle, pt, state); } -gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &pt, guint state) { return seltrans->skewRequest(handle, pt, state); } -gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &, NR::Point &pt, guint state) { return seltrans->rotateRequest(pt, state); } -gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans, +bool sp_sel_trans_center_request(Inkscape::SelTrans *seltrans, SPSelTransHandle const &, NR::Point &pt, guint state) { return seltrans->centerRequest(pt, state); } -gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) +bool Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) { using NR::X; using NR::Y; @@ -890,7 +890,7 @@ gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) return TRUE; } -gboolean Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state) +bool Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state) { using NR::X; using NR::Y; @@ -1002,7 +1002,7 @@ gboolean Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR:: return TRUE; } -gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state) +bool Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state) { using NR::X; using NR::Y; @@ -1092,7 +1092,7 @@ gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Poi return TRUE; } -gboolean Inkscape::SelTrans::rotateRequest(NR::Point &pt, guint state) +bool Inkscape::SelTrans::rotateRequest(NR::Point &pt, guint state) { int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12); @@ -1140,7 +1140,7 @@ gboolean Inkscape::SelTrans::rotateRequest(NR::Point &pt, guint state) return TRUE; } -gboolean Inkscape::SelTrans::centerRequest(NR::Point &pt, guint state) +bool Inkscape::SelTrans::centerRequest(NR::Point &pt, guint state) { using NR::X; using NR::Y; diff --git a/src/seltrans.h b/src/seltrans.h index 5326c7b87..ccb00708e 100644 --- a/src/seltrans.h +++ b/src/seltrans.h @@ -57,13 +57,13 @@ public: void scale(NR::Point &pt, guint state); void skew(SPSelTransHandle const &handle, NR::Point &pt, guint state); void rotate(NR::Point &pt, guint state); - gboolean scaleRequest(NR::Point &pt, guint state); - gboolean stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state); - gboolean skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state); - gboolean rotateRequest(NR::Point &pt, guint state); - gboolean centerRequest(NR::Point &pt, guint state); + bool scaleRequest(NR::Point &pt, guint state); + bool stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state); + bool skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state); + bool rotateRequest(NR::Point &pt, guint state); + bool centerRequest(NR::Point &pt, guint state); - gboolean handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle); + bool handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle); void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle); void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle); void handleNewEvent(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle); diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index b2b0f7b05..f8fb5ca78 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -78,7 +78,7 @@ static void sp_genericellipse_set_shape(SPShape *shape); static Inkscape::XML::Node *sp_genericellipse_write(SPObject *object, Inkscape::XML::Node *repr, guint flags); -static gboolean sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr); +static bool sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr); static SPShapeClass *ge_parent_class; @@ -655,7 +655,7 @@ sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) * See SVG 1.0 Specification W3C Recommendation * ``F.6 Ellptical arc implementation notes'' for more detail. */ -static gboolean +static bool sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr) { gint fa, fs; diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index ccaf81649..ed15e2fa3 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -221,7 +221,7 @@ void sp_guide_hide(SPGuide *guide, SPCanvas *canvas) g_assert_not_reached(); } -void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, gboolean sensitive) +void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, bool sensitive) { g_assert(guide != NULL); g_assert(SP_IS_GUIDE(guide)); diff --git a/src/sp-guide.h b/src/sp-guide.h index a3b876483..2a12225be 100644 --- a/src/sp-guide.h +++ b/src/sp-guide.h @@ -41,7 +41,7 @@ GType sp_guide_get_type(); void sp_guide_show(SPGuide *guide, SPCanvasGroup *group, GCallback handler); void sp_guide_hide(SPGuide *guide, SPCanvas *canvas); -void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, gboolean sensitive); +void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, bool sensitive); double sp_guide_position_from_pt(SPGuide const *guide, NR::Point const &pt); void sp_guide_moveto(SPGuide const &guide, gdouble const position, bool const commit); diff --git a/src/sp-image.cpp b/src/sp-image.cpp index 5804089e6..fe480b22b 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -119,7 +119,7 @@ namespace IO { class PushPull { public: - gboolean first; + bool first; FILE* fp; guchar* scratch; gsize size; @@ -135,9 +135,9 @@ public: offset(0), loader(0) {}; - gboolean readMore() + bool readMore() { - gboolean good = FALSE; + bool good = FALSE; if ( offset ) { g_memmove( scratch, scratch + offset, used - offset ); @@ -211,7 +211,7 @@ void user_read_data( png_structp png_ptr, png_bytep data, png_size_t length ) PushPull* youme = (PushPull*)png_get_io_ptr(png_ptr); gsize filled = 0; - gboolean canRead = TRUE; + bool canRead = TRUE; while ( filled < length && canRead ) { @@ -254,8 +254,8 @@ GdkPixbuf* pixbuf_new_from_file( const char *filename, GError **error ) // short buffer guchar scratch[1024]; - gboolean latter = FALSE; - gboolean isPng = FALSE; + bool latter = FALSE; + bool isPng = FALSE; png_structp pngPtr = NULL; png_infop infoPtr = NULL; //png_infop endPtr = NULL; @@ -375,7 +375,7 @@ GdkPixbuf* pixbuf_new_from_file( const char *filename, GError **error ) } } - gboolean ok = gdk_pixbuf_loader_close(loader, &err); + bool ok = gdk_pixbuf_loader_close(loader, &err); if ( ok ) { buf = gdk_pixbuf_loader_get_pixbuf( loader ); diff --git a/src/sp-metrics.cpp b/src/sp-metrics.cpp index 5f05c9fad..4c2016881 100644 --- a/src/sp-metrics.cpp +++ b/src/sp-metrics.cpp @@ -69,7 +69,7 @@ sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, con GString * sp_metric_to_metric_string(gdouble const length, SPMetric const metric_src, SPMetric const metric_dst, - gboolean const m) + bool const m) { gdouble const len = sp_absolute_metric_to_metric(length, metric_src, metric_dst); GString *str = g_string_new(""); diff --git a/src/sp-metrics.h b/src/sp-metrics.h index 23c1b6c13..07818f848 100644 --- a/src/sp-metrics.h +++ b/src/sp-metrics.h @@ -6,7 +6,7 @@ #include "sp-metric.h" gdouble sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, const SPMetric metric_dst); -GString * sp_metric_to_metric_string (gdouble length, const SPMetric metric_src, const SPMetric metric_dst, gboolean m); +GString * sp_metric_to_metric_string (gdouble length, const SPMetric metric_src, const SPMetric metric_dst, bool m); // convenience since we mostly deal with points #define SP_METRIC_TO_PT(l,m) sp_absolute_metric_to_metric(l,m,SP_PT); diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index f3dea40c7..3757dcf7f 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -57,9 +57,9 @@ static void sp_namedview_setup_guides(SPNamedView * nv); static void sp_namedview_setup_grid(SPNamedView * nv); static void sp_namedview_setup_grid_item(SPNamedView * nv, SPCanvasItem * item); -static gboolean sp_str_to_bool(const gchar *str); -static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit); -static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color); +static bool sp_str_to_bool(const gchar *str); +static bool sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit); +static bool sp_nv_read_opacity(const gchar *str, guint32 *color); static SPObjectGroupClass * parent_class; @@ -687,7 +687,7 @@ void sp_namedview_document_from_window(SPDesktop *desktop) NR::Rect const r = desktop->get_display_area(); // saving window geometry is not undoable - gboolean saved = sp_document_get_undo_sensitive(sp_desktop_document(desktop)); + bool saved = sp_document_get_undo_sensitive(sp_desktop_document(desktop)); sp_document_set_undo_sensitive(sp_desktop_document(desktop), FALSE); sp_repr_set_svg_double(view, "inkscape:zoom", desktop->current_zoom()); @@ -734,7 +734,7 @@ void SPNamedView::hide(SPDesktop const *desktop) gridviews = g_slist_remove(gridviews, l->data); } -void SPNamedView::activateGuides(gpointer desktop, gboolean active) +void SPNamedView::activateGuides(gpointer desktop, bool active) { g_assert(desktop != NULL); g_assert(g_slist_find(views, desktop)); @@ -771,7 +771,7 @@ void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr) v = !v; } - gboolean saved = sp_document_get_undo_sensitive(doc); + bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, FALSE); sp_repr_set_boolean(repr, "showguides", v); @@ -786,7 +786,7 @@ void sp_namedview_toggle_grid(SPDocument *doc, Inkscape::XML::Node *repr) sp_repr_get_boolean(repr, "showgrid", &v); v = !v; - gboolean saved = sp_document_get_undo_sensitive(doc); + bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, FALSE); sp_repr_set_boolean(repr, "showgrid", v); @@ -840,7 +840,7 @@ GSList const *SPNamedView::getViewList() const /* This should be moved somewhere */ -static gboolean sp_str_to_bool(const gchar *str) +static bool sp_str_to_bool(const gchar *str) { if (str) { if (!g_strcasecmp(str, "true") || @@ -856,7 +856,7 @@ static gboolean sp_str_to_bool(const gchar *str) /* fixme: Collect all these length parsing methods and think common sane API */ -static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit) +static bool sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit) { if (!str) { return FALSE; @@ -906,7 +906,7 @@ static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, co return FALSE; } -static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color) +static bool sp_nv_read_opacity(const gchar *str, guint32 *color) { if (!str) { return FALSE; diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 54291413e..b60fb5617 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -85,7 +85,7 @@ struct SPNamedView : public SPObjectGroup { void show(SPDesktop *desktop); void hide(SPDesktop const *desktop); - void activateGuides(gpointer desktop, gboolean active); + void activateGuides(gpointer desktop, bool active); gchar const *getName() const; guint getViewCount(); GSList const *getViewList() const; diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 62a442d0a..f3e6d2164 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -825,7 +825,7 @@ sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::No /* Redefine ID, if required */ if ((id == NULL) || (strcmp(id, realid) != 0)) { - gboolean undo_sensitive=sp_document_get_undo_sensitive(document); + bool undo_sensitive=sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, FALSE); object->repr->setAttribute("id", realid); sp_document_set_undo_sensitive(document, undo_sensitive); diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp index 56cbfefde..8c853bcd6 100644 --- a/src/sp-polygon.cpp +++ b/src/sp-polygon.cpp @@ -137,7 +137,7 @@ static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::No } -static gboolean polygon_get_value(gchar const **p, gdouble *v) +static bool polygon_get_value(gchar const **p, gdouble *v) { while (**p != '\0' && (**p == ',' || **p == '\x20' || **p == '\x9' || **p == '\xD' || **p == '\xA')) { (*p)++; @@ -170,7 +170,7 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu break; } SPCurve *curve = sp_curve_new(); - gboolean hascpt = FALSE; + bool hascpt = FALSE; gchar const *cptr = value; bool has_error = false; diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp index 54a38ccd1..265b2b797 100644 --- a/src/sp-polyline.cpp +++ b/src/sp-polyline.cpp @@ -101,7 +101,7 @@ sp_polyline_set (SPObject *object, unsigned int key, const gchar *value) SPCurve * curve; const gchar * cptr; char * eptr; - gboolean hascpt; + bool hascpt; if (!value) break; curve = sp_curve_new (); diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index edcea21a2..e28664888 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -311,7 +311,7 @@ sp_rect_position_set(SPRect *rect, gdouble x, gdouble y, gdouble width, gdouble } void -sp_rect_set_rx(SPRect *rect, gboolean set, gdouble value) +sp_rect_set_rx(SPRect *rect, bool set, gdouble value) { g_return_if_fail(rect != NULL); g_return_if_fail(SP_IS_RECT(rect)); @@ -323,7 +323,7 @@ sp_rect_set_rx(SPRect *rect, gboolean set, gdouble value) } void -sp_rect_set_ry(SPRect *rect, gboolean set, gdouble value) +sp_rect_set_ry(SPRect *rect, bool set, gdouble value) { g_return_if_fail(rect != NULL); g_return_if_fail(SP_IS_RECT(rect)); diff --git a/src/sp-rect.h b/src/sp-rect.h index 4cf3b24ba..bef99470b 100644 --- a/src/sp-rect.h +++ b/src/sp-rect.h @@ -47,8 +47,8 @@ GType sp_rect_get_type (void); void sp_rect_position_set (SPRect * rect, gdouble x, gdouble y, gdouble width, gdouble height); /* If SET if FALSE, VALUE is just ignored */ -void sp_rect_set_rx(SPRect * rect, gboolean set, gdouble value); -void sp_rect_set_ry(SPRect * rect, gboolean set, gdouble value); +void sp_rect_set_rx(SPRect * rect, bool set, gdouble value); +void sp_rect_set_ry(SPRect * rect, bool set, gdouble value); void sp_rect_set_visible_rx (SPRect *rect, gdouble rx); void sp_rect_set_visible_ry (SPRect *rect, gdouble ry); diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 1dc6bd6cb..fcc8aa9db 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -252,7 +252,7 @@ sp_spiral_context_set(SPEventContext *ec, gchar const *key, gchar const *val) static gint sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event) { - static gboolean dragging; + static bool dragging; SPDesktop *desktop = event_context->desktop; Inkscape::Selection *selection = sp_desktop_selection (desktop); diff --git a/src/star-context.cpp b/src/star-context.cpp index 74b252860..612f5d5bb 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -262,7 +262,7 @@ sp_star_context_set (SPEventContext *ec, const gchar *key, const gchar *val) static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent *event) { - static gboolean dragging; + static bool dragging; SPDesktop *desktop = event_context->desktop; Inkscape::Selection *selection = sp_desktop_selection (desktop); diff --git a/src/svg-view.cpp b/src/svg-view.cpp index 22d9dd120..254540aaa 100644 --- a/src/svg-view.cpp +++ b/src/svg-view.cpp @@ -132,7 +132,7 @@ static gint arena_handler (SPCanvasArena *arena, NRArenaItem *ai, GdkEvent *event, SPSVGView *svgview) { static gdouble x, y; - static gboolean active = FALSE; + static bool active = FALSE; SPEvent spev; SPItem *spitem = (ai) ? (SPItem*)NR_ARENA_ITEM_GET_DATA (ai) : 0; diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp index 372570883..6bbcdd884 100644 --- a/src/svg/svg-color.cpp +++ b/src/svg/svg-color.cpp @@ -235,7 +235,7 @@ internal_sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 def) *end_ptr = str + i; } } else if (strneq(str, "rgb(", 4)) { - gboolean hasp, hasd; + bool hasp, hasd; gchar *s, *e; gdouble r, g, b; diff --git a/src/svg/svg-path.cpp b/src/svg/svg-path.cpp index 6598a5731..b37814164 100644 --- a/src/svg/svg-path.cpp +++ b/src/svg/svg-path.cpp @@ -63,7 +63,7 @@ struct RSVGParsePathCtx { double spx, spy; /* beginning of current subpath point */ char cmd; /* current command (lowercase) */ int param; /* parameter number */ - gboolean rel; /* true if relative coords */ + bool rel; /* true if relative coords */ double params[7]; /* parameters that have been parsed */ }; @@ -221,7 +221,7 @@ static void rsvg_parse_path_default_xy(RSVGParsePathCtx *ctx, int n_params) } } -static void rsvg_parse_path_do_cmd(RSVGParsePathCtx *ctx, gboolean final) +static void rsvg_parse_path_do_cmd(RSVGParsePathCtx *ctx, bool final) { double x1, y1, x2, y2, x3, y3; @@ -455,10 +455,10 @@ static void rsvg_parse_path_data(RSVGParsePathCtx *ctx, const char *data) int i = 0; double val = 0; char c = 0; - gboolean in_num = FALSE; - gboolean in_frac = FALSE; - gboolean in_exp = FALSE; - gboolean exp_wait_sign = FALSE; + bool in_num = FALSE; + bool in_frac = FALSE; + bool in_exp = FALSE; + bool exp_wait_sign = FALSE; int sign = 0; int exp = 0; int exp_sign = 0; diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index 074ee0d36..1a4816c88 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -36,7 +36,7 @@ namespace UI { namespace Dialog { #ifndef WIN32 -static gboolean +static bool sp_retransientize_again (gpointer dlgPtr) { Dialog *dlg = (Dialog *)dlgPtr; diff --git a/src/ui/view/view-widget.h b/src/ui/view/view-widget.h index 9b5e9c4a8..6c66ff64e 100644 --- a/src/ui/view/view-widget.h +++ b/src/ui/view/view-widget.h @@ -61,7 +61,7 @@ class SPViewWidget { sp_view_widget_set_view(this, view); } - gboolean shutdown() { + bool shutdown() { return sp_view_widget_shutdown(this); } @@ -80,7 +80,7 @@ class SPViewWidgetClass { /// Virtual method about view size change void (* view_resized) (SPViewWidget *vw, Inkscape::UI::View::View *view, gdouble width, gdouble height); - gboolean (* shutdown) (SPViewWidget *vw); + bool (* shutdown) (SPViewWidget *vw); }; #endif diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index 4ac73e484..1f688fc38 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -94,7 +94,7 @@ RegisteredCheckButton::on_toggled() Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); _wr->setUpdating (true); - gboolean saved = sp_document_get_undo_sensitive (doc); + bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, FALSE); sp_repr_set_boolean(repr, _key.c_str(), _button->get_active()); doc->rroot->setAttribute("sodipodi:modified", "true"); @@ -152,7 +152,7 @@ RegisteredUnitMenu::on_changed() _wr->setUpdating (true); SPDocument *doc = sp_desktop_document(dt); - gboolean saved = sp_document_get_undo_sensitive (doc); + bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, FALSE); Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); repr->setAttribute(_key.c_str(), os.str().c_str()); @@ -220,7 +220,7 @@ RegisteredScalarUnit::on_value_changed() _wr->setUpdating (true); SPDocument *doc = sp_desktop_document(dt); - gboolean saved = sp_document_get_undo_sensitive (doc); + bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, FALSE); Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); repr->setAttribute(_key.c_str(), os.str().c_str()); @@ -395,7 +395,7 @@ RegisteredRadioButtonPair::on_value_changed() bool second = _rb2->get_active(); SPDocument *doc = sp_desktop_document(dt); - gboolean saved = sp_document_get_undo_sensitive (doc); + bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, FALSE); Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); repr->setAttribute(_key.c_str(), second ? "true" : "false"); diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index b7839284a..792c84efb 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -163,7 +163,7 @@ ToleranceSlider::update (double val) _wr->setUpdating (true); SPDocument *doc = sp_desktop_document(dt); - gboolean saved = sp_document_get_undo_sensitive (doc); + bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, FALSE); Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt)); repr->setAttribute(_key.c_str(), os.str().c_str()); diff --git a/src/version.cpp b/src/version.cpp index edaa600db..2812af3d4 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -15,7 +15,7 @@ #include #include "version.h" -gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version) +bool sp_version_from_string(const gchar *string, Inkscape::Version *version) { if (!string) { return FALSE; @@ -34,7 +34,7 @@ gchar *sp_version_to_string(Inkscape::Version version) return g_strdup_printf("%u.%u", version.major, version.minor); } -gboolean sp_version_inside_range(Inkscape::Version version, +bool sp_version_inside_range(Inkscape::Version version, unsigned major_min, unsigned minor_min, unsigned major_max, unsigned minor_max) { diff --git a/src/version.h b/src/version.h index 750ef8e55..7f708c1b8 100644 --- a/src/version.h +++ b/src/version.h @@ -49,9 +49,9 @@ struct Version { #define SP_VERSION_IS_ZERO (v) (!(v).major && !(v).minor) -gboolean sp_version_from_string (const gchar *string, Inkscape::Version *version); +bool sp_version_from_string (const gchar *string, Inkscape::Version *version); gchar *sp_version_to_string (Inkscape::Version version); -gboolean sp_version_inside_range (Inkscape::Version version, +bool sp_version_inside_range (Inkscape::Version version, unsigned major_min, unsigned minor_min, unsigned major_max, unsigned minor_max); diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index f9e854302..e9f44a5d8 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -204,7 +204,7 @@ sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPA } void -sp_button_toggle_set_down (SPButton *button, gboolean down) +sp_button_toggle_set_down (SPButton *button, bool down) { g_return_if_fail (button->type == SP_BUTTON_TYPE_TOGGLE); g_signal_handlers_block_by_func (G_OBJECT (button), (gpointer)G_CALLBACK (sp_button_perform_action), NULL); diff --git a/src/widgets/button.h b/src/widgets/button.h index f14af94d1..0d715053d 100644 --- a/src/widgets/button.h +++ b/src/widgets/button.h @@ -53,7 +53,7 @@ GType sp_button_get_type (void); GtkWidget *sp_button_new (Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips); -void sp_button_toggle_set_down (SPButton *button, gboolean down); +void sp_button_toggle_set_down (SPButton *button, bool down); GtkWidget *sp_button_new_from_data (Inkscape::IconSize size, SPButtonType type, diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index 0514dd393..6e00998f3 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -34,7 +34,7 @@ void sp_desktop_widget_destroy (SPDesktopWidget* dtw); gint sp_desktop_widget_set_focus(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw); -void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show); +void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, bool show); void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw); void sp_desktop_widget_layout(SPDesktopWidget *dtw); void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw); diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index 3177700c3..9e699d0b2 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -276,7 +276,7 @@ sp_gradient_selector_get_vector (SPGradientSelector *sel) static void sp_gradient_selector_vector_set (SPGradientVectorSelector *gvs, SPGradient *gr, SPGradientSelector *sel) { - static gboolean blocked = FALSE; + static bool blocked = FALSE; if (!blocked) { blocked = TRUE; diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 78ae4213d..81462f56a 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -170,7 +170,7 @@ sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr) void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr) { - static gboolean suppress = FALSE; + static bool suppress = FALSE; g_return_if_fail (gvs != NULL); g_return_if_fail (SP_IS_GRADIENT_VECTOR_SELECTOR (gvs)); @@ -418,7 +418,7 @@ sp_gvs_defs_modified (SPObject *defs, guint flags, SPGradientVectorSelector *gvs static GtkWidget *sp_gradient_vector_widget_new (SPGradient *gradient, SPStop *stop); static void sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient); -static gint sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget *dialog); +static bool sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget *dialog); static void sp_gradient_vector_dialog_destroy (GtkObject *object, gpointer data); static void sp_gradient_vector_widget_destroy (GtkObject *object, gpointer data); @@ -428,7 +428,7 @@ static void sp_gradient_vector_color_dragged (SPColorSelector *csel, GtkObject * static void sp_gradient_vector_color_changed (SPColorSelector *csel, GtkObject *object); static void update_stop_list( GtkWidget *mnu, SPGradient *gradient, SPStop *new_stop); -static gboolean blocked = FALSE; +static bool blocked = FALSE; static void grad_edit_dia_stop_added_or_removed (Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, gpointer data) { @@ -1025,7 +1025,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient // Once the user edits a gradient, it stops being auto-collectable if (SP_OBJECT_REPR(gradient)->attribute("inkscape:collect")) { SPDocument *document = SP_OBJECT_DOCUMENT (gradient); - gboolean saved = sp_document_get_undo_sensitive(document); + bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive (document, FALSE); SP_OBJECT_REPR(gradient)->setAttribute("inkscape:collect", NULL); sp_document_set_undo_sensitive (document, saved); @@ -1042,7 +1042,7 @@ sp_gradient_vector_dialog_destroy (GtkObject *object, gpointer data) wd.stop = 0; } -static gboolean +static bool sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget *dialog) { gtk_window_get_position ((GtkWindow *) dlg, &x, &y); diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 264349bd1..0fadffdc8 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -273,7 +273,7 @@ sp_icon_new_full( Inkscape::IconSize lsize, gchar const *name ) addPreRender( lsize, name ); GtkStockItem stock; - gboolean tryLoad = gtk_stock_lookup( name, &stock ); + bool tryLoad = gtk_stock_lookup( name, &stock ); if ( !tryLoad && fallback ) { tryLoad |= strncmp("gtk-", name, 4 ) == 0; } diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 2f42d590f..025e6be66 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -230,7 +230,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) } GtkWidget * -sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, gboolean altx) +sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, bool altx) { GtkTooltips *tt = gtk_tooltips_new(); @@ -262,7 +262,7 @@ sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWi return hb; } -static gboolean aux_set_unit(SPUnitSelector *, +static bool aux_set_unit(SPUnitSelector *, SPUnit const *old, SPUnit const *new_units, GObject *dlg) diff --git a/src/widgets/sp-color-notebook.cpp b/src/widgets/sp-color-notebook.cpp index c14d89f11..b3fe62262 100644 --- a/src/widgets/sp-color-notebook.cpp +++ b/src/widgets/sp-color-notebook.cpp @@ -34,8 +34,8 @@ struct SPColorNotebookTracker { const gchar* className; GType type; guint submode; - gboolean enabledFull; - gboolean enabledBrief; + bool enabledFull; + bool enabledBrief; SPColorNotebook *backPointer; }; @@ -154,7 +154,7 @@ gint ColorNotebook::menuHandler( GdkEvent* event ) static void sp_color_notebook_menuitem_response (GtkMenuItem *menuitem, gpointer user_data) { - gboolean active = FALSE; + bool active = FALSE; active = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menuitem)); SPColorNotebookTracker *entry = reinterpret_cast< SPColorNotebookTracker* > (user_data); @@ -267,7 +267,7 @@ void ColorNotebook::init() gtk_notebook_set_current_page (GTK_NOTEBOOK (_book), prefs_get_int_attribute ("colorselector", "page", 0)); { - gboolean found = FALSE; + bool found = FALSE; _popup = gtk_menu_new(); GtkMenu *menu = GTK_MENU (_popup); @@ -493,7 +493,7 @@ void ColorNotebook::_entryGrabbed (SPColorSelector *, SPColorNotebook *colorbook void ColorNotebook::_entryDragged (SPColorSelector *csel, SPColorNotebook *colorbook) { - gboolean oldState; + bool oldState; ColorNotebook* nb = (ColorNotebook*)(SP_COLOR_SELECTOR(colorbook)->base); oldState = nb->_dragging; @@ -512,7 +512,7 @@ void ColorNotebook::_entryReleased (SPColorSelector *, SPColorNotebook *colorboo void ColorNotebook::_entryChanged (SPColorSelector *csel, SPColorNotebook *colorbook) { - gboolean oldState; + bool oldState; ColorNotebook* nb = (ColorNotebook*)(SP_COLOR_SELECTOR(colorbook)->base); oldState = nb->_dragging; diff --git a/src/widgets/sp-color-notebook.h b/src/widgets/sp-color-notebook.h index ad79437da..dae2767ec 100644 --- a/src/widgets/sp-color-notebook.h +++ b/src/widgets/sp-color-notebook.h @@ -54,9 +54,9 @@ protected: void _rgbaEntryChanged( GtkEntry* entry ); void _updateRgbaEntry( const SPColor& color, gfloat alpha ); - gboolean _updating : 1; - gboolean _updatingrgba : 1; - gboolean _dragging : 1; + bool _updating : 1; + bool _updatingrgba : 1; + bool _dragging : 1; gulong _switchId; gulong _entryId; GtkWidget *_book; diff --git a/src/widgets/sp-color-scales.cpp b/src/widgets/sp-color-scales.cpp index 8acd96bbb..ddfb40a8f 100644 --- a/src/widgets/sp-color-scales.cpp +++ b/src/widgets/sp-color-scales.cpp @@ -214,7 +214,7 @@ sp_color_scales_new (void) return GTK_WIDGET (csel); } -void ColorScales::_recalcColor( gboolean changing ) +void ColorScales::_recalcColor( bool changing ) { if ( changing ) { diff --git a/src/widgets/sp-color-scales.h b/src/widgets/sp-color-scales.h index efb557f9b..e7d94ab37 100644 --- a/src/widgets/sp-color-scales.h +++ b/src/widgets/sp-color-scales.h @@ -53,14 +53,14 @@ protected: void _getCmykaFloatv(gfloat *cmyka); guint32 _getRgba32(); void _updateSliders(guint channels); - void _recalcColor(gboolean changing); + void _recalcColor(bool changing); void _setRangeLimit( gdouble upper ); SPColorScalesMode _mode; gdouble _rangeLimit; - gboolean _updating : 1; - gboolean _dragging : 1; + bool _updating : 1; + bool _dragging : 1; GtkAdjustment *_a[5]; /* Channel adjustments */ GtkWidget *_s[5]; /* Channel sliders */ GtkWidget *_b[5]; /* Spinbuttons */ diff --git a/src/widgets/sp-color-selector.cpp b/src/widgets/sp-color-selector.cpp index 1532eddd7..b4af6bf86 100644 --- a/src/widgets/sp-color-selector.cpp +++ b/src/widgets/sp-color-selector.cpp @@ -171,7 +171,7 @@ SPColorSpaceType ColorSelector::getColorspace() const return type; } -gboolean ColorSelector::setColorspace( SPColorSpaceType colorspace ) +bool ColorSelector::setColorspace( SPColorSpaceType colorspace ) { return false; } @@ -262,14 +262,14 @@ void ColorSelector::_released() } // Called from subclasses to update color and broadcast if needed -void ColorSelector::_updateInternals( const SPColor& color, gfloat alpha, gboolean held ) +void ColorSelector::_updateInternals( const SPColor& color, gfloat alpha, bool held ) { g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) ); - gboolean colorDifferent = ( !sp_color_is_close( &color, &_color, _epsilon ) + bool colorDifferent = ( !sp_color_is_close( &color, &_color, _epsilon ) || ( fabs((_alpha) - (alpha)) >= _epsilon ) ); - gboolean grabbed = held && !_held; - gboolean released = !held && _held; + bool grabbed = held && !_held; + bool released = !held && _held; // Store these before emmiting any signals _held = held; diff --git a/src/widgets/sp-color-selector.h b/src/widgets/sp-color-selector.h index b2fd62b1e..5739f7f15 100644 --- a/src/widgets/sp-color-selector.h +++ b/src/widgets/sp-color-selector.h @@ -32,13 +32,13 @@ public: virtual guint getSubmode() const; virtual SPColorSpaceType getColorspace() const; - virtual gboolean setColorspace( SPColorSpaceType colorspace ); + virtual bool setColorspace( SPColorSpaceType colorspace ); protected: void _grabbed(); void _released(); - void _updateInternals( const SPColor& color, gfloat alpha, gboolean held ); - gboolean _isHeld() const { return _held; } + void _updateInternals( const SPColor& color, gfloat alpha, bool held ); + bool _isHeld() const { return _held; } virtual void _colorChanged( const SPColor& color, gfloat alpha ); @@ -53,7 +53,7 @@ private: ColorSelector( const ColorSelector& obj ); ColorSelector& operator=( const ColorSelector& obj ); - gboolean _held; + bool _held; bool virgin; // if true, no color is set yet }; diff --git a/src/widgets/sp-color-wheel-selector.h b/src/widgets/sp-color-wheel-selector.h index de358d5ac..2e3d7ac12 100644 --- a/src/widgets/sp-color-wheel-selector.h +++ b/src/widgets/sp-color-wheel-selector.h @@ -36,10 +36,10 @@ protected: static void _fooChanged( GtkWidget foo, SPColorWheelSelector *cs ); - void _recalcColor( gboolean changing ); + void _recalcColor( bool changing ); - gboolean _updating : 1; - gboolean _dragging : 1; + bool _updating : 1; + bool _dragging : 1; GtkAdjustment* _adj; /* Channel adjustment */ GtkWidget* _wheel; GtkWidget* _slider; diff --git a/src/widgets/sp-color-wheel.cpp b/src/widgets/sp-color-wheel.cpp index 9038b6d38..bf6510287 100644 --- a/src/widgets/sp-color-wheel.cpp +++ b/src/widgets/sp-color-wheel.cpp @@ -47,8 +47,7 @@ static void sp_color_wheel_render_hue_wheel (SPColorWheel *wheel); static void sp_color_wheel_render_triangle (SPColorWheel *wheel); -static gboolean sp_color_wheel_focus(GtkWidget *widget, - GtkDirectionType direction); +static gboolean sp_color_wheel_focus(GtkWidget *widget, GtkDirectionType direction); static void sp_color_wheel_process_in_triangle( SPColorWheel *wheel, gdouble x, gdouble y ); @@ -226,7 +225,7 @@ void sp_color_wheel_set_color( SPColorWheel *wheel, const SPColor* color ) sp_color_wheel_set_sv(wheel, sat, val); } -gboolean sp_color_wheel_is_adjusting( SPColorWheel *wheel ) +bool sp_color_wheel_is_adjusting( SPColorWheel *wheel ) { g_return_val_if_fail( SP_IS_COLOR_WHEEL(wheel), FALSE ); return wheel->dragging; @@ -335,7 +334,7 @@ sp_color_wheel_button_press (GtkWidget *widget, GdkEventButton *event) gint cx, cw; cx = widget->style->xthickness; cw = widget->allocation.width - 2 * cx; - gboolean grabbed = FALSE; + bool grabbed = FALSE; { double dx = event->x - wheel->_center; @@ -454,7 +453,7 @@ static void sp_color_wheel_set_hue(SPColorWheel *wheel, gdouble hue) static void sp_color_wheel_set_sv( SPColorWheel *wheel, gdouble sat, gdouble value ) { static gdouble epsilon = 1e-6; - gboolean changed = FALSE; + bool changed = FALSE; if ( ABS( wheel->_sat - sat ) > epsilon ) { @@ -1016,7 +1015,7 @@ sp_color_wheel_render_hue_wheel (SPColorWheel *wheel) gint x, y; guint r, g, b; gint size = wheel->_center * 2; - gboolean dirty = FALSE; + bool dirty = FALSE; if (wheel->_image && (wheel->_bs < (size * size) )) { g_free (wheel->_image); @@ -1087,10 +1086,10 @@ sp_color_wheel_render_hue_wheel (SPColorWheel *wheel) static gboolean sp_color_wheel_focus(GtkWidget *widget, GtkDirectionType direction) { - gboolean focusKept = FALSE; - gboolean wasFocused = GTK_WIDGET_HAS_FOCUS(widget); + bool focusKept = FALSE; + bool wasFocused = GTK_WIDGET_HAS_FOCUS(widget); SPColorWheel* wheel = SP_COLOR_WHEEL(widget); - gboolean goingUp = FALSE; + bool goingUp = FALSE; switch ( direction ) { diff --git a/src/widgets/sp-color-wheel.h b/src/widgets/sp-color-wheel.h index d8fceb908..5b01f1a88 100644 --- a/src/widgets/sp-color-wheel.h +++ b/src/widgets/sp-color-wheel.h @@ -29,10 +29,10 @@ struct SPColorWheel { GtkWidget widget; - gboolean dragging : 1; + bool dragging : 1; - gboolean _inTriangle; - gboolean _triDirty; + bool _inTriangle; + bool _triDirty; GdkRegion* _triangle; GdkPoint _triPoints[3]; guchar *_triImage; @@ -64,7 +64,7 @@ GtkWidget *sp_color_wheel_new (); void sp_color_wheel_get_color( SPColorWheel *wheel, SPColor* color ); void sp_color_wheel_set_color( SPColorWheel *wheel, const SPColor* color ); -gboolean sp_color_wheel_is_adjusting( SPColorWheel *wheel ); +bool sp_color_wheel_is_adjusting( SPColorWheel *wheel ); #endif diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp index 14ac51422..893a7a7e0 100644 --- a/src/widgets/spinbutton-events.cpp +++ b/src/widgets/spinbutton-events.cpp @@ -22,7 +22,7 @@ #include "widget-sizes.h" -gboolean +bool spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data) { gdouble *ini; @@ -51,7 +51,7 @@ void spinbutton_defocus (GtkObject *container) { // defocus spinbuttons by moving focus to the canvas, unless "stay" is on - gboolean stay = GPOINTER_TO_INT(gtk_object_get_data (GTK_OBJECT (container), "stay")); + bool stay = GPOINTER_TO_INT(gtk_object_get_data (GTK_OBJECT (container), "stay")); if (stay) { gtk_object_set_data (GTK_OBJECT (container), "stay", GINT_TO_POINTER (FALSE)); } else { @@ -62,7 +62,7 @@ spinbutton_defocus (GtkObject *container) } } -gboolean +bool spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data) { SPWidget *spw = (SPWidget *) data; diff --git a/src/widgets/spinbutton-events.h b/src/widgets/spinbutton-events.h index 868bc195a..eaa999b00 100644 --- a/src/widgets/spinbutton-events.h +++ b/src/widgets/spinbutton-events.h @@ -13,9 +13,9 @@ #include /* GtkWidget */ #include /* GtkObject */ -gboolean spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data); +bool spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data); void spinbutton_undo (GtkWidget *w); -gboolean spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data); +bool spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data); void spinbutton_defocus (GtkObject *container); /* diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index ed9259aef..e42f58954 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -775,7 +775,7 @@ sp_tb_spinbutton( gchar const *path, gchar const *data, gdouble def, GtkWidget *us, GtkWidget *tbl, - gboolean altx, gchar const *altx_mark, + bool altx, gchar const *altx_mark, gdouble lower, gdouble upper, gdouble step, gdouble page, void (*callback)(GtkAdjustment *, GtkWidget *), gdouble climb = 0.1, guint digits = 3, double factor = 1.0) @@ -1155,7 +1155,7 @@ sp_stb_defaults(GtkWidget *widget, GtkWidget *tbl) // fixme: make settable in prefs! gint mag = 5; gdouble prop = 0.5; - gboolean flat = FALSE; + bool flat = FALSE; gdouble randomized = 0; gdouble rounded = 0; diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 10f6101b6..d4eea0835 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -36,9 +36,9 @@ using Inkscape::XML::AttributeRecord; static Document *sp_repr_do_read (xmlDocPtr doc, const gchar *default_ns); static Node *sp_repr_svg_read_node (xmlNodePtr node, const gchar *default_ns, GHashTable *prefix_map); static gint sp_repr_qualified_name (gchar *p, gint len, xmlNsPtr ns, const xmlChar *name, const gchar *default_ns, GHashTable *prefix_map); -static void sp_repr_write_stream_root_element (Node *repr, Writer &out, gboolean add_whitespace, gchar const *default_ns); -static void sp_repr_write_stream (Node *repr, Writer &out, gint indent_level, gboolean add_whitespace, Glib::QueryQuark elide_prefix); -static void sp_repr_write_stream_element (Node *repr, Writer &out, gint indent_level, gboolean add_whitespace, Glib::QueryQuark elide_prefix, List attributes); +static void sp_repr_write_stream_root_element (Node *repr, Writer &out, bool add_whitespace, gchar const *default_ns); +static void sp_repr_write_stream (Node *repr, Writer &out, gint indent_level, bool add_whitespace, Glib::QueryQuark elide_prefix); +static void sp_repr_write_stream_element (Node *repr, Writer &out, gint indent_level, bool add_whitespace, Glib::QueryQuark elide_prefix, List attributes); #ifdef HAVE_LIBWMF static xmlDocPtr sp_wmf_convert (const char * file_name); @@ -539,7 +539,7 @@ sp_repr_save_stream (Document *doc, FILE *fp, gchar const *default_ns, bool comp /* Returns TRUE if file successfully saved; FALSE if not */ -gboolean +bool sp_repr_save_file (Document *doc, const gchar *filename, gchar const *default_ns) { @@ -667,7 +667,7 @@ void populate_ns_map(NSMap &ns_map, Node &repr) { } void -sp_repr_write_stream_root_element (Node *repr, Writer &out, gboolean add_whitespace, gchar const *default_ns) +sp_repr_write_stream_root_element (Node *repr, Writer &out, bool add_whitespace, gchar const *default_ns) { using Inkscape::Util::ptr_shared; g_assert(repr != NULL); @@ -710,7 +710,7 @@ sp_repr_write_stream_root_element (Node *repr, Writer &out, gboolean add_whitesp void sp_repr_write_stream (Node *repr, Writer &out, gint indent_level, - gboolean add_whitespace, Glib::QueryQuark elide_prefix) + bool add_whitespace, Glib::QueryQuark elide_prefix) { if (repr->type() == Inkscape::XML::TEXT_NODE) { repr_quote_write (out, repr->content()); @@ -725,12 +725,12 @@ sp_repr_write_stream (Node *repr, Writer &out, gint indent_level, void sp_repr_write_stream_element (Node * repr, Writer & out, gint indent_level, - gboolean add_whitespace, + bool add_whitespace, Glib::QueryQuark elide_prefix, List attributes) { Node *child; - gboolean loose; + bool loose; gint i; g_return_if_fail (repr != NULL); diff --git a/src/xml/repr.h b/src/xml/repr.h index 7d2f7d474..c30dcf66a 100644 --- a/src/xml/repr.h +++ b/src/xml/repr.h @@ -180,7 +180,7 @@ inline Inkscape::XML::Node *sp_repr_next(Inkscape::XML::Node *repr) { Inkscape::XML::Document *sp_repr_read_file(gchar const *filename, gchar const *default_ns); Inkscape::XML::Document *sp_repr_read_mem(gchar const *buffer, int length, gchar const *default_ns); void sp_repr_save_stream(Inkscape::XML::Document *doc, FILE *to_file, gchar const *default_ns=NULL, bool compress = false); -gboolean sp_repr_save_file(Inkscape::XML::Document *doc, gchar const *filename, gchar const *default_ns=NULL); +bool sp_repr_save_file(Inkscape::XML::Document *doc, gchar const *filename, gchar const *default_ns=NULL); void sp_repr_print(Inkscape::XML::Node *repr); -- 2.30.2