]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/checklst.cpp
A little clarification
[wxWidgets.git] / src / gtk / checklst.cpp
index 01e3bc7c54aaedceae4a802dc927153852f24388..0f754b7d52e088e44ef069ac7fa1b947311b73b3 100644 (file)
@@ -7,19 +7,31 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "checklst.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #if wxUSE_CHECKLISTBOX
 
 #include "wx/checklst.h"
+#include "wx/gtk/private.h"
 
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 
+//-----------------------------------------------------------------------------
+// wxCheckListBoxBase
+//-----------------------------------------------------------------------------
+
+wxCheckListBoxBase::wxCheckListBoxBase()
+{
+}
+
 //-----------------------------------------------------------------------------
 // wxCheckListBox
 //-----------------------------------------------------------------------------
@@ -54,7 +66,7 @@ bool wxCheckListBox::IsChecked( int index ) const
         GtkBin *bin = GTK_BIN( child->data );
         GtkLabel *label = GTK_LABEL( bin->child );
 
-        wxString str = wxString(label->label,*wxConvCurrent);
+        wxString str( wxGTK_CONV_BACK( label->label ) );
 
         return str.GetChar(1) == wxCHECKLBOX_CHECKED;
     }
@@ -73,14 +85,14 @@ void wxCheckListBox::Check( int index, bool check )
         GtkBin *bin = GTK_BIN( child->data );
         GtkLabel *label = GTK_LABEL( bin->child );
 
-        wxString str = wxString(label->label,*wxConvCurrent);
+        wxString str( wxGTK_CONV_BACK( label->label ) );
 
         if (check == (str.GetChar(1) == wxCHECKLBOX_CHECKED))
             return;
 
         str.SetChar( 1, check ? wxCHECKLBOX_CHECKED : wxCHECKLBOX_UNCHECKED );
 
-        gtk_label_set( label, str.mbc_str() );
+        gtk_label_set( label, wxGTK_CONV( str ) );
 
         return;
     }