]> git.saurik.com Git - wxWidgets.git/commitdiff
Distrib changes.
authorRobert Roebling <robert@roebling.de>
Sun, 31 Oct 1999 15:31:43 +0000 (15:31 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 31 Oct 1999 15:31:43 +0000 (15:31 +0000)
  Augemnted version to 2.1.11.
  Applied patch for wxGenericValidator.
  Corrected MDI's wxActivateEvent code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in
docs/gtk/changes.txt
docs/gtk/readme.txt
docs/gtk/todo.txt
docs/motif/install.txt
include/wx/version.h
src/common/valgen.cpp
src/gtk/mdi.cpp
src/gtk1/mdi.cpp
wxGTK.spec

index 8128b0c3ea3524621a9d68dd04749dcb0ec649e7..762304c6e1b88a7241fdffd33516ce47fddc1491 100644 (file)
@@ -401,7 +401,7 @@ dnl WX_INTERFACE_AGE = 0
 
 WX_MAJOR_VERSION_NUMBER=2
 WX_MINOR_VERSION_NUMBER=1
 
 WX_MAJOR_VERSION_NUMBER=2
 WX_MINOR_VERSION_NUMBER=1
-WX_RELEASE_NUMBER=10
+WX_RELEASE_NUMBER=11
 
 WX_INTERFACE_AGE=0
 WX_BINARY_AGE=0
 
 WX_INTERFACE_AGE=0
 WX_BINARY_AGE=0
index 19f119fa6e93dcc14d691bba1d33f8d43541e5ad..fbcd2e58e18b299f0857cd27a0f86821e9ef21b9 100644 (file)
@@ -1,5 +1,5 @@
 
 
-25th October '99: My birthday, wxWindows 2.1.10 released
+1st November '99: wxWindows 2.1.11 released
 
 There is still a unresolved problem with bitmap to image
 conversion on big-endian architectures (such as Solaris),
 
 There is still a unresolved problem with bitmap to image
 conversion on big-endian architectures (such as Solaris),
@@ -55,7 +55,8 @@ all relevant SQL databases (even DBase). For that reason
 I have reawakened the iODBC code from wxGTK 2.0 so you
 can now use wxODBC from wxMSW and wxGTK.
 
 I have reawakened the iODBC code from wxGTK 2.0 so you
 can now use wxODBC from wxMSW and wxGTK.
 
-Several printing things fixed.
+Several printing things fixed. More work needs to be done
+here..
 
 HTML widget and the wxWindows' help system based upon
 it have been reorganized and improved for easier use
 
 HTML widget and the wxWindows' help system based upon
 it have been reorganized and improved for easier use
@@ -107,6 +108,15 @@ A handler to read PCX file (in most variants) has been added.
 A number of problems with compressed and socket streams have
 been solved.
 
 A number of problems with compressed and socket streams have
 been solved.
 
+Changed behavour of wxTextStream to make use of deliminators
+and default to space as the standard C++ stream do.
+
+Changes to tab traversal code to better reflect MSW code.
+
+Corrected problems with wxGenericValidator and certain controls.
+
+Made default button action work in more cases.
+
 28th August '99: Ninth wxGTK 2.1 snapshot released
 
 As the old makefile system didn't work, I trashed it and wrote
 28th August '99: Ninth wxGTK 2.1 snapshot released
 
 As the old makefile system didn't work, I trashed it and wrote
index 34fcf18016c9ac41ed0a8f9f389f95a659d350d9..62b3bb14449afb9fdb7074e45460380b2b4e38c9 100644 (file)
@@ -1,10 +1,17 @@
 
 
-  Welcome to wxWindows/Gtk 2.1 snapshot 9,
+   Welcome to wxWindows/Gtk 2.1.11
 
 you have downloaded version 2.1 of the GTK+ 1.2 port of 
 
 you have downloaded version 2.1 of the GTK+ 1.2 port of 
-the wxWindows GUI library. This is a developers release
-and is it not suited for production development. Beware
-that major changes can happen before a final release.
+the wxWindows GUI library. Although this is not yet the
+final stable release wxGTK 2.2, the current version has
+been tested carefully on many systems and has been found
+to work better than any other previous version.
+
+Nonetheless, beware that major changes can happen before 
+a final release.
+
+wxWindows no longer supports GTK 1.0 (as did some early
+snapshots) so that you will need GTK 1.2 when using it.
 
 Beginning with snapshot 9, wxWindows uses a completely
 new make file system on Unix which no longer uses the
 
 Beginning with snapshot 9, wxWindows uses a completely
 new make file system on Unix which no longer uses the
@@ -15,18 +22,17 @@ More information is available from my homepage at:
 
   http://wesley.informatik.uni-freiburg.de/~wxxt
   
 
   http://wesley.informatik.uni-freiburg.de/~wxxt
   
-and about the wxWindows project as a whole (and the
-Windows and Motif ports in particular) can be found
-at Julian Smart's homepage at:
+and about the wxWindows project as a whole (and the MSW
+and Motif ports in particular) can be found at Julian's 
+homepage at:
 
   http://web.ukonline.co.uk/julian.smart/wxwin
   
 Information on how to install can be found in the file 
 INSTALL.txt, but if you cannot wait, this should work on
 
   http://web.ukonline.co.uk/julian.smart/wxwin
   
 Information on how to install can be found in the file 
 INSTALL.txt, but if you cannot wait, this should work on
-many systems (when using GTK 1.0 or when not using Linux
-read the INSTALL.txt):
+many systems:
 
 
-./configure
+./configure --with-gtk
 make
 su <type root password>
 make install
 make
 su <type root password>
 make install
index 12037f5f2685cd230406306b4cef104ff0f676f5..89a9b4c83c81898823214be3c190d67d37dbc5e6 100644 (file)
@@ -1,16 +1,10 @@
 
 -------------------- High priority ---------------------
 
 
 -------------------- High priority ---------------------
 
-Finalise DnD API.
 Fix bug that thread sample reports about non-finished threads.
 
 Fix bug that thread sample reports about non-finished threads.
 
-Added wxExpandedImageList to wxTreeControl.
-
 More testing of Unicode support.
 
 More testing of Unicode support.
 
-Make wxSockets work on all platform.
-
 Add ID based i18n system as a replacement for the
   unelegant gettext system.
   
 Add ID based i18n system as a replacement for the
   unelegant gettext system.
   
@@ -20,8 +14,6 @@ Add TIFF handler. Someone? (Hint, hint).
 
 Improve, update translations. Install *.mo files somewehere.
 
 
 Improve, update translations. Install *.mo files somewehere.
 
-Sleep, eat, walk, study, shave, read, play piano and wash less.
-
 -------------------- Medium priority ---------------------
 
 Show accelerator control labels and actually implement them
 -------------------- Medium priority ---------------------
 
 Show accelerator control labels and actually implement them
index efdd4aabfe292ca12555035544a98df532e8e903..99459b20d390f812dde02bd04e68f6bebb2de0e6 100644 (file)
@@ -315,7 +315,7 @@ are
        
        --without-libjpeg       Disables JPEG image format code.
        
        
        --without-libjpeg       Disables JPEG image format code.
        
-{      --without-odbc          Disables ODBC code. Not yet. }
+       --without-odbc          Disables ODBC code.
        
         --disable-resources     Disables the use of *.wxr type
                                resources.
        
         --disable-resources     Disables the use of *.wxr type
                                resources.
index 7b1f21ce054e44c26b947ac01cb2dd162ef7c57b..f0145306dea8e6a6f5fbfbda54c6299458fd4e8c 100644 (file)
@@ -15,8 +15,8 @@
 /* Bump-up with each new version */
 #define wxMAJOR_VERSION    2
 #define wxMINOR_VERSION    1
 /* Bump-up with each new version */
 #define wxMAJOR_VERSION    2
 #define wxMINOR_VERSION    1
-#define wxRELEASE_NUMBER   10
-#define wxVERSION_STRING "wxWindows 2.1.10"
+#define wxRELEASE_NUMBER   11
+#define wxVERSION_STRING "wxWindows 2.1.11"
 #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
 #define wxBETA_NUMBER      0
 #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
 #define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
 #define wxBETA_NUMBER      0
 #define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
index c230dddb21ba7e39a78ea401cf24e378c55152fd..05134307bc4f194da69551361c832998a58a9e02 100644 (file)
@@ -41,6 +41,7 @@
   #include "wx/textctrl.h"
   #include "wx/button.h"
   #include "wx/listbox.h"
   #include "wx/textctrl.h"
   #include "wx/button.h"
   #include "wx/listbox.h"
+  #include "wx/slider.h"
 #endif
 
 #ifndef __WIN16__
 #endif
 
 #ifndef __WIN16__
@@ -81,14 +82,14 @@ wxGenericValidator::wxGenericValidator(const wxGenericValidator& val)
 
 bool wxGenericValidator::Copy(const wxGenericValidator& val)
 {
 
 bool wxGenericValidator::Copy(const wxGenericValidator& val)
 {
-  wxValidator::Copy(val);
+    wxValidator::Copy(val);
 
 
-  m_pBool = val.m_pBool;
-  m_pInt = val.m_pInt;
-  m_pString = val.m_pString;
-  m_pArrayInt = val.m_pArrayInt;
+    m_pBool = val.m_pBool;
+    m_pInt = val.m_pInt;
+    m_pString = val.m_pString;
+    m_pArrayInt = val.m_pArrayInt;
 
 
-  return TRUE;
+    return TRUE;
 }
 
 wxGenericValidator::~wxGenericValidator()
 }
 
 wxGenericValidator::~wxGenericValidator()
@@ -98,131 +99,144 @@ wxGenericValidator::~wxGenericValidator()
 // Called to transfer data to the window
 bool wxGenericValidator::TransferToWindow(void)
 {
 // Called to transfer data to the window
 bool wxGenericValidator::TransferToWindow(void)
 {
-  if ( !m_validatorWindow )
-    return FALSE;
+    if ( !m_validatorWindow )
+        return FALSE;
 
 
-  // bool controls
+    // bool controls
 #if wxUSE_CHECKBOX
 #if wxUSE_CHECKBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
-  {
-    wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
-       if (m_pBool)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
     {
     {
-      pControl->SetValue(*m_pBool) ;
-      return TRUE;
-    }
-  } else
+        wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
+        if (m_pBool)
+       {
+           pControl->SetValue(*m_pBool);
+           return TRUE;
+       }
+    } else
 #endif
 #if wxUSE_RADIOBTN
 #endif
 #if wxUSE_RADIOBTN
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
-  {
-    wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
-       if (m_pBool)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
     {
     {
-      pControl->SetValue(*m_pBool) ;
-      return TRUE;
-    }
-  } else
+        wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
+       if (m_pBool)
+       {
+           pControl->SetValue(*m_pBool) ;
+           return TRUE;
+       }
+    } else
 #endif
 #endif
-  // int controls
+
+    // int controls
 #if wxUSE_GAUGE
 #if wxUSE_GAUGE
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
-  {
-    wxGauge* pControl = (wxGauge*) m_validatorWindow;
-       if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
     {
     {
-      pControl->SetValue(*m_pInt) ;
-      return TRUE;
-    }
-  }
-  else
+        wxGauge* pControl = (wxGauge*) m_validatorWindow;
+       if (m_pInt)
+       {
+           pControl->SetValue(*m_pInt);
+           return TRUE;
+       }
+    } else
 #endif
 #if wxUSE_RADIOBOX
 #endif
 #if wxUSE_RADIOBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
-  {
-    wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
-       if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
     {
     {
-      pControl->SetSelection(*m_pInt) ;
-      return TRUE;
-    }
-  }
-  else
+        wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
+       if (m_pInt)
+       {
+           pControl->SetSelection(*m_pInt) ;
+           return TRUE;
+       }
+    } else
 #endif
 #if wxUSE_SCROLLBAR
 #endif
 #if wxUSE_SCROLLBAR
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
-  {
-    wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
-       if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
     {
     {
-      pControl->SetThumbPosition(*m_pInt) ;
-      return TRUE;
-    }
-  } else
+        wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
+       if (m_pInt)
+       {
+           pControl->SetThumbPosition(*m_pInt) ;
+           return TRUE;
+       }
+    } else
 #endif
 #if wxUSE_SPINBTN
 #ifndef __WIN16__
 #endif
 #if wxUSE_SPINBTN
 #ifndef __WIN16__
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
-  {
-    wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
-    if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
     {
     {
-      pControl->SetValue(*m_pInt) ;
-      return TRUE;
-    }
-  } else
+        wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
+       if (m_pInt)
+       {
+           pControl->SetValue(*m_pInt) ;
+           return TRUE;
+       }
+    } else
 #endif
 #endif
 #endif
 #endif
+#if wxUSE_SLIDER
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
+    {
+        wxSlider* pControl = (wxSlider*) m_validatorWindow;
+        if (m_pInt)
+        {
+           pControl->SetValue(*m_pInt) ;
+           return TRUE;
+       }
+    } else
+#endif
+
   // string controls
   // string controls
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
-  {
-    wxButton* pControl = (wxButton*) m_validatorWindow;
-       if (m_pString)
+#if 1
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
     {
     {
-      pControl->SetLabel(*m_pString) ;
-      return TRUE;
-    }
-  } else
-#if wxUSE_COMBOBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
-  {
-    wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+        wxButton* pControl = (wxButton*) m_validatorWindow;
        if (m_pString)
        if (m_pString)
+       {
+           pControl->SetLabel(*m_pString) ;
+           return TRUE;
+       }
+    } else
+#endif
+#if wxUSE_COMBOBOX
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
     {
     {
-      pControl->SetValue(*m_pString) ;
-      return TRUE;
-    }
-  } else
+        wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+       if (m_pString)
+       {
+           pControl->SetValue(*m_pString) ;
+           return TRUE;
+       }
+    } else
 #endif
 #if wxUSE_CHOICE
 #endif
 #if wxUSE_CHOICE
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
-  {
-    wxChoice* pControl = (wxChoice*) m_validatorWindow;
-       if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
     {
     {
-      pControl->SetSelection(*m_pInt) ;
-      return TRUE;
-    }
-  } else
+        wxChoice* pControl = (wxChoice*) m_validatorWindow;
+       if (m_pInt)
+       {
+           pControl->SetSelection(*m_pInt) ;
+           return TRUE;
+       }
+    } else
 #endif
 #endif
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
-  {
-    wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
-       if (m_pString)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
     {
     {
-      pControl->SetLabel(*m_pString) ;
-      return TRUE;
-    }
-  }
-  else if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
-  {
-    wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
+        wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
        if (m_pString)
        if (m_pString)
+       {
+           pControl->SetLabel(*m_pString) ;
+           return TRUE;
+       }
+    } else 
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
     {
     {
-      pControl->SetValue(*m_pString) ;
-      return TRUE;
-    }
-  } else
+        wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
+       if (m_pString)
+       {
+           pControl->SetValue(*m_pString) ;
+           return TRUE;
+       }
+    } else
 #if wxUSE_CHECKLISTBOX
 #ifndef __WIN16__
   // array controls
 #if wxUSE_CHECKLISTBOX
 #ifndef __WIN16__
   // array controls
@@ -249,22 +263,22 @@ bool wxGenericValidator::TransferToWindow(void)
 #endif
 #endif
 #if wxUSE_LISTBOX
 #endif
 #endif
 #if wxUSE_LISTBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
-  {
-    wxListBox* pControl = (wxListBox*) m_validatorWindow;
-       if (m_pArrayInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
     {
     {
-      // clear all selections
-      int i;
-      for (i = 0 ; i < pControl->Number(); ++i)
-        pControl->Deselect(i);
-      // select each item in our array
-      unsigned u;
-      for (u = 0; u < m_pArrayInt->Count(); ++u)
-        pControl->SetSelection(m_pArrayInt->Item(u));
-      return TRUE;
-    }
-  } else
+        wxListBox* pControl = (wxListBox*) m_validatorWindow;
+       if (m_pArrayInt)
+       {
+           // clear all selections
+           int i;
+           for (i = 0 ; i < pControl->Number(); ++i)
+               pControl->Deselect(i);
+           // select each item in our array
+           unsigned u;
+           for (u = 0; u < m_pArrayInt->Count(); ++u)
+               pControl->SetSelection(m_pArrayInt->Item(u));
+           return TRUE;
+       }
+    } else
 #endif
 
   // unrecognized control, or bad pointer
 #endif
 
   // unrecognized control, or bad pointer
@@ -272,7 +286,7 @@ bool wxGenericValidator::TransferToWindow(void)
   return FALSE;
 }
 
   return FALSE;
 }
 
-// Called to transfer data to the window
+// Called to transfer data from the window
 bool wxGenericValidator::TransferFromWindow(void)
 {
   if ( !m_validatorWindow )
 bool wxGenericValidator::TransferFromWindow(void)
 {
   if ( !m_validatorWindow )
@@ -347,6 +361,17 @@ bool wxGenericValidator::TransferFromWindow(void)
     }
   } else
 #endif
     }
   } else
 #endif
