diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index e9f44a5d838702ec56f86981fb7169cd8bcbbaf0..6769fa389d9f1889e29f24e925053f0adb3d8f0f 100644 (file)
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
NULL
};
-GtkType
-sp_button_get_type (void)
+GType sp_button_get_type(void)
{
- static GtkType type = 0;
- if (!type) {
- GtkTypeInfo info = {
- "SPButton",
- sizeof (SPButton),
- sizeof (SPButtonClass),
- (GtkClassInitFunc) sp_button_class_init,
- (GtkObjectInitFunc) sp_button_init,
- NULL, NULL, NULL
- };
- type = gtk_type_unique (GTK_TYPE_TOGGLE_BUTTON, &info);
- }
- return type;
+ static GType type = 0;
+ if (!type) {
+ GTypeInfo info = {
+ sizeof(SPButtonClass),
+ 0, // base_init
+ 0, // base_finalize
+ (GClassInitFunc)sp_button_class_init,
+ 0, // class_finalize
+ 0, // class_data
+ sizeof(SPButton),
+ 0, // n_preallocs
+ (GInstanceInitFunc)sp_button_init,
+ 0 // value_table
+ };
+ type = g_type_register_static(GTK_TYPE_TOGGLE_BUTTON, "SPButton", &info, static_cast<GTypeFlags>(0));
+ }
+ return type;
}
static void
}
static void
-sp_button_perform_action (SPButton *button, gpointer data)
+sp_button_perform_action (SPButton *button, gpointer /*data*/)
{
if (button->action) {
sp_action_perform (button->action, NULL);
@@ -204,7 +207,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);
}
static void
-sp_button_action_set_active (SPAction *action, unsigned int active, void *data)
+sp_button_action_set_active (SPAction */*action*/, unsigned int active, void *data)
{
SPButton *button;
button = (SPButton *) data;
@@ -269,13 +272,13 @@ sp_button_action_set_active (SPAction *action, unsigned int active, void *data)
}
static void
-sp_button_action_set_sensitive (SPAction *action, unsigned int sensitive, void *data)
+sp_button_action_set_sensitive (SPAction */*action*/, unsigned int sensitive, void *data)
{
gtk_widget_set_sensitive (GTK_WIDGET (data), sensitive);
}
static void
-sp_button_action_set_shortcut (SPAction *action, unsigned int shortcut, void *data)
+sp_button_action_set_shortcut (SPAction *action, unsigned int /*shortcut*/, void *data)
{
SPButton *button=SP_BUTTON (data);
if (button->tooltips) {