]> git.saurik.com Git - wxWidgets.git/commitdiff
removed duplicated code
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 16:49:15 +0000 (16:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 19 Nov 2004 16:49:15 +0000 (16:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/notebook/notebook.cpp

index cfa1b98282304e8b68f68b50e00eee27bf55f0bc..e15d1c5f46691debf159a254acaa369248305a21 100644 (file)
@@ -390,19 +390,7 @@ int MyFrame::SelectFlag(int id, int nb, int lb, int chb)
     }                                                                              \
     else                                                                           \
     {                                                                              \
-        wxPanel *panel = CreateRadioButtonsPage(newBook);                          \
-        newBook->AddPage( panel, RADIOBUTTONS_PAGE_NAME, false, GetIconIndex(newBook) ); \
-                                                                                   \
-        panel = CreateVetoPage(newBook);                                           \
-        newBook->AddPage( panel, VETO_PAGE_NAME, false, GetIconIndex(newBook) );   \
-                                                                                   \
-        panel = CreateBigButtonPage(newBook);                                      \
-        newBook->AddPage( panel, MAXIMIZED_BUTTON_PAGE_NAME, false, GetIconIndex(newBook) ); \
-                                                                                   \
-        panel = CreateInsertPage(newBook);                                         \
-        newBook->InsertPage( 0, panel, I_WAS_INSERTED_PAGE_NAME, false, GetIconIndex(newBook) ); \
-                                                                                   \
-        newBook->SetSelection(1);                                                  \
+        CreateInitialPages(newBook);                                               \
     }                                                                              \
                                                                                    \
     m_sizerFrame->Insert(0, newBook, 5, wxEXPAND | wxALL, 4);                      \