+#endif
+#if wxUSE_SLIDER
+  if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
+  {
+    wxSlider* pControl = (wxSlider*) m_validatorWindow;
+    if (m_pInt)
+    {
+      pControl->SetValue(*m_pInt) ;
+      return TRUE;
+    }
+  } else
 #endif
   // string controls
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
 #endif
   // string controls
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
@@ -399,7 +424,7 @@ bool wxGenericValidator::TransferFromWindow(void)
       return TRUE;
     }
   } else
       return TRUE;
     }
   } else
-#if wxUSE_LISTBOX
+#if wxUSE_CHECKLISTBOX
 #ifndef __WIN16__
   // array controls
   // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
 #ifndef __WIN16__
   // array controls
   // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
index f31951f90c049f913797308e8c9696fc10bdb096..c8e3e8001f926494e7633d7f67fc3dfdcd23a876 100644 (file)
@@ -47,21 +47,51 @@ extern wxList wxPendingDelete;
 // "switch_page"
 //-----------------------------------------------------------------------------
 
 // "switch_page"
 //-----------------------------------------------------------------------------
 
-static void gtk_mdi_page_change_callback(GtkNotebook *WXUNUSED(widget),
-                                              GtkNotebookPage *WXUNUSED(page),
-                                              gint WXUNUSED(page),
-                                              wxMDIParentFrame *parent )
+static void 
+gtk_mdi_page_change_callback( GtkNotebook *widget,
+                              GtkNotebookPage *page,
+                             gint WXUNUSED(page_num),
+                             wxMDIParentFrame *parent )
 {
     if (g_isIdle) 
         wxapp_install_idle_handler();
 
 {
     if (g_isIdle) 
         wxapp_install_idle_handler();
 
+    // send deactivate event to old child
+
     wxMDIChildFrame *child = parent->GetActiveChild();
     wxMDIChildFrame *child = parent->GetActiveChild();
+    if (child)
+    {
+        wxActivateEvent event1( wxEVT_ACTIVATE, FALSE, child->GetId() );
+        event1.SetEventObject( child);
+        child->GetEventHandler()->ProcessEvent( event1 );
+    }
+    
+    // send activate event to new child
     
     
-    if (!child) return;
+    wxMDIClientWindow *client_window = parent->GetClientWindow();
+    if (!client_window)
+        return;
+
+    child = (wxMDIChildFrame*) NULL;
 
 
-    wxActivateEvent event( wxEVT_ACTIVATE, TRUE, child->GetId() );
-    event.SetEventObject( child);
-    child->GetEventHandler()->ProcessEvent( event );
+    wxNode *node = client_window->GetChildren().First();
+    while (node)
+    {
+        wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
+        if (child_frame->m_page == page)
+       {
+            child = child_frame;
+           break;
+       }
+        node = node->Next();
+    }
+    
+    if (!child)
+         return;
+    
+    wxActivateEvent event2( wxEVT_ACTIVATE, TRUE, child->GetId() );
+    event2.SetEventObject( child);
+    child->GetEventHandler()->ProcessEvent( event2 );
 }
 
 //-----------------------------------------------------------------------------
 }
 
 //-----------------------------------------------------------------------------
