diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index 4860c96674e2e67fb56e90dc26d5aecd74eb0076..6769fa389d9f1889e29f24e925053f0adb3d8f0f 100644 (file)
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
NULL,
sp_button_action_set_active,
sp_button_action_set_sensitive,
- sp_button_action_set_shortcut
+ sp_button_action_set_shortcut,
+ 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);
GtkWidget *
-sp_button_new( GtkIconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips )
+sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips )
{
SPButton *button;
button = (SPButton *)g_object_new (SP_TYPE_BUTTON, NULL);
button->type = type;
- button->lsize = CLAMP( size, GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_DIALOG );
+ button->lsize = CLAMP( size, Inkscape::ICON_SIZE_MENU, Inkscape::ICON_SIZE_DECORATION );
button->tooltips = tooltips;
if (tooltips) g_object_ref ((GObject *) tooltips);
}
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;
@@ -268,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) {
@@ -308,7 +312,7 @@ sp_button_set_composed_tooltip (GtkTooltips *tooltips, GtkWidget *widget, SPActi
}
GtkWidget *
-sp_button_new_from_data( GtkIconSize size,
+sp_button_new_from_data( Inkscape::IconSize size,
SPButtonType type,
Inkscape::UI::View::View *view,
const gchar *name,