]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/gtkutil/nonmodal.cpp
Wrap more GTK
[xonotic/netradiant.git] / libs / gtkutil / nonmodal.cpp
index 049c62c0a5c7af86dae36dc0804a8a6d7010d1c9..f9da2dbf40b98738d6c50a89114b1c346b7efd7f 100644 (file)
@@ -96,7 +96,7 @@ gboolean NonModalSpinner::escape(ui::SpinButton spin, GdkEventKey *event, NonMod
 
 void NonModalSpinner::connect(ui::SpinButton spin)
 {
-    auto adj = ui::Adjustment(gtk_spin_button_get_adjustment(spin));
+    auto adj = ui::Adjustment::from(gtk_spin_button_get_adjustment(spin));
     guint handler = adj.connect("value_changed", G_CALLBACK(changed), this);
     g_object_set_data(G_OBJECT(spin), "handler", gint_to_pointer(handler));
     spin.connect("key_press_event", G_CALLBACK(enter), this);
@@ -107,6 +107,6 @@ void NonModalRadio::connect(ui::RadioButton radio)
 {
     GSList *group = gtk_radio_button_get_group(radio);
     for (; group != 0; group = g_slist_next(group)) {
-        toggle_button_connect_callback(ui::ToggleButton(GTK_TOGGLE_BUTTON(group->data)), m_changed);
+        toggle_button_connect_callback(ui::ToggleButton::from(group->data), m_changed);
     }
 }