X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8584b0e64b273273bad122d28b10176bd5a3bc84..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/gtk/listbox.cpp diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 9a406184bd..d76523b681 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -34,7 +34,11 @@ #endif #include + #include +#if GTK_CHECK_VERSION(3,0,0) +#include +#endif //----------------------------------------------------------------------------- // data @@ -429,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); } // ---------------------------------------------------------------------------- @@ -769,7 +773,7 @@ void wxListBox::DoScrollToCell(int n, float alignY, float alignX) wxCHECK_RET( IsValid(n), wxT("invalid index")); //RN: I have no idea why this line is needed... - if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_treeview)) + if (gdk_pointer_is_grabbed () && gtk_widget_has_grab(GTK_WIDGET(m_treeview))) return; GtkTreeIter iter; @@ -837,23 +841,6 @@ int wxListBox::DoListHitTest(const wxPoint& point) const // helpers // ---------------------------------------------------------------------------- -#if wxUSE_TOOLTIPS -void wxListBox::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ) -{ -#if GTK_CHECK_VERSION(2, 12, 0) - if (!gtk_check_version(2, 12, 0)) - { - gtk_widget_set_tooltip_text(GTK_WIDGET( m_treeview ), tip); - } - else -#endif - { - // RN: Is this needed anymore? - gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, NULL ); - } -} -#endif // wxUSE_TOOLTIPS - GtkWidget *wxListBox::GetConnectWidget() { // the correct widget for listbox events (such as mouse clicks for example) @@ -868,7 +855,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)