summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f903f7d)
raw | patch | inline | side by side (parent: f903f7d)
author | kidproto <kidproto@users.sourceforge.net> | |
Fri, 25 Aug 2006 07:03:19 +0000 (07:03 +0000) | ||
committer | kidproto <kidproto@users.sourceforge.net> | |
Fri, 25 Aug 2006 07:03:19 +0000 (07:03 +0000) |
need to rethink and incrementally change gbooleans to bools
103 files changed:
diff --git a/src/color.cpp b/src/color.cpp
index 78ef39188a4b1e00734367fbdc5f5e9611e32124..2a6da863c4fd35bffbe2033dcc1389bfe72ca64c 100644 (file)
--- a/src/color.cpp
+++ b/src/color.cpp
/**
* Returns TRUE if c0 or c1 is NULL, or if colors/opacities differ.
*/
-bool
+gboolean
sp_color_is_equal (SPColor const *c0, SPColor const *c1)
{
g_return_val_if_fail (c0 != NULL, TRUE);
* with CMYK aditionally comparing opacity, or if c0 or c1 is NULL.
* \note Do we want the latter?
*/
-bool
+gboolean
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 824604afc95fd1c76f36d12027d853b669dc32b5..2c3f91fe78a39e68d2e6d2dff5314b04b04e1387 100644 (file)
--- a/src/color.h
+++ b/src/color.h
void sp_color_copy (SPColor *dst, const SPColor *src);
-bool sp_color_is_equal (const SPColor *c0, const SPColor *c1);
-bool sp_color_is_close (const SPColor *c0, const SPColor *c1, float epsilon);
+gboolean sp_color_is_equal (const SPColor *c0, const SPColor *c1);
+gboolean 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 0532a76687b29dca413d3efd0cad77b486ec1a17..22ddb54250c2a46c2f99ffe63bf1bb888bdad37c 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
// Don't count this as changes to the document,
// it is basically just llate initialisation.
SPDocument *document = sp_desktop_document(desktop);
- bool saved = sp_document_get_undo_sensitive(document);
+ gboolean saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive(document, FALSE);
bool initialised = false;
index ed0d6aad7c6d79a5c233dd8aeecb7b1605ffe4ee..e38f8a627d34f1b7db0b21a8c4b324b6e9fa9cdc 100644 (file)
}
-static bool
+static gboolean
cc_generic_knot_handler(SPCanvasItem *, GdkEvent *event, SPKnot *knot)
{
g_assert (knot != NULL);
SPConnectorContext *cc = SP_CONNECTOR_CONTEXT(
knot->desktop->event_context);
- bool consumed = FALSE;
+ gboolean consumed = FALSE;
switch (event->type) {
case GDK_ENTER_NOTIFY:
}
-static bool
+static gboolean
endpt_handler(SPKnot *knot, GdkEvent *event, SPConnectorContext *cc)
{
g_assert( SP_IS_CONNECTOR_CONTEXT(cc) );
- bool consumed = FALSE;
+ gboolean consumed = FALSE;
switch (event->type) {
case GDK_BUTTON_PRESS:
index 7cae37a933cf2d926416092b977561deb5e84575..5f6c557f14ac01c8d588c326ea09424a839436b5 100644 (file)
}
-static bool
+static gboolean
clonetiler_dialog_delete (GtkObject *object, GdkEvent * /*event*/, gpointer data)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
index 983024d105659d6184413054c79dfec116757e34..deabcf3839438e6df6f64730e5e82079fbcf66f1 100644 (file)
* \brief This function is called to zero the transientize semaphore by a
* timeout.
*/
-bool
+gboolean
sp_allow_again (gpointer *wd)
{
((win_data *) wd)->stop = 0;
-bool
+gboolean
sp_dialog_event_handler (GtkWindow *win, GdkEvent *event, gpointer data)
{
return FALSE;
}
- bool ret = FALSE;
+ gboolean ret = FALSE;
switch (event->type) {
gtk_widget_show (w);
}
-bool
+gboolean
sp_dialog_hide (GtkObject *object, gpointer data)
{
GtkWidget *dlg = (GtkWidget *) data;
-bool
+gboolean
sp_dialog_unhide (GtkObject *object, gpointer data)
{
GtkWidget *dlg = (GtkWidget *) data;
index a86ac0b9bf6d39610ef16f34d6ad09ac33448f25..7cc64c6a22d7c88209f21b2d1536eeece3042ff4 100644 (file)
} win_data;
-bool sp_dialog_event_handler ( GtkWindow *win,
+gboolean sp_dialog_event_handler ( GtkWindow *win,
GdkEvent *event,
gpointer data );
void on_dialog_hide (GtkWidget *w);
void on_dialog_unhide (GtkWidget *w);
-bool sp_dialog_hide (GtkObject *object, gpointer data);
-bool sp_dialog_unhide (GtkObject *object, gpointer data);
+gboolean sp_dialog_hide (GtkObject *object, gpointer data);
+gboolean sp_dialog_unhide (GtkObject *object, gpointer data);
#endif
index 67e949d35113d5f5cbc0491636d4708af072b351..ca9ce5f6ca663e8a30816bb1db0899bc70f678e1 100644 (file)
/*#################################
# U T I L I T Y
#################################*/
-static bool
+static gboolean
win32_is_os_wide()
{
- static bool initialized = FALSE;
- static bool is_wide = FALSE;
+ static gboolean initialized = FALSE;
+ static gboolean is_wide = FALSE;
static OSVERSIONINFOA osver;
if ( !initialized )
diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp
index c5d2e6eed036a2833f521214b4b010b74b92c87c..f3efeed81329bba0fb4af6b8777e3a7e56f27285 100644 (file)
--- a/src/dialogs/find.cpp
+++ b/src/dialogs/find.cpp
-static bool sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer data)
+static gboolean 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);
GtkWidget *
-sp_find_types_checkbox (GtkWidget *w, const gchar *data, bool active,
+sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active,
GtkTooltips *tt, const gchar *tip,
const gchar *label,
void (*toggled)(GtkToggleButton *, gpointer))
}
GtkWidget *
-sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, bool active,
+sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean 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 643a4a7640d9879090cbd7d38ac4417e0afad053..eac3a0c5a549b794aa8dde82491792dfba80aa7c 100644 (file)
--- a/src/dialogs/input.cpp
+++ b/src/dialogs/input.cpp
wd.stop = 0;
}
-static bool
+static gboolean
sp_input_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
index 78482018b0fb34a61542d429f9e7c9b173606c06..6f12a48f12a3d3225011aa9c6ac687186c5248e3 100644 (file)
wd.stop = 0;
}
-static bool
+static gboolean
sp_item_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
index 7f326f476e21cc95b840b6199bdb263f4137a3c9..a4dd49aebe8713b4dd060529e63f2fe3d2995831 100644 (file)
wd.stop = 0;
}
-static bool
+static gboolean
sp_object_properties_dialog_delete ( GtkObject *object,
GdkEvent *event,
gpointer data )
index 6dcb80499831703f408331be1ccfb19ebf412da2..80099eb82718809fa03371e46b4f87555abe4310 100644 (file)
/* TODO: annotate */ "stroke-style.cpp:889");
}
-static bool stroke_width_set_unit(SPUnitSelector *,
+static gboolean stroke_width_set_unit(SPUnitSelector *,
SPUnit const *old,
SPUnit const *new_units,
GObject *spw)
index 10f30e64b735e0938e144484a7da4b815c7c2938..1f5ae5c7cc526786ba641e0c91af66b81f86bdd1 100644 (file)
--- a/src/dialogs/swatches.cpp
+++ b/src/dialogs/swatches.cpp
}
//"drag-drop"
-// bool dragDropColorData( GtkWidget *widget,
+// gboolean dragDropColorData( GtkWidget *widget,
// GdkDragContext *drag_context,
// gint x,
// gint y,
index f37cc645f43c67a3ecf51b2b29ee4996f15c6c09..8ea0a72368c288ea529ba546c35829e168faff0a 100644 (file)
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, bool style, bool content);
+static void sp_text_edit_dialog_read_selection (GtkWidget *dlg, gboolean style, gboolean 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);
-static bool
+static gboolean
sp_text_edit_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
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.
*/
-bool
+gboolean
text_view_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data)
{
GObject *dlg = (GObject *) data;
return FALSE;
}
-bool
+gboolean
text_view_focus_out (GtkWidget *w, GdkEventKey *event, gpointer data)
{
GObject *dlg = (GObject *) data;
guint flags,
GtkWidget *dlg )
{
- bool style, content;
+ gboolean style, content;
style =
((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG |
static void
sp_text_edit_dialog_read_selection ( GtkWidget *dlg,
- bool dostyle,
- bool docontent )
+ gboolean dostyle,
+ gboolean docontent )
{
if (g_object_get_data (G_OBJECT (dlg), "blocked"))
return;
index bcd3b31f7f15c6599016b3a8e5e7135b56171437..e515a3f37440f3eb3d5cef0beaaff6e0873b57bd 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
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 bool on_delete(GtkObject *object, GdkEvent *event, gpointer data);
+static gboolean 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);
static void cmd_delete_attr(GtkObject *object, gpointer data);
static void cmd_set_attr(GtkObject *object, gpointer data);
-static bool sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event);
+static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event);
/*
} // end of sp_xml_tree_dialog()
-static bool sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event)
+static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event)
{
unsigned int shortcut = get_group0_keyval(event) |
-static bool on_delete(GtkObject *object, GdkEvent *event, gpointer data)
+static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data)
{
gtk_window_get_position((GtkWindow *) dlg, &x, &y);
gtk_window_get_size((GtkWindow *) dlg, &w, &h);
}
-bool xml_tree_node_mutable(GtkCTreeNode *node)
+gboolean 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)
{
- bool indentable = FALSE;
+ gboolean indentable = FALSE;
if (xml_tree_node_mutable(node)) {
Inkscape::XML::Node *repr, *prev;
index 8a999fe42005b5a6794d6f0638d5cbd62e891b73..2d192ac1b222afa98405e5a371d680cb4b458a79 100644 (file)
}
void
-sp_canvas_arena_set_sticky (SPCanvasArena *ca, bool sticky)
+sp_canvas_arena_set_sticky (SPCanvasArena *ca, gboolean sticky)
{
g_return_if_fail (ca != NULL);
g_return_if_fail (SP_IS_CANVAS_ARENA (ca));
index a2728a7b5cc693a2601056331554ad4c34582d89..805bee60a08836f8d94daeb67f95fb92b0b81513 100644 (file)
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, bool sticky);
+void sp_canvas_arena_set_sticky (SPCanvasArena *ca, gboolean sticky);
void sp_canvas_arena_render_pixblock (SPCanvasArena *ca, NRPixBlock *pb);
diff --git a/src/document-undo.cpp b/src/document-undo.cpp
index 226183bda8185752d2a8b6cd62427908ee238084..09bb4e85729da13d2927cbdc5ce37bde63e5841c 100644 (file)
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
* Since undo sensitivity needs to be nested, setting undo sensitivity
* should be done like this:
*\verbatim
- bool saved = sp_document_get_undo_sensitive(document);
+ gboolean 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, bool sensitive)
+sp_document_set_undo_sensitive (SPDocument *doc, gboolean sensitive)
{
g_assert (doc != NULL);
g_assert (doc->priv != NULL);
doc->priv->sensitive = !!sensitive;
}
-bool sp_document_get_undo_sensitive(SPDocument const *document) {
+gboolean sp_document_get_undo_sensitive(SPDocument const *document) {
g_assert(document != NULL);
g_assert(document->priv != NULL);
}
-bool
+gboolean
sp_document_undo (SPDocument *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
- bool ret;
+ gboolean ret;
EventTracker<SimpleEvent<Inkscape::Debug::Event::DOCUMENT> > tracker("undo");
return ret;
}
-bool
+gboolean
sp_document_redo (SPDocument *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
- bool ret;
+ gboolean ret;
EventTracker<SimpleEvent<Inkscape::Debug::Event::DOCUMENT> > tracker("redo");
diff --git a/src/document.cpp b/src/document.cpp
index 04d3a147c3e711768c469eb9633210af8ead2efd..20bbeb73e10d9ea9f5eb82f2ccac2e236933499d 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
// Update saveable repr attributes.
Inkscape::XML::Node *repr = sp_document_repr_root(document);
// changing uri in the document repr must not be not undoable
- bool saved = sp_document_get_undo_sensitive(document);
+ gboolean saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive(document, FALSE);
if (document->base)
repr->setAttribute("sodipodi:docbase", document->base);
guaranteed to be lower than upto).
*/
SPItem*
-find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, bool into_groups, bool take_insensitive = false, SPItem *upto = NULL)
+find_item_at_point(unsigned int dkey, SPGroup *group, NR::Point const p, gboolean 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,
- bool const into_groups, SPItem *upto)
+ gboolean 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 */
-bool
+gboolean
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;
}
-bool
+gboolean
sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *object)
{
GSList *rlist;
diff --git a/src/document.h b/src/document.h
index f29804db0f43e3a6475ae113153735f4c9d77bda..b0afba5ec50e05e7b914eb0cf64ad5845f8a33ae 100644 (file)
--- 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, bool sensitive);
-bool sp_document_get_undo_sensitive (SPDocument const * document);
+void sp_document_set_undo_sensitive (SPDocument * document, gboolean sensitive);
+gboolean 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 */
-bool sp_document_undo (SPDocument * document);
-bool sp_document_redo (SPDocument * document);
+gboolean sp_document_undo (SPDocument * document);
+gboolean sp_document_redo (SPDocument * document);
/* Resource management */
-bool sp_document_add_resource (SPDocument *document, const gchar *key, SPObject *object);
-bool sp_document_remove_resource (SPDocument *document, const gchar *key, SPObject *object);
+gboolean sp_document_add_resource (SPDocument *document, const gchar *key, SPObject *object);
+gboolean 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, bool into_groups, SPItem *upto = NULL);
+SPItem * sp_document_item_at_point (SPDocument *document, unsigned int key, NR::Point const p, gboolean 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 ce016aabbeb24a70ea6a2ec122fc9d105519becc..b06e94a48f0eccf8429af96ae0ec9e284dd24560 100644 (file)
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
* Creates an anchor object and initializes it.
*/
SPDrawAnchor *
-sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, bool start, NR::Point delta)
+sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point delta)
{
SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(dc);
* pointer to it or NULL.
*/
SPDrawAnchor *
-sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, bool activate)
+sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate)
{
SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc);
diff --git a/src/draw-anchor.h b/src/draw-anchor.h
index 3662451a6023f886647833826e4dc24b67e57b8f..1036a5472d85b9e35099d2babe2cea8f84e7a6ca 100644 (file)
--- a/src/draw-anchor.h
+++ b/src/draw-anchor.h
};
-SPDrawAnchor *sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, bool start,
+SPDrawAnchor *sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start,
NR::Point delta);
SPDrawAnchor *sp_draw_anchor_destroy(SPDrawAnchor *anchor);
-SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, bool activate);
+SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate);
#endif /* !SEEN_DRAW_ANCHOR_H */
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index d94681703fad3de43d19cbd4f7968e7aba21e4aa..bb1f56044b0813eddb55a8d905093128f5623d0a 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
* Invoke _flush_white to write result back to object.
*/
void
-spdc_concat_colors_and_flush(SPDrawContext *dc, bool forceclosed)
+spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean forceclosed)
{
/* Concat RBG */
SPCurve *c = dc->green_curve;
diff --git a/src/draw-context.h b/src/draw-context.h
index ded91328342598c810463c2752b5c99f87420ee0..59ec5a92fe18ee6b7eb28432d0caf10813851139 100644 (file)
--- a/src/draw-context.h
+++ b/src/draw-context.h
GSList *green_bpaths;
SPCurve *green_curve;
SPDrawAnchor *green_anchor;
- bool green_closed; // a flag meaning we hit the green anchor, so close the path on itself
+ gboolean green_closed; // a flag meaning we hit the green anchor, so close the path on itself
/* White */
SPItem *white_item;
GType sp_draw_context_get_type(void);
SPDrawAnchor *spdc_test_inside(SPDrawContext *dc, NR::Point p);
-void spdc_concat_colors_and_flush(SPDrawContext *dc, bool forceclosed);
+void spdc_concat_colors_and_flush(SPDrawContext *dc, gboolean 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);
index 741513fa3742a6ed7293c25b5e316797e7682a81..3233198f606ecef0a60322deab9ce52b2372fe33 100644 (file)
static void set_to_accumulated(SPDynaDrawContext *dc);
static void accumulate_calligraphic(SPDynaDrawContext *dc);
-static void fit_and_split(SPDynaDrawContext *ddc, bool release);
-static void fit_and_split_calligraphics(SPDynaDrawContext *ddc, bool release);
+static void fit_and_split(SPDynaDrawContext *ddc, gboolean release);
+static void fit_and_split_calligraphics(SPDynaDrawContext *ddc, gboolean 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);
}
-static bool
+static gboolean
sp_dyna_draw_apply(SPDynaDrawContext *dc, NR::Point p)
{
NR::Point n = sp_dyna_draw_get_npoint(dc, p);
static void
fit_and_split(SPDynaDrawContext *dc,
- bool release)
+ gboolean release)
{
fit_and_split_calligraphics(dc, release);
}
}
static void
-fit_and_split_calligraphics(SPDynaDrawContext *dc, bool release)
+fit_and_split_calligraphics(SPDynaDrawContext *dc, gboolean 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 e52600f8aebaabc55907108833b5b8d8cff3b0b7..756fff96476176b47152d6026bef25b6b5ed0f46 100644 (file)
--- a/src/extension/init.cpp
+++ b/src/extension/init.cpp
#include "prefs-utils.h"
#include "io/sys.h"
-extern bool inkscape_app_use_gui( Inkscape::Application const *app );
+extern gboolean inkscape_app_use_gui( Inkscape::Application const *app );
namespace Inkscape {
namespace Extension {
{
gchar const *pref = prefs_get_string_attribute(pref_path,pref_attr);
/*
- bool missing=TRUE;
+ gboolean missing=TRUE;
for (GSList *list = extension_family; list; list = g_slist_next(list)) {
g_assert( list->data );
index aaa3f141540dd0c28d4e0aab72925af21b9efd1c..68eb31e7bb0acfc0f6cd9d1cb851a9dd7c7d6492 100644 (file)
--- a/src/extension/input.cpp
+++ b/src/extension/input.cpp
if (doc != NULL) {
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
- bool saved = sp_document_get_undo_sensitive(doc);
+ gboolean 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);
index b4a3f89047f28b44664d3fa4c07fcfe2d7ee019e..01387ca190cad6f0aa8d5a4500d269b05cad7825 100644 (file)
unsigned int
PrintPS::begin(Inkscape::Extension::Print *mod, SPDocument *doc)
{
- bool epsexport = false;
+ gboolean epsexport = false;
_latin1_encoded_fonts.clear();
_newlatin1font_proc_defined = false;
index 55ba10ff97017e065127f0b49f2966e74c882430..ab9c59830f99df36bf2cf958884af4ec25c25e5d 100644 (file)
gchar *save_path = g_path_get_dirname (uri);
- bool const spns = (!mod->get_id()
+ gboolean 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));
Inkscape::IO::fixupHrefs( doc, save_path, spns );
- bool const s = sp_repr_save_file (sp_repr_document (repr), uri, SP_SVG_NS_URI);
+ gboolean const s = sp_repr_save_file (sp_repr_document (repr), uri, SP_SVG_NS_URI);
if (s == FALSE) {
throw Inkscape::Extension::Output::save_failed();
}
index 1ea51f6b990c245b0459d7cbb0069aebecf5e70e..51dbd3a00f09a8e66ff91cb943b4eb68dda40133 100644 (file)
/* Platform detection */
-bool
+gboolean
PrintWin32::is_os_wide()
{
- static bool initialized = FALSE;
- static bool is_wide = FALSE;
+ static gboolean initialized = FALSE;
+ static gboolean is_wide = FALSE;
static OSVERSIONINFOA osver;
if ( !initialized )
index 96b68f075b5afbb046b3b3b6824393fdc62dd9c2..d46b5b2fbab0441d238d2a95e2a7963daba4b0ac 100644 (file)
static void init (void);
/* Platform detection */
- static bool is_os_wide();
+ static gboolean is_os_wide();
/* Print functions */
virtual unsigned int setup (Inkscape::Extension::Print * module);
index 482d6c5eaf98ce4a0af328cdb14c4d5f489a3adb..41d6e7513666a94e1f75166e02e974f2ff0c3e24 100644 (file)
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
/* 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);
- bool saved = sp_document_get_undo_sensitive(doc);
+ gboolean 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 9b2b803c6346bef554e9b89138abdf6689fe5780..de8ab2b5dca10285da5f7dc6a333c7da185d8d36 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
}
-void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, bool spns )
+void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, gboolean spns )
{
//g_message("Inkscape::IO::fixupHrefs( , [%s], )", base );
@@ -1125,7 +1125,7 @@ void Inkscape::IO::fixupHrefs( SPDocument *doc, const gchar *base, bool spns )
try
{
URI uri(things[i]);
- bool isAbs = g_path_is_absolute( things[i] );
+ gboolean 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, bool spns )
if ( redo == NULL )
{
URI again = URI::fromUtf8( things[i] );
- bool isAbs = g_path_is_absolute( things[i] );
+ gboolean 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 19835ae3846d2e0971fa7307a2d977080e01542d..18e4068a1535819cee2562e1acce68ce31c68cdd 100644 (file)
--- a/src/file.h
+++ b/src/file.h
namespace Inkscape {
namespace IO {
-void fixupHrefs( SPDocument *doc, const gchar *uri, bool spns );
+void fixupHrefs( SPDocument *doc, const gchar *uri, gboolean spns );
}
}
index bbda0a7c5efc75a1c878ce6b7675ec9d6b0a419c..34a2b63443f15e93e6f3987f5bd0687aa0bbd23b 100644 (file)
--- a/src/helper/unit-menu.cpp
+++ b/src/helper/unit-menu.cpp
struct SPUnitSelectorClass {
GtkHBoxClass parent_class;
- bool (* set_unit)(SPUnitSelector *us, SPUnit const *old, SPUnit const *new_unit);
+ gboolean (* set_unit)(SPUnitSelector *us, SPUnit const *old, SPUnit const *new_unit);
};
enum {SET_UNIT, LAST_SIGNAL};
us->update = TRUE;
- bool consumed = FALSE;
+ gboolean consumed = FALSE;
g_signal_emit(G_OBJECT(us), signals[SET_UNIT], 0, old, unit, &consumed);
if ( !consumed
gtk_object_unref(GTK_OBJECT(adj));
}
-bool
+gboolean
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 9407afa3f2acf3af70366ff235861f8d6f666437..bf5bb260eeb02b40bfd0460aa1bdc66afdd7653e 100644 (file)
--- a/src/helper/unit-menu.h
+++ b/src/helper/unit-menu.h
void sp_unit_selector_add_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment);
void sp_unit_selector_remove_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment);
-bool sp_unit_selector_update_test(SPUnitSelector const *selector);
+gboolean 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 af9560d7d7fcd6e963e6c39cf774bb1efb3e0f67..448f60302ddc1b5a0f3e561c7856ef95df47288f 100644 (file)
--- a/src/helper/units.cpp
+++ b/src/helper/units.cpp
/* These are pure utility */
/* Return TRUE if conversion is possible */
-bool
+gboolean
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 4746fcccaaa2dbfe6182140a889c3ee3c256b075..3acb6582855f0da4cc6cb587f65768a9abeff3e1 100644 (file)
--- a/src/helper/units.h
+++ b/src/helper/units.h
/* These are pure utility */
/* Return TRUE if conversion is possible, FALSE if unit bases differ */
-bool sp_convert_distance (gdouble *distance, const SPUnit *from, const SPUnit *to);
+gboolean 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 7bfc28b9234dcef3e9b700703b687b7742873889..346bd19f16d617226f2354edede9bc8eea424337 100644 (file)
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
#include "desktop.h"
#include "event-context.h"
-static bool
+static gboolean
sp_window_key_press (GtkWidget *widget, GdkEventKey *event)
{
unsigned int shortcut;
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index f976f668220d9b9116fe25d7ecc58047d6482423..d3cc1aa0064a3e748d5b78f15da76a9102e9c6ca 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
# FORWARD DECLARATIONS
################################*/
-bool inkscape_app_use_gui( Inkscape::Application const * app );
+gboolean inkscape_app_use_gui( Inkscape::Application const * app );
static void inkscape_class_init (Inkscape::ApplicationClass *klass);
static void inkscape_init (SPObject *object);
GSList *documents;
GSList *desktops;
gchar *argv0;
- bool dialogs_toggle;
- bool use_gui; // may want to consider a virtual function
+ gboolean dialogs_toggle;
+ gboolean use_gui; // may want to consider a virtual function
// for overriding things like the warning dlg's
};
void
-inkscape_application_init (const gchar *argv0, bool use_gui)
+inkscape_application_init (const gchar *argv0, gboolean use_gui)
{
inkscape = (Inkscape::Application *)g_object_new (SP_TYPE_INKSCAPE, NULL);
/* fixme: load application defaults */
return inkscape;
}
-bool inkscape_app_use_gui( Inkscape::Application const * app )
+gboolean inkscape_app_use_gui( Inkscape::Application const * app )
{
return app->use_gui;
}
diff --git a/src/inkscape.h b/src/inkscape.h
index 79e2b02340bf5942eadbe5016d97689d1cb0d812..12f101901873a7629d4303020f54a9e861e802ff 100644 (file)
--- a/src/inkscape.h
+++ b/src/inkscape.h
#define INKSCAPE inkscape_get_instance()
-void inkscape_application_init (const gchar *argv0, bool use_gui);
+void inkscape_application_init (const gchar *argv0, gboolean 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 0b2c80845efef5f3192627511d18f63af0346a46..b31853cf3246c13877d9db892960282823deb5d1 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
};
void
-sp_create_window(SPViewWidget *vw, bool editable)
+sp_create_window(SPViewWidget *vw, gboolean editable)
{
g_return_if_fail(vw != NULL);
g_return_if_fail(SP_IS_VIEW_WIDGET(vw));
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, bool with_mnemonic = TRUE )
+ gpointer data, gboolean with_mnemonic = TRUE )
{
GtkWidget *item;
else
pref_path = g_strconcat("window.", pref, NULL);
- bool checked = gtk_check_menu_item_get_active(menuitem);
+ gboolean checked = gtk_check_menu_item_get_active(menuitem);
prefs_set_int_attribute(pref_path, "state", checked);
reinterpret_cast<SPDesktop*>(view)->layoutWidget();
}
-static bool
+static gboolean
checkitem_update(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
{
GtkCheckMenuItem *menuitem=GTK_CHECK_MENU_ITEM(widget);
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),
- bool (*callback_update)(GtkWidget *widget, GdkEventExpose *event, gpointer user_data),
+ gboolean (*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 becaf67b35530b00969553f169692168da4ea157..099fdd27712950324c09f548bdb629a5f69de0bc 100644 (file)
--- a/src/interface.h
+++ b/src/interface.h
/**
* Create a new document window.
*/
-void sp_create_window (SPViewWidget *vw, bool editable);
+void sp_create_window (SPViewWidget *vw, gboolean editable);
/**
*
diff --git a/src/knot.cpp b/src/knot.cpp
index dd773ca75e3f01ed8d25f2b9140fd336e6538156..a8d694779bb7991af1d421f7228e94ed06bf5e99 100644 (file)
--- a/src/knot.cpp
+++ b/src/knot.cpp
g_object_ref(knot);
tolerance = prefs_get_int_attribute_limited("options.dragtolerance", "value", 0, 0, 100);
- bool consumed = FALSE;
+ gboolean consumed = FALSE;
/* Run client universal event handler, if present */
g_return_if_fail(knot != NULL);
g_return_if_fail(SP_IS_KNOT(knot));
- bool done = FALSE;
+ gboolean done = FALSE;
g_signal_emit(knot,
knot_signals[REQUEST], 0,
diff --git a/src/knotholder.h b/src/knotholder.h
index 544ead7953e9cece5dce26c84e111ce896669f00..971dae3b0747a2036ebe338ea6d32ef74bb47957 100644 (file)
--- a/src/knotholder.h
+++ b/src/knotholder.h
Inkscape::XML::Node *repr; ///< repr of the item, for setting and releasing listeners.
- bool local_change; ///< if true, no need to recreate knotholder if repr was changed.
+ gboolean 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 9b6756ac66b215513c0a9b20767d0256d356ab39..6e184f4d713380a762335b55815b0d18b77506a1 100644 (file)
--- 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 bool sp_global_slideshow = FALSE;
+static gboolean sp_global_slideshow = FALSE;
static gchar *sp_export_png = NULL;
static gchar *sp_export_dpi = NULL;
static gchar *sp_export_area = NULL;
-static bool sp_export_area_drawing = FALSE;
-static bool sp_export_area_canvas = FALSE;
+static gboolean sp_export_area_drawing = FALSE;
+static gboolean 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 bool sp_export_area_snap = FALSE;
-static bool sp_export_use_hints = FALSE;
-static bool sp_export_id_only = FALSE;
+static gboolean sp_export_area_snap = FALSE;
+static gboolean sp_export_use_hints = FALSE;
+static gboolean 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 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 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 gchar *sp_query_id = NULL;
static int sp_new_gui = FALSE;
-static bool sp_vacuum_defs = FALSE;
+static gboolean sp_vacuum_defs = FALSE;
static gchar *sp_export_png_utf8 = NULL;
static gchar *sp_export_svg_utf8 = NULL;
Inkscape::Debug::Logger::init();
- bool use_gui;
+ gboolean use_gui;
#ifndef WIN32
use_gui = (getenv("DISPLAY") != NULL);
#else
filename = 0;
if (!sp_global_slideshow) {
- bool create_new = TRUE;
+ gboolean 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 603294e14992e375f4887c35e6909337ec1ba28c..3142e5b0eae313f7d112e5d6580387e9a7d46f40 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
bool is_interactive, gpointer data)
{
SPItem *item = NULL;
- bool changed = FALSE;
+ gboolean changed = FALSE;
g_assert(data);
SPNodeContext *nc = ((SPNodeContext *) data);
diff --git a/src/node-context.h b/src/node-context.h
index a4086da2b7c09d1c6ed9d5636291642a5828f0d9..a9b4beb07614b37402a188dafff64d787230d65a 100644 (file)
--- a/src/node-context.h
+++ b/src/node-context.h
Inkscape::NodePath::Path *nodepath;
- bool leftalt;
- bool rightalt;
- bool leftctrl;
- bool rightctrl;
+ gboolean leftalt;
+ gboolean rightalt;
+ gboolean leftctrl;
+ gboolean 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 3f76a6548e1a603db04ecdb15f8f917fe5344d53..3398ac1a1267bfd78eae70754fb2e71195ffa5e6 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
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, bool incremental, bool override);
+static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, gboolean incremental, gboolean override);
-static void sp_node_set_selected(Inkscape::NodePath::Node *node, bool selected);
+static void sp_node_set_selected(Inkscape::NodePath::Node *node, gboolean 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);
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 bool node_request(SPKnot *knot, NR::Point *p, guint state, gpointer data);
+static gboolean 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 bool node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data);
+static gboolean 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 bool node_handle_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n);
+static gboolean 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, bool show_handle, bool fire_move_signals)
+static void sp_node_update_handle(Inkscape::NodePath::Node *node, gint which, gboolean 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);
}
- bool show_handles = node->selected;
+ gboolean 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);
- bool force = FALSE;
+ gboolean force = FALSE;
if (!(e->selected && (!e->p.other || e->p.other->selected))) {
force = TRUE;
}
- sp_nodepath_node_select(e, (bool) toggle, force);
+ sp_nodepath_node_select(e, (gboolean) toggle, force);
if (e->p.other)
sp_nodepath_node_select(e->p.other, TRUE, force);
if (a->subpath->closed) {
- bool reversed = FALSE;
+ gboolean reversed = FALSE;
//Since we can go in a circle, we need to find the shorter distance.
// a->b or b->a
/**
* Change select status of node, update its own and neighbour handles.
*/
-static void sp_node_set_selected(Inkscape::NodePath::Node *node, bool selected)
+static void sp_node_set_selected(Inkscape::NodePath::Node *node, gboolean selected)
{
node->selected = selected;
@@ -2303,7 +2303,7 @@ static void sp_node_set_selected(Inkscape::NodePath::Node *node, bool selected)
\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, bool incremental, bool override)
+static void sp_nodepath_node_select(Inkscape::NodePath::Node *node, gboolean incremental, gboolean override)
{
Inkscape::NodePath::Path *nodepath = node->subpath->nodepath;
/**
* \brief Select all nodes that are within the rectangle.
*/
-void sp_nodepath_select_rect(Inkscape::NodePath::Path *nodepath, NR::Rect const &b, bool incremental)
+void sp_nodepath_select_rect(Inkscape::NodePath::Path *nodepath, NR::Rect const &b, gboolean incremental)
{
if (!incremental) {
sp_nodepath_deselect(nodepath);
/**
* Node event callback.
*/
-static bool node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n)
+static gboolean node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n)
{
- bool ret = FALSE;
+ gboolean ret = FALSE;
switch (event->type) {
case GDK_ENTER_NOTIFY:
active_node = n;
@@ -2902,7 +2902,7 @@ static bool node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *
/**
* Handle keypress on node; directly called.
*/
-bool node_key(GdkEvent *event)
+gboolean node_key(GdkEvent *event)
{
Inkscape::NodePath::Path *np;
* Callback for node "request" signal.
* \todo fixme: This goes to "moved" event? (lauris)
*/
-static bool
+static gboolean
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;
- bool collinear = FALSE;
+ gboolean collinear = FALSE;
NR::Point c;
NR::Point pr;
/**
* Node handle "request" signal callback.
*/
-static bool node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data)
+static gboolean 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 bool node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePath::Node *n)
+static gboolean node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePath::Node *n)
{
- bool ret = FALSE;
+ gboolean ret = FALSE;
switch (event->type) {
case GDK_KEY_PRESS:
switch (get_group0_keyval (&event->key)) {
@@ -3449,7 +3449,7 @@ static bool node_handle_event(SPKnot *knot, GdkEvent *event,Inkscape::NodePath::
}
static void node_rotate_one_internal(Inkscape::NodePath::Node const &n, gdouble const angle,
- Radial &rme, Radial &rother, bool const both)
+ Radial &rme, Radial &rother, gboolean 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, bool const both)
+ Radial &rme, Radial &rother, gboolean 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, bool screen)
+static void node_rotate_one (Inkscape::NodePath::Node *n, gdouble angle, int which, gboolean screen)
{
Inkscape::NodePath::NodeSide *me, *other;
bool both = false;
diff --git a/src/nodepath.h b/src/nodepath.h
index edce23f76886bafffefe3ff47728420020dff539..21c2957aa92f3d36a057446b88b760ed63cc72d3 100644 (file)
--- a/src/nodepath.h
+++ b/src/nodepath.h
/** The parent of this subpath */
Path * nodepath;
/** Is this path closed (no endpoints) or not?*/
- bool closed;
+ gboolean 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, bool incremental);
+void sp_nodepath_select_rect (Inkscape::NodePath::Path * nodepath, NR::Rect const &b, gboolean incremental);
GList *save_nodepath_selection (Inkscape::NodePath::Path *nodepath);
void restore_nodepath_selection (Inkscape::NodePath::Path *nodepath, GList *r);
-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);
+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);
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 82037fde36054e1b8c1bc5e3aea9174a158c63c6..0c35020b775e10141f2867be5b0503ca219535df 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
#include "desktop-handles.h"
/* Helper functions for sp_selected_path_to_curves */
-static void sp_selected_path_to_curves0(bool do_document_done, guint32 text_grouping_policy);
+static void sp_selected_path_to_curves0(gboolean 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. */
}
static void
-sp_selected_path_to_curves0(bool interactive, guint32 text_grouping_policy)
+sp_selected_path_to_curves0(gboolean interactive, guint32 text_grouping_policy)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 30cd84180c9db042f5368ea5903bd79b7f568bd8..c1d7af150f53aed7d56b9e3a19a48134a148aae7 100644 (file)
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
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, bool closed);
+static void spdc_pen_finish(SPPenContext *pc, gboolean 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, bool const closed)
+spdc_pen_finish(SPPenContext *const pc, gboolean const closed)
{
SPDesktop *const desktop = pc->desktop;
pc->_message_context->clear();
diff --git a/src/selection.cpp b/src/selection.cpp
index 3e4c622c1573848c8e4d412ce63c1805c8c24b81..a27e45cb290280da0e57ed6b6fa577c38f156601 100644 (file)
--- a/src/selection.cpp
+++ b/src/selection.cpp
this->_flags |= flags;
}
-bool
+gboolean
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 29fcbf361f36a68ba298649f4466ef20c31f0b5a..1dcaa53ff3d836082dc63d253d128dcd6171b524 100644 (file)
--- a/src/selection.h
+++ b/src/selection.h
void operator=(Selection const &);
/** @brief Issues modification notification signals */
- static bool _emit_modified(Selection *selection);
+ static gboolean _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 8e3851f2e5034c386bd7e3c983eebdecd8bfb05f..0afa552ea0183b45398970566c59d3b42a13fa82 100644 (file)
--- a/src/seltrans-handles.h
+++ b/src/seltrans-handles.h
class SPSelTransHandle;
// request handlers
-bool sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &p, guint state);
-bool sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &p, guint state);
-bool sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &p, guint state);
-bool sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &p, guint state);
-bool sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &p, guint state);
// action handlers
GdkCursorType cursor;
guint control;
void (* action) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
- bool (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
+ gboolean (* 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 31e69f7ad997a541f694e765d83a062faff631c7..675cb672eb49b30fd9dece44266d4add71005c4d 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
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 bool sp_sel_trans_handle_request(SPKnot *knot, NR::Point *p, guint state, bool *data);
+static gboolean sp_sel_trans_handle_request(SPKnot *knot, NR::Point *p, guint state, gboolean *data);
extern GdkPixbuf *handles[];
-static bool sp_seltrans_handle_event(SPKnot *knot, GdkEvent *event, gpointer)
+static gboolean 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 bool sp_sel_trans_handle_request(SPKnot *knot, NR::Point *position, guint state, bool *data)
+static gboolean sp_sel_trans_handle_request(SPKnot *knot, NR::Point *position, guint state, gboolean *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
}
-bool Inkscape::SelTrans::handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle)
+gboolean Inkscape::SelTrans::handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle)
{
if (!SP_KNOT_IS_GRABBED(knot)) {
return TRUE;
: 1 );
}
-bool sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &, NR::Point &pt, guint state)
{
return seltrans->scaleRequest(pt, state);
}
-bool sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &pt, guint state)
{
return seltrans->stretchRequest(handle, pt, state);
}
-bool sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &handle, NR::Point &pt, guint state)
{
return seltrans->skewRequest(handle, pt, state);
}
-bool sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &, NR::Point &pt, guint state)
{
return seltrans->rotateRequest(pt, state);
}
-bool sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
+gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
SPSelTransHandle const &, NR::Point &pt, guint state)
{
return seltrans->centerRequest(pt, state);
}
-bool Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state)
+gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state)
{
using NR::X;
using NR::Y;
return TRUE;
}
-bool Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state)
+gboolean Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state)
{
using NR::X;
using NR::Y;
@@ -1002,7 +1002,7 @@ bool Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR::Poin
return TRUE;
}
-bool Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state)
+gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Point &pt, guint state)
{
using NR::X;
using NR::Y;
@@ -1092,7 +1092,7 @@ bool Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Point &
return TRUE;
}
-bool Inkscape::SelTrans::rotateRequest(NR::Point &pt, guint state)
+gboolean Inkscape::SelTrans::rotateRequest(NR::Point &pt, guint state)
{
int snaps = prefs_get_int_attribute("options.rotationsnapsperpi", "value", 12);
return TRUE;
}
-bool Inkscape::SelTrans::centerRequest(NR::Point &pt, guint state)
+gboolean 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 ccb00708e70c54a112d4268f8ef8b318590fe81e..5326c7b87b1db1ebf0bae610a14dfac51ed3cc8a 100644 (file)
--- a/src/seltrans.h
+++ b/src/seltrans.h
void scale(NR::Point &pt, guint state);
void skew(SPSelTransHandle const &handle, NR::Point &pt, guint state);
void rotate(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 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 handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle);
+ gboolean 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 f8fb5ca78b7acfcc2b8f4c54e769995223ed2183..b2b0f7b0565dd7fbe467fe8e15043272725d3b7d 100644 (file)
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
static Inkscape::XML::Node *sp_genericellipse_write(SPObject *object, Inkscape::XML::Node *repr,
guint flags);
-static bool sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr);
+static gboolean sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr);
static SPShapeClass *ge_parent_class;
* See SVG 1.0 Specification W3C Recommendation
* ``F.6 Ellptical arc implementation notes'' for more detail.
*/
-static bool
+static gboolean
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 ed15e2fa3f76cfcfdf5bad19ad2d02cd557157c0..ccaf8164949532ca82b2df536344df214928c384 100644 (file)
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
g_assert_not_reached();
}
-void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, bool sensitive)
+void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, gboolean sensitive)
{
g_assert(guide != NULL);
g_assert(SP_IS_GUIDE(guide));
diff --git a/src/sp-guide.h b/src/sp-guide.h
index 2a12225be40d4d64b015c7dfe44510c4c84f70c9..a3b87648396ccb48431372bff0e1a9e2e00450f2 100644 (file)
--- a/src/sp-guide.h
+++ b/src/sp-guide.h
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, bool sensitive);
+void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, gboolean 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 fe480b22b382e8171566d2f8b2d338d32eaf169c..5804089e687cf9efc1ef658cb01ab2274c574c73 100644 (file)
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
class PushPull
{
public:
- bool first;
+ gboolean first;
FILE* fp;
guchar* scratch;
gsize size;
offset(0),
loader(0) {};
- bool readMore()
+ gboolean readMore()
{
- bool good = FALSE;
+ gboolean good = FALSE;
if ( offset )
{
g_memmove( scratch, scratch + offset, used - offset );
PushPull* youme = (PushPull*)png_get_io_ptr(png_ptr);
gsize filled = 0;
- bool canRead = TRUE;
+ gboolean canRead = TRUE;
while ( filled < length && canRead )
{
// short buffer
guchar scratch[1024];
- bool latter = FALSE;
- bool isPng = FALSE;
+ gboolean latter = FALSE;
+ gboolean isPng = FALSE;
png_structp pngPtr = NULL;
png_infop infoPtr = NULL;
//png_infop endPtr = NULL;
}
}
- bool ok = gdk_pixbuf_loader_close(loader, &err);
+ gboolean 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 4c2016881844a1c1e2c7f88f80aa07a58f1889b7..5f05c9fad6b8ac9db3bb46541f776a9a4122792d 100644 (file)
--- a/src/sp-metrics.cpp
+++ b/src/sp-metrics.cpp
GString *
sp_metric_to_metric_string(gdouble const length,
SPMetric const metric_src, SPMetric const metric_dst,
- bool const m)
+ gboolean 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 07818f848d6111597a43ee7df474ba604f49054a..23c1b6c138f776faa3029d92ae03feaa0e2ce3c6 100644 (file)
--- a/src/sp-metrics.h
+++ b/src/sp-metrics.h
#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, bool m);
+GString * sp_metric_to_metric_string (gdouble length, const SPMetric metric_src, const SPMetric metric_dst, gboolean 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 3757dcf7f5729b5d9e385da1b57689333666ee74..f3dea40c76335b2f62b9bf051a9e7a191a6ce487 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
static void sp_namedview_setup_grid(SPNamedView * nv);
static void sp_namedview_setup_grid_item(SPNamedView * nv, SPCanvasItem * item);
-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 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 SPObjectGroupClass * parent_class;
NR::Rect const r = desktop->get_display_area();
// saving window geometry is not undoable
- bool saved = sp_document_get_undo_sensitive(sp_desktop_document(desktop));
+ gboolean 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());
gridviews = g_slist_remove(gridviews, l->data);
}
-void SPNamedView::activateGuides(gpointer desktop, bool active)
+void SPNamedView::activateGuides(gpointer desktop, gboolean active)
{
g_assert(desktop != NULL);
g_assert(g_slist_find(views, desktop));
v = !v;
}
- bool saved = sp_document_get_undo_sensitive(doc);
+ gboolean saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive(doc, FALSE);
sp_repr_set_boolean(repr, "showguides", v);
sp_repr_get_boolean(repr, "showgrid", &v);
v = !v;
- bool saved = sp_document_get_undo_sensitive(doc);
+ gboolean saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive(doc, FALSE);
sp_repr_set_boolean(repr, "showgrid", v);
/* This should be moved somewhere */
-static bool sp_str_to_bool(const gchar *str)
+static gboolean sp_str_to_bool(const gchar *str)
{
if (str) {
if (!g_strcasecmp(str, "true") ||
/* fixme: Collect all these length parsing methods and think common sane API */
-static bool sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit)
+static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit)
{
if (!str) {
return FALSE;
return FALSE;
}
-static bool sp_nv_read_opacity(const gchar *str, guint32 *color)
+static gboolean 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 b60fb56175a6378ad66fc0d8967835e00807997c..54291413e078d05a561a99a31dd01992880e53f7 100644 (file)
--- a/src/sp-namedview.h
+++ b/src/sp-namedview.h
void show(SPDesktop *desktop);
void hide(SPDesktop const *desktop);
- void activateGuides(gpointer desktop, bool active);
+ void activateGuides(gpointer desktop, gboolean active);
gchar const *getName() const;
guint getViewCount();
GSList const *getViewList() const;
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index f3e6d216415074fe85704e9e84c0f2ef7cebba5c..62a442d0a6483c48de2c2e49eb5b54df4014fad2 100644 (file)
--- 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)) {
- bool undo_sensitive=sp_document_get_undo_sensitive(document);
+ gboolean 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 8c853bcd6a4c2d02b838a7ef5b6f80d89948f3c5..56cbfefdebe3d6582717c3ed65d223e001f4d9cf 100644 (file)
--- 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 bool polygon_get_value(gchar const **p, gdouble *v)
+static gboolean 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();
- bool hascpt = FALSE;
+ gboolean hascpt = FALSE;
gchar const *cptr = value;
bool has_error = false;
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index 265b2b7979dc8652a97d5d3c14f3a4f8604c0f63..54a38ccd1178f6ae97b2b8313a868ab82f5dd4aa 100644 (file)
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
SPCurve * curve;
const gchar * cptr;
char * eptr;
- bool hascpt;
+ gboolean hascpt;
if (!value) break;
curve = sp_curve_new ();
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index e286648889273a24710c3390dc08c62b3c334a48..edcea21a24cd757af5bfb77e28a2474ae9d61e37 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
}
void
-sp_rect_set_rx(SPRect *rect, bool set, gdouble value)
+sp_rect_set_rx(SPRect *rect, gboolean set, gdouble value)
{
g_return_if_fail(rect != NULL);
g_return_if_fail(SP_IS_RECT(rect));
}
void
-sp_rect_set_ry(SPRect *rect, bool set, gdouble value)
+sp_rect_set_ry(SPRect *rect, gboolean 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 bef99470b8a07e93b727acd0ce5a2b10d70da0d5..4cf3b24ba07994d03559e3cd5f56251fc72c0284 100644 (file)
--- a/src/sp-rect.h
+++ b/src/sp-rect.h
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, bool set, gdouble value);
-void sp_rect_set_ry(SPRect * rect, bool set, gdouble value);
+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_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 fcc8aa9dbec4f5c929f2759a8a6175cdcd783a11..1dc6bd6cbbd9064e8a89ef8b2cc35a075477452c 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
static gint
sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
{
- static bool dragging;
+ static gboolean 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 612f5d5bbd5d5fe0810eebd1bf4fb720de37d507..74b252860ee13c083eec82d085e8abb5f9573f9b 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent *event)
{
- static bool dragging;
+ static gboolean 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 254540aaacd65c31c526c1972df4864a34cb4c3e..22d9dd120e81d0cd4e477add44a77bf36066ac95 100644 (file)
--- a/src/svg-view.cpp
+++ b/src/svg-view.cpp
arena_handler (SPCanvasArena *arena, NRArenaItem *ai, GdkEvent *event, SPSVGView *svgview)
{
static gdouble x, y;
- static bool active = FALSE;
+ static gboolean 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 6bbcdd8846c7db93a4bd0e15d3fdcd0f185dbfed..372570883791ca552e45ccc3f0613d8aaabd23ae 100644 (file)
--- 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)) {
- bool hasp, hasd;
+ gboolean hasp, hasd;
gchar *s, *e;
gdouble r, g, b;
diff --git a/src/svg/svg-path.cpp b/src/svg/svg-path.cpp
index b37814164eb1c2bca3f2557eabfda04386bc7de9..6598a5731f79d99fe9dd9c0d8c236105db1d958b 100644 (file)
--- a/src/svg/svg-path.cpp
+++ b/src/svg/svg-path.cpp
double spx, spy; /* beginning of current subpath point */
char cmd; /* current command (lowercase) */
int param; /* parameter number */
- bool rel; /* true if relative coords */
+ gboolean rel; /* true if relative coords */
double params[7]; /* parameters that have been parsed */
};
}
}
-static void rsvg_parse_path_do_cmd(RSVGParsePathCtx *ctx, bool final)
+static void rsvg_parse_path_do_cmd(RSVGParsePathCtx *ctx, gboolean final)
{
double x1, y1, x2, y2, x3, y3;
int i = 0;
double val = 0;
char c = 0;
- bool in_num = FALSE;
- bool in_frac = FALSE;
- bool in_exp = FALSE;
- bool exp_wait_sign = FALSE;
+ gboolean in_num = FALSE;
+ gboolean in_frac = FALSE;
+ gboolean in_exp = FALSE;
+ gboolean exp_wait_sign = FALSE;
int sign = 0;
int exp = 0;
int exp_sign = 0;
index 1a4816c882fd9e5211e85269b2d61c3b5d7abed6..074ee0d36528bc93b353ccb545caf7178a98c544 100644 (file)
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
namespace Dialog {
#ifndef WIN32
-static bool
+static gboolean
sp_retransientize_again (gpointer dlgPtr)
{
Dialog *dlg = (Dialog *)dlgPtr;
index 6c66ff64ee5199de90b5f6bbd96950fdf9dab141..9b5e9c4a83b8aeab193cb79391ee3e0164d8859c 100644 (file)
sp_view_widget_set_view(this, view);
}
- bool shutdown() {
+ gboolean shutdown() {
return sp_view_widget_shutdown(this);
}
/// Virtual method about view size change
void (* view_resized) (SPViewWidget *vw, Inkscape::UI::View::View *view, gdouble width, gdouble height);
- bool (* shutdown) (SPViewWidget *vw);
+ gboolean (* shutdown) (SPViewWidget *vw);
};
#endif
index 1f688fc38c96d2d75a253a79733b61cfaf19a015..4ac73e48476b049e0cef28f45eb9224501858f5c 100644 (file)
Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));
_wr->setUpdating (true);
- bool saved = sp_document_get_undo_sensitive (doc);
+ gboolean 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");
_wr->setUpdating (true);
SPDocument *doc = sp_desktop_document(dt);
- bool saved = sp_document_get_undo_sensitive (doc);
+ gboolean 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());
_wr->setUpdating (true);
SPDocument *doc = sp_desktop_document(dt);
- bool saved = sp_document_get_undo_sensitive (doc);
+ gboolean 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());
bool second = _rb2->get_active();
SPDocument *doc = sp_desktop_document(dt);
- bool saved = sp_document_get_undo_sensitive (doc);
+ gboolean 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");
index 792c84efb20f3ac53aabe1727555165512037fe1..b7839284a02b8baf7568080f0246c442c9b66e10 100644 (file)
_wr->setUpdating (true);
SPDocument *doc = sp_desktop_document(dt);
- bool saved = sp_document_get_undo_sensitive (doc);
+ gboolean 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 2812af3d4a9f4696c61b84b95503693c9e5babf3..edaa600db5b61780be7cae88ad29a2078623b4fa 100644 (file)
--- a/src/version.cpp
+++ b/src/version.cpp
#include <glib/gstrfuncs.h>
#include "version.h"
-bool sp_version_from_string(const gchar *string, Inkscape::Version *version)
+gboolean sp_version_from_string(const gchar *string, Inkscape::Version *version)
{
if (!string) {
return FALSE;
return g_strdup_printf("%u.%u", version.major, version.minor);
}
-bool sp_version_inside_range(Inkscape::Version version,
+gboolean 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 7f708c1b881050ee11dc590f6e0d8c2b88973034..750ef8e552bdf82b61df625a8a6570561b139c77 100644 (file)
--- a/src/version.h
+++ b/src/version.h
#define SP_VERSION_IS_ZERO (v) (!(v).major && !(v).minor)
-bool sp_version_from_string (const gchar *string, Inkscape::Version *version);
+gboolean sp_version_from_string (const gchar *string, Inkscape::Version *version);
gchar *sp_version_to_string (Inkscape::Version version);
-bool sp_version_inside_range (Inkscape::Version version,
+gboolean 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 e9f44a5d838702ec56f86981fb7169cd8bcbbaf0..f9e854302424db73802be485664a39a258f6c1b7 100644 (file)
--- 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, bool down)
+sp_button_toggle_set_down (SPButton *button, gboolean 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 0d715053dd39feb472f8b9a93540add41b602048..f14af94d14fca46e5d0b51b8e526668ccd6c67a7 100644 (file)
--- a/src/widgets/button.h
+++ b/src/widgets/button.h
GtkWidget *sp_button_new (Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips);
-void sp_button_toggle_set_down (SPButton *button, bool down);
+void sp_button_toggle_set_down (SPButton *button, gboolean down);
GtkWidget *sp_button_new_from_data (Inkscape::IconSize size,
SPButtonType type,
index 6e00998f346f5da21663345315be2ff21c693beb..0514dd39389a1207186adb109756e5b7aacfabec 100644 (file)
gint sp_desktop_widget_set_focus(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw);
-void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, bool show);
+void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show);
void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw);
void sp_desktop_widget_layout(SPDesktopWidget *dtw);
void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw);
index 9e699d0b2d5e38b039dc86ff0441b2c2cf70ee7a..3177700c3601c9f35f127b3c12960bafa97428f4 100644 (file)
static void
sp_gradient_selector_vector_set (SPGradientVectorSelector *gvs, SPGradient *gr, SPGradientSelector *sel)
{
- static bool blocked = FALSE;
+ static gboolean blocked = FALSE;
if (!blocked) {
blocked = TRUE;
index 81462f56a109c01b46e2c2e08ee6c7bcb8f59d05..78ae4213d157a48fb55a7d511c855580d49f9f2c 100644 (file)
void
sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr)
{
- static bool suppress = FALSE;
+ static gboolean 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 bool sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget *dialog);
+static gint 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 bool blocked = FALSE;
+static gboolean 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);
- bool saved = sp_document_get_undo_sensitive(document);
+ gboolean 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);
wd.stop = 0;
}
-static bool
+static gboolean
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 0fadffdc862218231329328adadc1323846dbe73..264349bd17f50a7d898c7d8e86400d32e04a3de6 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
addPreRender( lsize, name );
GtkStockItem stock;
- bool tryLoad = gtk_stock_lookup( name, &stock );
+ gboolean tryLoad = gtk_stock_lookup( name, &stock );
if ( !tryLoad && fallback ) {
tryLoad |= strncmp("gtk-", name, 4 ) == 0;
}
index 025e6be6603d81c5bdd37016148408318f38b43e..2f42d590fd3e96ddd923ca0b37dfa475d7e9fb46 100644 (file)
}
GtkWidget *
-sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, bool altx)
+sp_select_toolbox_spinbutton(gchar *label, gchar *data, float lower_limit, GtkWidget *us, GtkWidget *spw, gchar *tooltip, gboolean 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 bool aux_set_unit(SPUnitSelector *,
+static gboolean aux_set_unit(SPUnitSelector *,
SPUnit const *old,
SPUnit const *new_units,
GObject *dlg)
index b3fe622622ed0b5eb770daee96098cbb220e5b35..c14d89f1142e8dc9696a948190857b4611afe187 100644 (file)
const gchar* className;
GType type;
guint submode;
- bool enabledFull;
- bool enabledBrief;
+ gboolean enabledFull;
+ gboolean enabledBrief;
SPColorNotebook *backPointer;
};
static void sp_color_notebook_menuitem_response (GtkMenuItem *menuitem, gpointer user_data)
{
- bool active = FALSE;
+ gboolean active = FALSE;
active = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menuitem));
SPColorNotebookTracker *entry = reinterpret_cast< SPColorNotebookTracker* > (user_data);
gtk_notebook_set_current_page (GTK_NOTEBOOK (_book), prefs_get_int_attribute ("colorselector", "page", 0));
{
- bool found = FALSE;
+ gboolean 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)
{
- bool oldState;
+ gboolean 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)
{
- bool oldState;
+ gboolean oldState;
ColorNotebook* nb = (ColorNotebook*)(SP_COLOR_SELECTOR(colorbook)->base);
oldState = nb->_dragging;
index dae2767ecd45f7fb4e78e8595345c424dc4bedd1..ad79437da68b4e8584e7ae9187bd737a09163bcd 100644 (file)
void _rgbaEntryChanged( GtkEntry* entry );
void _updateRgbaEntry( const SPColor& color, gfloat alpha );
- bool _updating : 1;
- bool _updatingrgba : 1;
- bool _dragging : 1;
+ gboolean _updating : 1;
+ gboolean _updatingrgba : 1;
+ gboolean _dragging : 1;
gulong _switchId;
gulong _entryId;
GtkWidget *_book;
index ddfb40a8fd49112285b4c140803d864e63cbabe0..8acd96bbb3af014639ea328196a4bf2b0f1c388f 100644 (file)
return GTK_WIDGET (csel);
}
-void ColorScales::_recalcColor( bool changing )
+void ColorScales::_recalcColor( gboolean changing )
{
if ( changing )
{
index e7d94ab3749aee447ab2a2dc5a01f48fa08a5a9e..efb557f9bc91da090b4288a6eed0bff2345f0040 100644 (file)
void _getCmykaFloatv(gfloat *cmyka);
guint32 _getRgba32();
void _updateSliders(guint channels);
- void _recalcColor(bool changing);
+ void _recalcColor(gboolean changing);
void _setRangeLimit( gdouble upper );
SPColorScalesMode _mode;
gdouble _rangeLimit;
- bool _updating : 1;
- bool _dragging : 1;
+ gboolean _updating : 1;
+ gboolean _dragging : 1;
GtkAdjustment *_a[5]; /* Channel adjustments */
GtkWidget *_s[5]; /* Channel sliders */
GtkWidget *_b[5]; /* Spinbuttons */
index b4af6bf869d8dfa5d61663a292ca886817a95dcf..1532eddd74bc6516840136c358676a7d32af07ed 100644 (file)
return type;
}
-bool ColorSelector::setColorspace( SPColorSpaceType colorspace )
+gboolean ColorSelector::setColorspace( SPColorSpaceType colorspace )
{
return false;
}
}
// Called from subclasses to update color and broadcast if needed
-void ColorSelector::_updateInternals( const SPColor& color, gfloat alpha, bool held )
+void ColorSelector::_updateInternals( const SPColor& color, gfloat alpha, gboolean held )
{
g_return_if_fail( ( 0.0 <= alpha ) && ( alpha <= 1.0 ) );
- bool colorDifferent = ( !sp_color_is_close( &color, &_color, _epsilon )
+ gboolean colorDifferent = ( !sp_color_is_close( &color, &_color, _epsilon )
|| ( fabs((_alpha) - (alpha)) >= _epsilon ) );
- bool grabbed = held && !_held;
- bool released = !held && _held;
+ gboolean grabbed = held && !_held;
+ gboolean released = !held && _held;
// Store these before emmiting any signals
_held = held;
index 5739f7f15d55de24b6ecf5ff7987dfacaa1e4e22..b2fd62b1e336bf02c544285e7dd953599a8e17ca 100644 (file)
virtual guint getSubmode() const;
virtual SPColorSpaceType getColorspace() const;
- virtual bool setColorspace( SPColorSpaceType colorspace );
+ virtual gboolean setColorspace( SPColorSpaceType colorspace );
protected:
void _grabbed();
void _released();
- void _updateInternals( const SPColor& color, gfloat alpha, bool held );
- bool _isHeld() const { return _held; }
+ void _updateInternals( const SPColor& color, gfloat alpha, gboolean held );
+ gboolean _isHeld() const { return _held; }
virtual void _colorChanged( const SPColor& color, gfloat alpha );
ColorSelector( const ColorSelector& obj );
ColorSelector& operator=( const ColorSelector& obj );
- bool _held;
+ gboolean _held;
bool virgin; // if true, no color is set yet
};
index 2e3d7ac12037336e5b305ba17fb18f02bc082881..de358d5aca38dd6fee1e7accb4882e01e921771b 100644 (file)
static void _fooChanged( GtkWidget foo, SPColorWheelSelector *cs );
- void _recalcColor( bool changing );
+ void _recalcColor( gboolean changing );
- bool _updating : 1;
- bool _dragging : 1;
+ gboolean _updating : 1;
+ gboolean _dragging : 1;
GtkAdjustment* _adj; /* Channel adjustment */
GtkWidget* _wheel;
GtkWidget* _slider;
index bf6510287e05d7e2d2516a274047c137e3c79d4a..9038b6d38013d4fe2880b196411b3ebaf916557f 100644 (file)
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 );
sp_color_wheel_set_sv(wheel, sat, val);
}
-bool sp_color_wheel_is_adjusting( SPColorWheel *wheel )
+gboolean sp_color_wheel_is_adjusting( SPColorWheel *wheel )
{
g_return_val_if_fail( SP_IS_COLOR_WHEEL(wheel), FALSE );
return wheel->dragging;
gint cx, cw;
cx = widget->style->xthickness;
cw = widget->allocation.width - 2 * cx;
- bool grabbed = FALSE;
+ gboolean grabbed = FALSE;
{
double dx = event->x - wheel->_center;
static void sp_color_wheel_set_sv( SPColorWheel *wheel, gdouble sat, gdouble value )
{
static gdouble epsilon = 1e-6;
- bool changed = FALSE;
+ gboolean changed = FALSE;
if ( ABS( wheel->_sat - sat ) > epsilon )
{
gint x, y;
guint r, g, b;
gint size = wheel->_center * 2;
- bool dirty = FALSE;
+ gboolean dirty = FALSE;
if (wheel->_image && (wheel->_bs < (size * size) )) {
g_free (wheel->_image);
static gboolean sp_color_wheel_focus(GtkWidget *widget,
GtkDirectionType direction)
{
- bool focusKept = FALSE;
- bool wasFocused = GTK_WIDGET_HAS_FOCUS(widget);
+ gboolean focusKept = FALSE;
+ gboolean wasFocused = GTK_WIDGET_HAS_FOCUS(widget);
SPColorWheel* wheel = SP_COLOR_WHEEL(widget);
- bool goingUp = FALSE;
+ gboolean goingUp = FALSE;
switch ( direction )
{
index 5b01f1a8871734d30466716bf91d765039e711bb..d8fceb9085f23f0df44d63cf118167daf7ce045a 100644 (file)
struct SPColorWheel {
GtkWidget widget;
- bool dragging : 1;
+ gboolean dragging : 1;
- bool _inTriangle;
- bool _triDirty;
+ gboolean _inTriangle;
+ gboolean _triDirty;
GdkRegion* _triangle;
GdkPoint _triPoints[3];
guchar *_triImage;
void sp_color_wheel_get_color( SPColorWheel *wheel, SPColor* color );
void sp_color_wheel_set_color( SPColorWheel *wheel, const SPColor* color );
-bool sp_color_wheel_is_adjusting( SPColorWheel *wheel );
+gboolean sp_color_wheel_is_adjusting( SPColorWheel *wheel );
#endif
index 893a7a7e006751e59fbe75c60573a35e7ab86445..14ac51422fff7f7aa9e8e3de9fad0be2853fa7f4 100644 (file)
#include "widget-sizes.h"
-bool
+gboolean
spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data)
{
gdouble *ini;
spinbutton_defocus (GtkObject *container)
{
// defocus spinbuttons by moving focus to the canvas, unless "stay" is on
- bool stay = GPOINTER_TO_INT(gtk_object_get_data (GTK_OBJECT (container), "stay"));
+ gboolean 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 {
}
}
-bool
+gboolean
spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data)
{
SPWidget *spw = (SPWidget *) data;
index eaa999b001e923c785e20e0832ee2474a5f60603..868bc195a07e10c537b999cf9f9d412c4daeb347 100644 (file)
#include <gtk/gtkstyle.h> /* GtkWidget */
#include <gtk/gtktypeutils.h> /* GtkObject */
-bool spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data);
+gboolean spinbutton_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data);
void spinbutton_undo (GtkWidget *w);
-bool spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data);
+gboolean spinbutton_keypress (GtkWidget *w, GdkEventKey *event, gpointer data);
void spinbutton_defocus (GtkObject *container);
/*
index e42f58954e7886a7950e1436b1d4d06cf2b1001e..ed9259aef9b93d340e37f0124c0f5b859dbe2733 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
gchar const *path, gchar const *data, gdouble def,
GtkWidget *us,
GtkWidget *tbl,
- bool altx, gchar const *altx_mark,
+ gboolean 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)
// fixme: make settable in prefs!
gint mag = 5;
gdouble prop = 0.5;
- bool flat = FALSE;
+ gboolean flat = FALSE;
gdouble randomized = 0;
gdouble rounded = 0;
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index d4eea0835013cb4a58402f7e0a8068938e48bf4d..10f6101b656df3c10039b7c6707291921824a8a7 100644 (file)
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
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, 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<AttributeRecord const> attributes);
+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<AttributeRecord const> 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
*/
-bool
+gboolean
sp_repr_save_file (Document *doc, const gchar *filename,
gchar const *default_ns)
{
}
void
-sp_repr_write_stream_root_element (Node *repr, Writer &out, bool add_whitespace, gchar const *default_ns)
+sp_repr_write_stream_root_element (Node *repr, Writer &out, gboolean 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, bool add_whitespace,
void
sp_repr_write_stream (Node *repr, Writer &out, gint indent_level,
- bool add_whitespace, Glib::QueryQuark elide_prefix)
+ gboolean add_whitespace, Glib::QueryQuark elide_prefix)
{
if (repr->type() == Inkscape::XML::TEXT_NODE) {
repr_quote_write (out, repr->content());
void
sp_repr_write_stream_element (Node * repr, Writer & out, gint indent_level,
- bool add_whitespace,
+ gboolean add_whitespace,
Glib::QueryQuark elide_prefix,
List<AttributeRecord const> attributes)
{
Node *child;
- bool loose;
+ gboolean loose;
gint i;
g_return_if_fail (repr != NULL);
diff --git a/src/xml/repr.h b/src/xml/repr.h
index c30dcf66a549c4d13d53ffeae5713c8e6712597e..7d2f7d47422b9435957cd59c7f7128280fae796e 100644 (file)
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
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);
-bool sp_repr_save_file(Inkscape::XML::Document *doc, gchar const *filename, gchar const *default_ns=NULL);
+gboolean sp_repr_save_file(Inkscape::XML::Document *doc, gchar const *filename, gchar const *default_ns=NULL);
void sp_repr_print(Inkscape::XML::Node *repr);