]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
Use generic collapsible pane for wxUniv based builds.
[wxWidgets.git] / src / gtk / listbox.cpp
index 75a80a78a713b618835afaad13c6dff21d7449e8..ad3193f273827e335f3c146dc64f5173f6a1a83e 100644 (file)
@@ -392,12 +392,11 @@ static gboolean gtk_listbox_searchequal_callback(GtkTreeModel* model,
                              WXLISTBOX_DATACOLUMN_ARG(listbox),
                              &entry, -1);
     wxCHECK_MSG(entry, 0, wxT("Could not get entry"));
-    gchar* keycollatekey = g_utf8_collate_key(key, -1);
+    wxGtkString keycollatekey(g_utf8_collate_key(key, -1));
 
     int ret = strcasecmp(keycollatekey,
                          gtk_tree_entry_get_collate_key(entry));
 
-    g_free(keycollatekey);
     g_object_unref (entry);
 
     return ret != 0;
@@ -556,6 +555,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
     gtk_container_add (GTK_CONTAINER (m_widget), GTK_WIDGET(m_treeview) );
 
     gtk_widget_show( GTK_WIDGET(m_treeview) );
+    m_focusWidget = GTK_WIDGET(m_treeview);
 
     wxListBox::DoInsertItems(wxArrayString(n, choices), 0); // insert initial items
 
@@ -942,6 +942,7 @@ void wxListBox::DoSetSelection( int n, bool select )
     {
         // ... and not generate any events in the process
         GtkDeselectAll();
+       return;
     }
 
     wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") );