]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dlgcmn.cpp
use buffered streams to reduce the number of TCP packets used per IPC command from...
[wxWidgets.git] / src / common / dlgcmn.cpp
index 1770605db92708c8ed17a6c7993e4bac9bf0e613..d99c8c0880bf6cc177c8694b185e0334bdd3df57 100644 (file)
@@ -174,8 +174,6 @@ wxSizer *wxDialogBase::CreateTextSizer(const wxString& message)
 
 wxSizer *wxDialogBase::CreateButtonSizer(long flags)
 {
-    wxSizer *sizer = NULL;
-
 #ifdef __SMARTPHONE__
     wxDialog* dialog = (wxDialog*) this;
     if ( flags & wxOK )
@@ -189,6 +187,8 @@ wxSizer *wxDialogBase::CreateButtonSizer(long flags)
 
     if ( flags & wxNO )
         dialog->SetRightMenu(wxID_NO);
+
+    return NULL;
 #else // !__SMARTPHONE__
 
 #if wxUSE_BUTTON
@@ -202,15 +202,19 @@ wxSizer *wxDialogBase::CreateButtonSizer(long flags)
             wxSystemOptions::GetOptionInt(wxT("wince.dialog.real-ok-cancel")) )
 #endif // __POCKETPC__
     {
-        sizer = CreateStdDialogButtonSizer(flags);
+        return CreateStdDialogButtonSizer(flags);
     }
+#ifdef __POCKETPC__
+    return NULL;
+#endif // __POCKETPC__
+
 #else // !wxUSE_BUTTON
     wxUnusedVar(flags);
+
+    return NULL;
 #endif // wxUSE_BUTTON/!wxUSE_BUTTON
 
 #endif // __SMARTPHONE__/!__SMARTPHONE__
-
-    return sizer;
 }
 
 wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
@@ -529,6 +533,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
 {
     if (dialog->GetSizer())
     {
+#if wxUSE_BOOKCTRL
         wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
 
         if (bookContentWindow)
@@ -564,6 +569,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
             FitWithScrolling(dialog, windows);
         }
         else
+#endif // wxUSE_BOOKCTRL
         {
             // If we have an arbitrary dialog, create a scrolling area for the main content, and a button sizer
             // for the main buttons.