Code

Rename LPE: mirror reflect --> mirror symmetry
[inkscape.git] / src / widgets / button.cpp
index e9f44a5d838702ec56f86981fb7169cd8bcbbaf0..6769fa389d9f1889e29f24e925053f0adb3d8f0f 100644 (file)
@@ -56,22 +56,25 @@ SPActionEventVector button_event_vector = {
          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
@@ -172,7 +175,7 @@ sp_button_process_event (SPButton *button, GdkEvent *event)
 }
 
 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);
@@ -254,7 +257,7 @@ sp_button_set_action (SPButton *button, SPAction *action)
 }
 
 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) {