X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4349acd401ac74db826e046582c995e5b7052916..5ea6dbbfff67d1dfad08044ab721ba56425ef6e1:/src/gtk/listbox.cpp diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 1452563f50..e4936a923e 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -26,9 +26,9 @@ #include "wx/tooltip.h" #endif -#include "gdk/gdk.h" -#include "gtk/gtk.h" -#include "gdk/gdkkeysyms.h" +#include +#include +#include //----------------------------------------------------------------------------- // idle system @@ -327,12 +327,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, gtk_widget_show( GTK_WIDGET(m_list) ); - wxSize newSize = size; - if (newSize.x == -1) - newSize.x = 100; - if (newSize.y == -1) - newSize.y = 110; - SetSize( newSize.x, newSize.y ); + SetSizeOrDefault( size ); if ( style & wxLB_SORT ) { @@ -866,7 +861,7 @@ GtkWidget *wxListBox::GetConnectWidget() bool wxListBox::IsOwnGtkWindow( GdkWindow *window ) { - if (wxWindow::IsOwnGtkWindow( window )) return TRUE; + if (GTK_WIDGET(m_list)->window == window) return TRUE; GList *child = m_list->children; while (child) @@ -939,4 +934,9 @@ void wxListBox::OnInternalIdle() UpdateWindowUI(); } +wxSize wxListBox::DoGetBestSize() const +{ + return wxSize(100, 110); +} + #endif