]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
fixed detection of listbox background
[wxWidgets.git] / src / gtk / window.cpp
index b84f556764692a5889adcfc934343e7dd68f4b65..5e09f6f528311003e350e0ab6d8b067d4b9d6544 100644 (file)
@@ -1658,7 +1658,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
 
     if (win->m_isScrolling)
     {
-        wxEventType command = wxEVT_SCROLLWIN_THUMBRELEASE;
+        wxEventType command = wxEVT_SCROLL_THUMBRELEASE;
         int value = -1;
         int dir = -1;
 
@@ -2147,7 +2147,10 @@ wxWindow::~wxWindow()
 
     if (m_widgetStyle)
     {
-        gtk_style_unref( m_widgetStyle );
+        // don't delete if it's a pixmap theme style
+        if (!m_widgetStyle->engine_data)
+            gtk_style_unref( m_widgetStyle );
+            
         m_widgetStyle = (GtkStyle*) NULL;
     }
 
@@ -3040,6 +3043,18 @@ GtkStyle *wxWindow::GetWidgetStyle()
 
 void wxWindow::SetWidgetStyle()
 {
+    if (m_widget->style->engine_data)
+    {
+        static bool s_warningPrinted = FALSE;
+        if (!s_warningPrinted)
+        {
+            printf( "wxWindows warning: Widget styles disabled due to buggy GTK theme.\n" );
+            s_warningPrinted = TRUE;
+        }
+        m_widgetStyle = m_widget->style;
+        return;
+    }
+
     GtkStyle *style = GetWidgetStyle();
 
     if (m_font != wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT ))