From: <ma...@us...> - 2003-12-29 06:08:51
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv18163 Modified Files: MainDlg.cpp ServerWnd.cpp ServerWnd.h wxInterface.cpp Log Message: Log messages are now also directed to server page logs box. Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- MainDlg.cpp 27 Dec 2003 12:38:55 -0000 1.43 +++ MainDlg.cpp 29 Dec 2003 06:08:48 -0000 1.44 @@ -1083,7 +1083,6 @@ img->UpdateImages(pages[i]->content); } CreateMyToolBar(true); - serverwnd->SetLogBookImages(); statisticswnd->GetTree()->GetTreeImages(); statisticswnd->GetTree()->GenerateTree(); @@ -1095,4 +1094,5 @@ #endif Thaw(); + Refresh(); } Index: ServerWnd.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- ServerWnd.cpp 27 Dec 2003 07:18:20 -0000 1.52 +++ ServerWnd.cpp 29 Dec 2003 06:08:48 -0000 1.53 @@ -72,7 +72,6 @@ /* Set the images of static bitmaps on this page. */ GetSSBitmapProvider()->SetBitmap(img->GetImage(wxT("provider"))); - SetLogBookImages(); } /* @@ -94,16 +93,6 @@ m_config->Write(wxT("SideBar"), sidebar->IsShown()); } -/* Set log notebook page images */ -void CServerWnd::SetLogBookImages() { - m_imagelist = new wxImageList(16, 16); - m_imagelist->Add(img->GetImage(wxT("log"))); - - GetLogBook()->AssignImageList(m_imagelist); - GetLogBook()->SetPageImage(0, 0); - GetLogBook()->SetPageImage(1, 0); -} - /** * These three almost identical methods add a line of [text] into the * corresponding log listctrls, optionally also displaying it in statusbar. @@ -281,49 +270,22 @@ wxNO_FULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL); wxFlexGridSizer *s_bottom = new wxFlexGridSizer(1); s_bottom->AddGrowableCol(0); - s_bottom->AddGrowableRow(0); - wxNotebook *logs = new wxNotebook( - bottom_panel, ID_LOGBOOK, wxDefaultPosition, wxDefaultSize, - wxNO_FULL_REPAINT_ON_RESIZE - ); - wxNotebookSizer *s_logs = new wxNotebookSizer(logs); - wxImageList *imgs = new wxImageList(16, 16); - imgs->Add(img->GetImage(wxT("log"))); - logs->AssignImageList(imgs); - - /* General logs panel */ - wxPanel *p_logs = new wxPanel( - logs, -1, wxDefaultPosition, wxDefaultSize, - wxNO_FULL_REPAINT_ON_RESIZE + s_bottom->AddGrowableRow(1); + wxBoxSizer *s_log = new wxBoxSizer(wxHORIZONTAL); + wxStaticBitmap *log_img = new wxStaticBitmap( + bottom_panel, -1, img->GetImage(wxT("log")), wxDefaultPosition, + wxDefaultSize, 0, wxT("log") ); - wxFlexGridSizer *sf_logs = new wxFlexGridSizer(1); - sf_logs->AddGrowableCol(0); - sf_logs->AddGrowableRow(0); + s_log->Add(log_img, 0, wxALL, 5); + wxStaticText *log_txt = new wxStaticText(bottom_panel, -1, _("Log")); + s_log->Add(log_txt, 0, wxALL, 5); + s_bottom->Add(s_log); wxTextCtrl *txt_logs = new wxTextCtrl( - p_logs, ID_LOG, wxEmptyString, wxDefaultPosition, - wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY - ); - sf_logs->Add(txt_logs, 0, wxGROW|wxALL|wxEXPAND, 0); - p_logs->SetSizer(sf_logs); - logs->AddPage(p_logs, _("Log"), true, 0); - - /* Debug logs panel */ - wxPanel *p_dlogs = new wxPanel( - logs, -1, wxDefaultPosition, wxDefaultSize, - wxNO_FULL_REPAINT_ON_RESIZE - ); - wxFlexGridSizer *sf_dlogs = new wxFlexGridSizer(1); - sf_dlogs->AddGrowableCol(0); - sf_dlogs->AddGrowableRow(0); - wxTextCtrl *txt_dlogs = new wxTextCtrl( - p_dlogs, ID_DEBUGLOG, wxEmptyString, wxDefaultPosition, + bottom_panel, ID_LOG, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - sf_dlogs->Add(txt_dlogs, 0, wxGROW|wxALL|wxEXPAND, 0); - p_dlogs->SetSizer(sf_dlogs); - logs->AddPage(p_dlogs, _("Debug Log"), false, 0); - - s_bottom->Add(s_logs, 0, wxGROW|wxEXPAND|wxTOP|wxRIGHT, 5); + new wxLogChain(new wxLogTextCtrl(txt_logs)); + s_bottom->Add(txt_logs, 0, wxGROW|wxEXPAND, 5); bottom_panel->SetSizer(s_bottom); /* Split the window and add to sizer */ Index: ServerWnd.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- ServerWnd.h 6 Dec 2003 00:45:36 -0000 1.31 +++ ServerWnd.h 29 Dec 2003 06:08:48 -0000 1.32 @@ -57,7 +57,6 @@ void AddLogLine(wxString text, bool status = false); void AddDebugLine(wxString text, bool status = false); void AddServerLogLine(wxString text, bool status = false); - void SetLogBookImages(); private: DECLARE_EVENT_TABLE() Index: wxInterface.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- wxInterface.cpp 24 Dec 2003 07:37:26 -0000 1.13 +++ wxInterface.cpp 29 Dec 2003 06:08:48 -0000 1.14 @@ -48,7 +48,7 @@ bool wxInterface::OnInit() { int show_splash = true; mainframe_active = false; - wxLog::SetActiveTarget(new wxLogStderr()); + new wxLogChain(new wxLogStderr); SetVendorName(wxT("ShareDaemon")); SetAppName(wxT("wxInterface")); |