]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
supporting promised file urls for transfer, see #14281
[wxWidgets.git] / src / gtk / listbox.cpp
index b17d1a32c65e73766c71d21ce4513f48321ade58..621f0199c992c75d6eea1cd31b5118a407534c50 100644 (file)
@@ -210,7 +210,7 @@ static gint gtk_listbox_sort_callback(GtkTreeModel * WXUNUSED(model),
     wxCHECK_MSG(entry2, 0, wxT("Could not get second entry"));
 
     //We compare collate keys here instead of calling g_utf8_collate
-    //as it is rather slow (and even the docs reccommend this)
+    //as it is rather slow (and even the docs recommend this)
     return strcmp(gtk_tree_entry_get_collate_key(entry1),
                   gtk_tree_entry_get_collate_key(entry2)) >= 0;
 }
@@ -433,7 +433,7 @@ void wxListBox::Update()
     wxWindow::Update();
 
     if (m_treeview)
-        gdk_window_process_updates(GTK_WIDGET(m_treeview)->window, TRUE);
+        gdk_window_process_updates(gtk_widget_get_window(GTK_WIDGET(m_treeview)), true);
 }
 
 // ----------------------------------------------------------------------------
@@ -497,6 +497,8 @@ void wxListBox::DoClear()
     gtk_list_store_clear( m_liststore ); /* well, THAT was easy :) */
 
     GTKEnableEvents();
+
+    UpdateOldSelections();
 }
 
 void wxListBox::DoDeleteOneItem(unsigned int n)
@@ -727,7 +729,7 @@ bool wxListBox::IsSelected( int n ) const
     GtkTreeIter iter;
     wxCHECK_MSG( GTKGetIteratorFor(n, &iter), false, wxT("Invalid index") );
 
-    return gtk_tree_selection_iter_is_selected(selection, &iter);
+    return gtk_tree_selection_iter_is_selected(selection, &iter) != 0;
 }
 
 void wxListBox::DoSetSelection( int n, bool select )
@@ -855,7 +857,7 @@ GdkWindow *wxListBox::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
 
 void wxListBox::DoApplyWidgetStyle(GtkRcStyle *style)
 {
-    if (m_hasBgCol && m_backgroundColour.Ok())
+    if (m_hasBgCol && m_backgroundColour.IsOk())
     {
         GdkWindow *window = gtk_tree_view_get_bin_window(m_treeview);
         if (window)