index f31951f90c049f913797308e8c9696fc10bdb096..c8e3e8001f926494e7633d7f67fc3dfdcd23a876 100644 (file)
@@ -47,21 +47,51 @@ extern wxList wxPendingDelete;
 // "switch_page"
 //-----------------------------------------------------------------------------
 
 // "switch_page"
 //-----------------------------------------------------------------------------
 
-static void gtk_mdi_page_change_callback(GtkNotebook *WXUNUSED(widget),
-                                              GtkNotebookPage *WXUNUSED(page),
-                                              gint WXUNUSED(page),
-                                              wxMDIParentFrame *parent )
+static void 
+gtk_mdi_page_change_callback( GtkNotebook *widget,
+                              GtkNotebookPage *page,
+                             gint WXUNUSED(page_num),
+                             wxMDIParentFrame *parent )
 {
     if (g_isIdle) 
         wxapp_install_idle_handler();
 
 {
     if (g_isIdle) 
         wxapp_install_idle_handler();
 
+    // send deactivate event to old child
+
     wxMDIChildFrame *child = parent->GetActiveChild();
     wxMDIChildFrame *child = parent->GetActiveChild();
+    if (child)
+    {
+        wxActivateEvent event1( wxEVT_ACTIVATE, FALSE, child->GetId() );
+        event1.SetEventObject( child);
+        child->GetEventHandler()->ProcessEvent( event1 );
+    }
+    
+    // send activate event to new child
     
     
-    if (!child) return;
+    wxMDIClientWindow *client_window = parent->GetClientWindow();
+    if (!client_window)
+        return;
+
+    child = (wxMDIChildFrame*) NULL;
 
 
-    wxActivateEvent event( wxEVT_ACTIVATE, TRUE, child->GetId() );
-    event.SetEventObject( child);
-    child->GetEventHandler()->ProcessEvent( event );
+    wxNode *node = client_window->GetChildren().First();
+    while (node)
+    {
+        wxMDIChildFrame *child_frame = (wxMDIChildFrame *)node->Data();
+        if (child_frame->m_page == page)
+       {
+            child = child_frame;
+           break;
+       }
+        node = node->Next();
+    }
+    
+    if (!child)
+         return;
+    
+    wxActivateEvent event2( wxEVT_ACTIVATE, TRUE, child->GetId() );
+    event2.SetEventObject( child);
+    child->GetEventHandler()->ProcessEvent( event2 );
 }
 
 //-----------------------------------------------------------------------------
 }
 
 //-----------------------------------------------------------------------------
