projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use a virtual function instead of wxDynamicCast(wxMDIParentFrame) in wxFrame code...
[wxWidgets.git]
/
src
/
common
/
dlgcmn.cpp
diff --git
a/src/common/dlgcmn.cpp
b/src/common/dlgcmn.cpp
index e386099c3aa9e5354fd9cb4aa3d5085196563758..aa25908a2b4417103b4b5c759625ffa2a4fbfaa4 100644
(file)
--- a/
src/common/dlgcmn.cpp
+++ b/
src/common/dlgcmn.cpp
@@
-174,8
+174,6
@@
wxSizer *wxDialogBase::CreateTextSizer(const wxString& message)
wxSizer *wxDialogBase::CreateButtonSizer(long flags)
{
wxSizer *wxDialogBase::CreateButtonSizer(long flags)
{
- wxSizer *sizer = NULL;
-
#ifdef __SMARTPHONE__
wxDialog* dialog = (wxDialog*) this;
if ( flags & wxOK )
#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);
if ( flags & wxNO )
dialog->SetRightMenu(wxID_NO);
+
+ return NULL;
#else // !__SMARTPHONE__
#if wxUSE_BUTTON
#else // !__SMARTPHONE__
#if wxUSE_BUTTON
@@
-202,15
+202,19
@@
wxSizer *wxDialogBase::CreateButtonSizer(long flags)
wxSystemOptions::GetOptionInt(wxT("wince.dialog.real-ok-cancel")) )
#endif // __POCKETPC__
{
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);
#else // !wxUSE_BUTTON
wxUnusedVar(flags);
+
+ return NULL;
#endif // wxUSE_BUTTON/!wxUSE_BUTTON
#endif // __SMARTPHONE__/!__SMARTPHONE__
#endif // wxUSE_BUTTON/!wxUSE_BUTTON
#endif // __SMARTPHONE__/!__SMARTPHONE__
-
- return sizer;
}
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
}
wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags)
@@
-476,7
+480,17
@@
void wxDialogBase::OnSysColourChanged(wxSysColourChangedEvent& event)
bool wxDialogBase::DoLayoutAdaptation()
{
if (GetLayoutAdapter())
bool wxDialogBase::DoLayoutAdaptation()
{
if (GetLayoutAdapter())
- return GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this);
+ {
+ wxWindow* focusWindow = wxFindFocusDescendant(this); // from event.h
+ if (GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this))
+ {
+ if (focusWindow)
+ focusWindow->SetFocus();
+ return true;
+ }
+ else
+ return false;
+ }
else
return false;
}
else
return false;
}