summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c87d030)
raw | patch | inline | side by side (parent: c87d030)
author | kidproto <kidproto@users.sourceforge.net> | |
Thu, 24 Aug 2006 23:19:11 +0000 (23:19 +0000) | ||
committer | kidproto <kidproto@users.sourceforge.net> | |
Thu, 24 Aug 2006 23:19:11 +0000 (23:19 +0000) |
14 files changed:
index 0108d47775bacf0908ce496a021e6c43101a03c7..15b1990f9505d7e144a52c0f8065c00330c7db93 100644 (file)
gint width = 0;
gint height = 0;
EekPreview* preview = EEK_PREVIEW(widget);
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean worked = gtk_icon_size_lookup( preview->_size, &width, &height );
if ( !worked ) {
width = 16;
static guint eek_preview_signals[LAST_SIGNAL] = { 0 };
-
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
gboolean eek_preview_expose_event( GtkWidget* widget, GdkEventExpose* event )
{
/* g_message("Exposed!!! %s", GTK_WIDGET_HAS_FOCUS(widget) ? "XXX" : "---" ); */
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_enter_cb( GtkWidget* widget, GdkEventCrossing* event )
{
if ( gtk_get_event_widget( (GdkEvent*)event ) == widget ) {
@@ -278,6 +283,8 @@ static gboolean eek_preview_enter_cb( GtkWidget* widget, GdkEventCrossing* event
return FALSE;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_leave_cb( GtkWidget* widget, GdkEventCrossing* event )
{
if ( gtk_get_event_widget( (GdkEvent*)event ) == widget ) {
@@ -289,21 +296,31 @@ static gboolean eek_preview_leave_cb( GtkWidget* widget, GdkEventCrossing* event
}
/*
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_focus_in_event( GtkWidget* widget, GdkEventFocus* event )
{
g_message("focus IN");
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean blip = parent_class->focus_in_event ? parent_class->focus_in_event(widget, event) : FALSE;
return blip;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_focus_out_event( GtkWidget* widget, GdkEventFocus* event )
{
g_message("focus OUT");
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean blip = parent_class->focus_out_event ? parent_class->focus_out_event(widget, event) : FALSE;
return blip;
}
*/
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_button_press_cb( GtkWidget* widget, GdkEventButton* event )
{
if ( gtk_get_event_widget( (GdkEvent*)event ) == widget ) {
return FALSE;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton* event )
{
if ( gtk_get_event_widget( (GdkEvent*)event ) == widget ) {
@@ -331,6 +350,8 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
preview->_hot = FALSE;
gtk_widget_set_state( widget, GTK_STATE_NORMAL );
if ( preview->_within && event->button == PRIME_BUTTON_MAGIC_NUMBER ) {
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean isAlt = (event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK;
if ( isAlt ) {
@@ -343,12 +364,16 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
return FALSE;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
{
g_message("TICK");
return FALSE;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
gboolean eek_preview_key_release_event( GtkWidget* widget, GdkEventKey* event)
{
g_message("tock");
case FOCUS_PROP_ID:
{
EekPreview* preview = EEK_PREVIEW( object );
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean val = g_value_get_boolean( value );
if ( val != preview->_takesFocus ) {
preview->_takesFocus = val;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
static gboolean eek_preview_popup_menu( GtkWidget* widget )
{
/* g_message("Do the popup!"); */
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean blip = parent_class->popup_menu ? parent_class->popup_menu(widget) : FALSE;
return blip;
}
return (LinkType)splat->_linked;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
gboolean eek_preview_get_focus_on_click( EekPreview* preview )
{
return preview->_takesFocus;
}
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
void eek_preview_set_focus_on_click( EekPreview* preview, gboolean focus_on_click )
{
if ( focus_on_click != preview->_takesFocus ) {
index 114be8742a65171b1634a9920b1014c06a5f38ab..a2799dd8c020c747d3140f1f4ffa556d1f224d57 100644 (file)
int _r;
int _g;
int _b;
-
+
+ // JON: keeping this gboolean because it is legacy c-based code
+ // TODO: convert to bool
gboolean _hot;
gboolean _within;
gboolean _takesFocus;
void eek_preview_set_linked( EekPreview* splat, LinkType link );
LinkType eek_preview_get_linked( EekPreview* splat );
+// JON: keeping this gboolean because it is legacy c-based code
+// TODO: convert to bool
gboolean eek_preview_get_focus_on_click( EekPreview* preview );
void eek_preview_set_focus_on_click( EekPreview* preview, gboolean focus_on_click );
index 3a7463ff30dfb1d891a6eb4e404c46c51a08ecf1..2f5f4b89c0c0cc9cb79e8384967cdc993c58d813 100644 (file)
SPObject* _target;
};
-static gboolean layers_panel_activated( GtkObject *object, GdkEvent * /*event*/, gpointer data )
+static bool layers_panel_activated( GtkObject *object, GdkEvent * /*event*/, gpointer data )
{
if ( data )
{
diff --git a/src/document.cpp b/src/document.cpp
index 04d3a147c3e711768c469eb9633210af8ead2efd..ebc65830f1bbc90c9db4969b5ea5129cf8c8aed1 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
static gint sp_document_idle_handler(gpointer data);
+// JON: This must stay as gboolean because its used as a callback into
+// our legacy c stuff in here. Would like to make bool
gboolean sp_document_resource_list_free(gpointer key, gpointer value, gpointer data);
static gint doc_count = 0;
/* Helpers */
+// JON: This must stay this way because it is used as a callback for
+// legacy glib code which needs to be moved to glibmm
gboolean
sp_document_resource_list_free(gpointer key, gpointer value, gpointer data)
{
index c35e4d217e9391df54562d2f750355c100e9a3a3..b732fc7231e73a7d6a335fb4b6d23a99c62e6ce2 100644 (file)
unsigned int\r
PrintPDF::begin(Inkscape::Extension::Print *mod, SPDocument *doc)\r
{\r
- gboolean epsexport = false;\r
+ bool epsexport = false;\r
\r
_latin1_encoded_fonts.clear();\r
_newlatin1font_proc_defined = false;\r
index 482d6c5eaf98ce4a0af328cdb14c4d5f489a3adb..76a6f13e0d2b25b898690f4600d369373e61d0e4 100644 (file)
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
if (official) {
// save the filename for next use
sp_document_set_uri(doc, fileName);
- gboolean saved = sp_document_get_undo_sensitive(doc);
+ bool saved = sp_document_get_undo_sensitive(doc);
// also save the extension for next use
Inkscape::XML::Node *repr = sp_document_repr_root(doc);
sp_document_set_undo_sensitive (doc, FALSE);
index 8a7e7648c489beafd62ed8c1d604d3f92140470b..adbf0a3c71f4f317f4238fe642ebcd5060b1aa34 100644 (file)
{
typedef void (*GMarshalFunc_VOID__POINTER_BOOLEAN) (gpointer data1,
gpointer arg_1,
- gboolean arg_2,
+ bool arg_2,
gpointer data2);
register GMarshalFunc_VOID__POINTER_BOOLEAN callback;
register GCClosure *cc = (GCClosure*) closure;
{
typedef void (*GMarshalFunc_VOID__STRING_BOOLEAN) (gpointer data1,
gpointer arg_1,
- gboolean arg_2,
+ bool arg_2,
gpointer data2);
register GMarshalFunc_VOID__STRING_BOOLEAN callback;
register GCClosure *cc = (GCClosure*) closure;
gpointer invocation_hint,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
+ typedef bool (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
gpointer data2);
register GMarshalFunc_BOOLEAN__VOID callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
- gboolean v_return;
+ bool v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 1);
gpointer invocation_hint,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__UINT) (gpointer data1,
+ typedef bool (*GMarshalFunc_BOOLEAN__UINT) (gpointer data1,
guint arg_1,
gpointer data2);
register GMarshalFunc_BOOLEAN__UINT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
- gboolean v_return;
+ bool v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 2);
gpointer invocation_hint,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER) (gpointer data1,
+ typedef bool (*GMarshalFunc_BOOLEAN__POINTER) (gpointer data1,
gpointer arg_1,
gpointer data2);
register GMarshalFunc_BOOLEAN__POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
- gboolean v_return;
+ bool v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 2);
gpointer invocation_hint,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_UINT) (gpointer data1,
+ typedef bool (*GMarshalFunc_BOOLEAN__POINTER_UINT) (gpointer data1,
gpointer arg_1,
guint arg_2,
gpointer data2);
register GMarshalFunc_BOOLEAN__POINTER_UINT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
- gboolean v_return;
+ bool v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 3);
gpointer invocation_hint,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_POINTER) (gpointer data1,
+ typedef bool (*GMarshalFunc_BOOLEAN__POINTER_POINTER) (gpointer data1,
gpointer arg_1,
gpointer arg_2,
gpointer data2);
register GMarshalFunc_BOOLEAN__POINTER_POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
- gboolean v_return;
+ bool v_return;
g_return_if_fail (return_value != NULL);
g_return_if_fail (n_param_values == 3);
diff --git a/src/message-stack.cpp b/src/message-stack.cpp
index ae65e3421ed7490bd727b983c9ffbfc89968c861..4186970e3510603c5962f2d2d5ec659ec7be470f 100644 (file)
--- a/src/message-stack.cpp
+++ b/src/message-stack.cpp
_changed_signal.emit(NORMAL_MESSAGE, NULL);
}
}
-
+// JON: this has o stay this way because of legacy use of glib
+// would like to change this to bool
gboolean MessageStack::_timeout(gpointer data) {
Message *m=reinterpret_cast<Message *>(data);
m->timeout_id = 0;
diff --git a/src/message-stack.h b/src/message-stack.h
index 4741cce1e4edd5791edede3abd13e6b4e7b1ead4..bcae24161d6eb29cc363fb4574bce160e523049c 100644 (file)
--- a/src/message-stack.h
+++ b/src/message-stack.h
Message *_discard(Message *m); ///< frees a message struct and returns the next such struct in the list
void _emitChanged(); ///< emits the "changed" signal
+ // JON: Have to keep this gboolean for legacy reasons of glib support
static gboolean _timeout(gpointer data); ///< callback to expire flashed messages
sigc::signal<void, MessageType, gchar const *> _changed_signal;
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp
index ff27f3de0e77508a416b15e3ee7d9718ce7187e8..46e63478cb43afbdbf4d8210708ca36ad4d2b2b7 100644 (file)
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
static void
property_cb(CRDocHandler *const a_handler,
CRString *const a_name,
- CRTerm *const a_value, gboolean const a_important)
+ CRTerm *const a_value, int const a_important)
{
g_return_if_fail(a_handler && a_name);
g_return_if_fail(a_handler->app_data != NULL);
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 0fadffdc862218231329328adadc1323846dbe73..b170d69f815352add2d1ef364e853b849a11f76a 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
#include "icon.h"
+// JON: keeping legacy gboolean because of old code
+// TODO: replace gboolean with bool
static gboolean icon_prerender_task(gpointer data);
static void addPreRender( Inkscape::IconSize lsize, gchar const *name );
index d6fd92d78d2a9e3e5aaec14160f76732fac42893..578951456ca2ea8dcd3f4c1baa5a50d382b5b5cc 100644 (file)
static void tree_move (GtkCTree * tree, GtkCTreeNode * node, GtkCTreeNode * new_parent, GtkCTreeNode * new_sibling);
+// JON: Must keep this as gboolean legacy
+// TODO: convert to use bool
static gboolean check_drag (GtkCTree * tree, GtkCTreeNode * node, GtkCTreeNode * new_parent, GtkCTreeNode * new_sibling);
static GtkCTreeNode * ref_to_sibling (GtkCTreeNode * parent, Inkscape::XML::Node * ref);
index e42f58954e7886a7950e1436b1d4d06cf2b1001e..f474cd735ebd3524df2f8a020c4d3eb4b8e03deb 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -2941,8 +2941,8 @@ sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
{
GtkToggleButton *button = GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT (tbl), "style-bold"));
- gboolean active = gtk_toggle_button_get_active (button);
- gboolean check = (query->font_weight.computed >= SP_CSS_FONT_WEIGHT_700);
+ bool active = gtk_toggle_button_get_active (button);
+ bool check = (query->font_weight.computed >= SP_CSS_FONT_WEIGHT_700);
if (active != check)
{
@@ -2955,8 +2955,8 @@ sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl)
{
GtkToggleButton *button = GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT (tbl), "style-italic"));
- gboolean active = gtk_toggle_button_get_active (button);
- gboolean check = (query->font_style.computed != SP_CSS_FONT_STYLE_NORMAL);
+ bool active = gtk_toggle_button_get_active (button);
+ bool check = (query->font_style.computed != SP_CSS_FONT_STYLE_NORMAL);
if (active != check)
{
gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas));
}
-gboolean
+bool
sp_text_toolbox_size_keypress (GtkWidget *w, GdkEventKey *event, gpointer data)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -3253,7 +3253,7 @@ sp_text_toolbox_size_keypress (GtkWidget *w, GdkEventKey *event, gpointer data)
return FALSE;
}
-gboolean
+bool
sp_text_toolbox_family_keypress (GtkWidget *w, GdkEventKey *event, GObject *tbl)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -3269,7 +3269,7 @@ sp_text_toolbox_family_keypress (GtkWidget *w, GdkEventKey *event, GObject *tbl)
return FALSE;
}
-gboolean
+bool
sp_text_toolbox_family_list_keypress (GtkWidget *w, GdkEventKey *event, GObject *tbl)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
}
}
-gboolean
+bool
sp_text_toolbox_entry_focus_in (GtkWidget *entry,
GdkEventFocus *event,
GObject *tbl)
return FALSE;
}
-gboolean
+bool
sp_text_toolbox_popdown_focus_out (GtkWidget *popdown,
GdkEventFocus *event,
GObject *tbl)
index 0464e4fb7c6a9e067b62975fc22811fef7919643..17c3495a5481d39c45b6cb14f5d6e955f56d3007 100644 (file)
}
static char const *get_local_name(CRXMLNodePtr n) { return local_part(static_cast<Node const *>(n)->name()); }
+// JON: Need to keep gboolean to interface with libcroco
+// TODO: convert to bool
static gboolean is_element_node(CRXMLNodePtr n) { return static_cast<Node const *>(n)->type() == ELEMENT_NODE; }
}