From: <ma...@us...> - 2003-12-24 07:37:30
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv18575 Modified Files: wxInterface.cpp MainDlg.cpp Log Message: Minor debugging messages to stderr Index: wxInterface.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- wxInterface.cpp 23 Dec 2003 23:38:25 -0000 1.12 +++ wxInterface.cpp 24 Dec 2003 07:37:26 -0000 1.13 @@ -48,6 +48,7 @@ bool wxInterface::OnInit() { int show_splash = true; mainframe_active = false; + wxLog::SetActiveTarget(new wxLogStderr()); SetVendorName(wxT("ShareDaemon")); SetAppName(wxT("wxInterface")); Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- MainDlg.cpp 23 Dec 2003 00:40:50 -0000 1.36 +++ MainDlg.cpp 24 Dec 2003 07:37:26 -0000 1.37 @@ -250,7 +250,10 @@ return false; /* Nothing to show */ } else if (cur_page->short_title == to_show) { return false; /* Already shown */ + } else if (pages.Find(to_show) == NULL) { + return false; /* Not found */ } + wxLogDebug(wxT("Setting active page to `%s`"), to_show.c_str()); Page *new_page = pages.Find(to_show)->GetData(); if (new_page == NULL) { wxFAIL_MSG(wxString::Format( @@ -994,6 +997,11 @@ wxFAIL_MSG(wxT("Empty page passed for adding!")); return; } + wxLogDebug( + wxT("%s,%d: Adding page `%s` with title `%s`, image `%s`."), + wxString(__FILE__).c_str(), __LINE__, short_title.c_str(), + long_title.c_str(), image.c_str() + ); Page *newpage = new Page; newpage->content = page; newpage->short_title = short_title; |