Handle Cancel button in userdlg
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5d33ed2c6b
commit
ed6e827e23
@ -208,23 +208,24 @@ bool BrowserDB::OnStartDB(int Quite)
|
||||
//---------------------------------------------------------------------------
|
||||
// Connect to datasource
|
||||
//---------------------------
|
||||
DlgUser p_Dlg(pDoc->p_MainFrame, "Username and Password");
|
||||
p_Dlg.s_DSN = ODBCSource;
|
||||
p_Dlg.s_User = UserName;
|
||||
p_Dlg.s_Password = Password;
|
||||
p_Dlg.OnInit();
|
||||
p_Dlg.Fit();
|
||||
DlgUser *p_Dlg = new DlgUser(pDoc->p_MainFrame, "Username and Password");
|
||||
p_Dlg->s_DSN = ODBCSource;
|
||||
p_Dlg->s_User = UserName;
|
||||
p_Dlg->s_Password = Password;
|
||||
p_Dlg->OnInit();
|
||||
p_Dlg->Fit();
|
||||
|
||||
bool OK = FALSE;
|
||||
if (p_Dlg.ShowModal() == wxID_OK)
|
||||
if (p_Dlg->ShowModal() == wxID_OK)
|
||||
{
|
||||
(pDoc->p_DSN+i_Which)->Usr = p_Dlg.s_User;
|
||||
(pDoc->p_DSN+i_Which)->Pas = p_Dlg.s_Password;
|
||||
UserName = p_Dlg.s_User;
|
||||
Password = p_Dlg.s_Password;
|
||||
(pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User;
|
||||
(pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password;
|
||||
UserName = p_Dlg->s_User;
|
||||
Password = p_Dlg->s_Password;
|
||||
OK = TRUE;
|
||||
}
|
||||
p_Dlg.Destroy();
|
||||
//p_Dlg.Destroy();
|
||||
delete p_Dlg;
|
||||
|
||||
if (OK)
|
||||
{
|
||||
|
@ -189,6 +189,7 @@ int DBTree::OnPopulate()
|
||||
} // if((pDoc->db_Br+i_Which)->Initialize(FALSE))
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
wxLogMessage(_("\n-E-> DBTree::OnPopulate() : A valid Pointer could not be created : Failed"));
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -80,8 +80,10 @@ mjDoc::~mjDoc()
|
||||
bool mjDoc::OnNewDocument()
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
if (!OnInitView()) // LogBook is now activ
|
||||
if (!OnInitView())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
p_PgmCtrl->OnPopulate();
|
||||
//-------------------------------------------------------------------
|
||||
return TRUE;
|
||||
|
@ -398,7 +398,7 @@ void wxTabbedWindow::DrawDecorations( wxDC& dc )
|
||||
long x,w,h;
|
||||
|
||||
// set select default font of the window into it's device context
|
||||
dc.SetFont( GetLabelingFont() );
|
||||
//dc.SetFont( GetLabelingFont() );
|
||||
|
||||
dc.SetTextBackground( GetBackgroundColour() );
|
||||
|
||||
@ -525,7 +525,7 @@ void wxTabbedWindow::RecalcLayout(bool andRepaint)
|
||||
long w,h;
|
||||
|
||||
// set select default font of the window into it's device context
|
||||
dc.SetFont( GetLabelingFont() );
|
||||
//dc.SetFont( GetLabelingFont() );
|
||||
|
||||
dc.GetTextExtent(tab.mText, &w, &h );
|
||||
|
||||
@ -769,7 +769,7 @@ void wxPaggedWindow::DrawPaperBar( twTabInfo& tab, int x, int y,
|
||||
long w,h;
|
||||
|
||||
// set select default font of the window into it's device context
|
||||
dc.SetFont( GetLabelingFont() );
|
||||
//dc.SetFont( GetLabelingFont() );
|
||||
|
||||
dc.SetTextBackground( brush.GetColour() );
|
||||
|
||||
@ -999,7 +999,7 @@ void wxPaggedWindow::RecalcLayout(bool andRepaint)
|
||||
long w,h;
|
||||
|
||||
// set select default font of the window into it's device context
|
||||
dc.SetFont( GetLabelingFont() );
|
||||
//dc.SetFont( GetLabelingFont() );
|
||||
dc.GetTextExtent(tab.mText, &w, &h );
|
||||
|
||||
tab.mDims.x = w + tab.ImageToTxtGap(mImageTextGap) +
|
||||
|
Loading…
Reference in New Issue
Block a user