]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checkbox.cpp
Only use Unix/X11-specific files under Unix in wxGTK.
[wxWidgets.git] / src / gtk / checkbox.cpp
index 415b5c4e647c4fc209da434fbbcc4c544d88482d..f793ad7088062cd710cc4102d6a22a64f83e9c87 100644 (file)
@@ -44,8 +44,8 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
         {
             // The 3 states cycle like this when clicked:
             // checked -> undetermined -> unchecked -> checked -> ...
-            bool active = gtk_toggle_button_get_active(toggle);
-            bool inconsistent = gtk_toggle_button_get_inconsistent(toggle);
+            bool active = gtk_toggle_button_get_active(toggle) != 0;
+            bool inconsistent = gtk_toggle_button_get_inconsistent(toggle) != 0;
 
             cb->GTKDisableEvents();
 
@@ -131,7 +131,7 @@ bool wxCheckBox::Create(wxWindow *parent,
     else
     {
         m_widgetCheckbox = gtk_check_button_new_with_label("");
-        m_widgetLabel = GTK_BIN(m_widgetCheckbox)->child;
+        m_widgetLabel = gtk_bin_get_child(GTK_BIN(m_widgetCheckbox));
         m_widget = m_widgetCheckbox;
     }
     g_object_ref(m_widget);
@@ -177,7 +177,7 @@ bool wxCheckBox::GetValue() const
 {
     wxCHECK_MSG( m_widgetCheckbox != NULL, false, wxT("invalid checkbox") );
 
-    return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_widgetCheckbox));
+    return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_widgetCheckbox)) != 0;
 }
 
 void wxCheckBox::DoSet3StateValue(wxCheckBoxState state)