]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpcbox.cpp
Ensure that names of saved XPMs are valid C identifiers.
[wxWidgets.git] / src / gtk / bmpcbox.cpp
index b625542b1084a0f62e3600af3885c105c248743b..18ba53680335ed0f291f70f7223a5e6025023aef 100644 (file)
@@ -30,6 +30,7 @@
     #include "wx/log.h"
 #endif
 
+#include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 
 // ============================================================================
@@ -121,7 +122,11 @@ void wxBitmapComboBox::GTKCreateComboBoxWidget()
     }
     else
     {
+#ifdef __WXGTK3__
+        m_widget = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(store));
+#else
         m_widget = gtk_combo_box_entry_new_with_model( GTK_TREE_MODEL(store), m_stringCellIndex );
+#endif
         m_entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(m_widget)));
         gtk_editable_set_editable(GTK_EDITABLE(m_entry), true);
     }
@@ -224,7 +229,7 @@ wxBitmap wxBitmapComboBox::GetItemBitmap(unsigned int n) const
         if ( pixbuf )
         {
             g_object_ref( pixbuf );
-            bitmap.SetPixbuf( pixbuf );
+            bitmap = wxBitmap(pixbuf);
         }
         g_value_unset( &value );
     }