index 19682dac185a66266ca78c7ea3c424f0d4860cd2..7e2c946ac8384fa4e53016d5ec156cba1d400f73 100644 (file)
@@ -1,6 +1,6 @@
 # Note that this is NOT a relocatable package
 %define pref /usr
 # Note that this is NOT a relocatable package
 %define pref /usr
-%define ver 2.1.10
+%define ver 2.1.11
 %define rel 0
 
 Summary: The GTK+ 1.2 port of the wxWindows library
 %define rel 0
 
 Summary: The GTK+ 1.2 port of the wxWindows library
@@ -9,7 +9,7 @@ Version: %{ver}
 Release: %{rel}
 Copyright: wxWindows Licence
 Group: X11/Libraries
 Release: %{rel}
 Copyright: wxWindows Licence
 Group: X11/Libraries
-Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK-2.1.10.tgz
+Source: ftp://wesley.informatik.uni-freiburg.de/pub/linux/wxxt/source/wxGTK-2.1.11.tgz
 URL: http://wesley.informatik.uni-freiburg.de/~wxxt/docs.html
 Packager: Robert Roebling <roebling@ruf.uni-freiburg.de>
 BuildRoot: /tmp/wxgtk_root
 URL: http://wesley.informatik.uni-freiburg.de/~wxxt/docs.html
 Packager: Robert Roebling <roebling@ruf.uni-freiburg.de>
 BuildRoot: /tmp/wxgtk_root