]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/collpane.cpp
Borland has only lfind
[wxWidgets.git] / src / gtk / collpane.cpp
index bf6962fe7a6a8a35ddc07b5626bde1423981d741..b5fd6511b5fee9a726c053e85096298444bbe860 100644 (file)
@@ -22,6 +22,7 @@
 #include "wx/collpane.h"
 #include "wx/toplevel.h"
 #include "wx/sizer.h"
+#include "wx/panel.h"
 
 #include "wx/gtk/private.h"
 #include "wx/gtk/win_gtk.h"
@@ -92,6 +93,10 @@ static void gtk_collapsiblepane_expanded_callback (GObject    *object,
 
     if (p->HasFlag(wxCP_NO_TLW_RESIZE))
     {
+        // fire an event
+        wxCollapsiblePaneEvent ev(p, p->GetId(), p->IsCollapsed());
+        p->GetEventHandler()->ProcessEvent(ev);
+
         // the user asked to explicitely handle the resizing itself...
         return;
     }
@@ -101,7 +106,7 @@ static void gtk_collapsiblepane_expanded_callback (GObject    *object,
     if ( top && top->GetSizer() )
     {
         // 2) recalculate minimal size of the top window
-        wxSize sz = top->GetSizer()->CalcMin();
+        sz = top->GetSizer()->CalcMin();
 
         if (top->m_mainWidget)
         {
@@ -197,8 +202,6 @@ bool wxCollapsiblePane::Create(wxWindow *parent,
         return wxGenericCollapsiblePane::Create(parent, id, label,
                                                 pos, size, style, val, name);
 
-    m_needParent = true;
-    m_acceptsFocus = true;
     m_bIgnoreNextChange = false;
 
     if ( !PreCreation( parent, pos, size ) ||
@@ -225,7 +228,7 @@ bool wxCollapsiblePane::Create(wxWindow *parent,
     m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                            wxTAB_TRAVERSAL|wxNO_BORDER);
 
-    gtk_widget_show( GTK_WIDGET(m_widget) );
+    gtk_widget_show(m_widget);
     m_parent->DoAddChild( this );
 
     PostCreation(size);