]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed bug in MDI
authorRobert Roebling <robert@roebling.de>
Tue, 28 Jul 1998 07:50:45 +0000 (07:50 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 28 Jul 1998 07:50:45 +0000 (07:50 +0000)
  Changed FortyThieves to 2.0 dialog logic
  Did I modify dialog.cpp as well?

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

samples/forty/canvas.cpp
samples/forty/playerdg.cpp
src/gtk/mdi.cpp
src/gtk1/mdi.cpp

index a6d1137ee7c682c893a89e23f3a38ca409ca34cf..acaf9a548f1b6ff7c6da31fc913681ef2d957712 100644 (file)
@@ -99,6 +99,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
        if (m_player.Length() == 0 && !m_playerDialog)
        {
                m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
+               m_playerDialog->ShowModal();
                m_player = m_playerDialog->GetPlayersName();
                if (m_player.Length() > 0)
                {
index 38160488daab2e5cb9d854960c78f858c5675eb6..aa671d0adcdfce8025c5e15a2d2b693cdbf0eeaf 100644 (file)
@@ -59,6 +59,9 @@ PlayerSelectionDialog::PlayerSelectionDialog(
                                                0, 0,
                                                wxLB_SINGLE
                                                );
+/*
+    Robert Roebling
+    
        int numPlayers = 0;
        wxString* players = 0;
        m_scoreFile->GetPlayerList(&players, numPlayers);
@@ -67,6 +70,7 @@ PlayerSelectionDialog::PlayerSelectionDialog(
                list->Append(players[i]);
        }
        delete players;
+*/
 
        m_textField = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, 0);
 
@@ -136,8 +140,10 @@ void PlayerSelectionDialog::OnSize(wxSizeEvent& event)
 
 const wxString& PlayerSelectionDialog::GetPlayersName()
 {
+/*
        m_player = "";
        Show(TRUE);
+*/
        return m_player;
 }
 
index 4428a9edad71f9bd890e41dde5e36727643059f4..ba49975d89a87381bdfecc4c430d9d967381bfeb 100644 (file)
@@ -372,6 +372,8 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
   mdi_child->m_page = (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data);
     
   gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
+  
+  gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
 };
 
 
index 4428a9edad71f9bd890e41dde5e36727643059f4..ba49975d89a87381bdfecc4c430d9d967381bfeb 100644 (file)
@@ -372,6 +372,8 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
   mdi_child->m_page = (GtkNotebookPage*) (g_list_last(GTK_NOTEBOOK(m_widget)->children)->data);
     
   gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
+  
+  gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
 };