Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv26282 Modified Files: GUISettingsDlg.cpp Images.cpp MainDlg.cpp MainDlg.h ServerWnd.cpp StatisticsTreeCtrl.cpp StatisticsWnd.h Log Message: Reformatted code to fit in 80-char-per-line limit. Index: GUISettingsDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/GUISettingsDlg.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- GUISettingsDlg.cpp 30 Nov 2003 21:04:38 -0000 1.24 +++ GUISettingsDlg.cpp 30 Nov 2003 23:07:27 -0000 1.25 @@ -382,21 +382,31 @@ wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL ); wxString *strs4 = (wxString*) NULL; - wxChoice *item4 = new wxChoice( this, ID_LANG, wxDefaultPosition, wxSize(100,-1), 0, strs4, 0 ); + wxChoice *item4 = new wxChoice( + this, ID_LANG, wxDefaultPosition, wxSize(100,-1), 0, strs4, 0 + ); #ifndef __WXX11__ - item4->SetToolTip( _("Change the language of the interface. Requires interface restart to take effect") ); + item4->SetToolTip( + _("Change the language of the interface. Requires interface \ + restart to take effect") ); #endif item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); wxGridSizer *item5 = new wxGridSizer( 2, 0, 0 ); - wxButton *item6 = new wxButton( this, ID_BTN_ADDLANG, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item6 = new wxButton( + this, ID_BTN_ADDLANG, _("Add"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ item6->SetToolTip( _("Add new language") ); #endif item5->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - wxButton *item7 = new wxButton( this, ID_BTN_REMOVELANG, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item7 = new wxButton( + this, ID_BTN_REMOVELANG, _("Remove"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ item7->SetToolTip( _("Remove currently selected language") ); #endif @@ -410,7 +420,10 @@ wxStaticBoxSizer *item8 = new wxStaticBoxSizer( item9, wxVERTICAL ); wxString *strs10 = (wxString*) NULL; - wxChoice *item10 = new wxChoice( this, ID_ICONSET, wxDefaultPosition, wxSize(100,-1), 0, strs10, 0 ); + wxChoice *item10 = new wxChoice( + this, ID_ICONSET, wxDefaultPosition, wxSize(100,-1), 0, + strs10, 0 + ); #ifndef __WXX11__ item10->SetToolTip( _("Change the iconet the interface should use.") ); #endif @@ -418,13 +431,19 @@ wxGridSizer *item11 = new wxGridSizer( 2, 0, 0 ); - wxButton *item12 = new wxButton( this, ID_BTN_ADDICONSET, _("Add"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item12 = new wxButton( + this, ID_BTN_ADDICONSET, _("Add"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ item12->SetToolTip( _("Add new iconset") ); #endif item11->Add( item12, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - wxButton *item13 = new wxButton( this, ID_BTN_REMOVEICONSET, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item13 = new wxButton( + this, ID_BTN_REMOVEICONSET, _("Remove"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ item13->SetToolTip( _("Remove currently selected iconset") ); #endif @@ -444,13 +463,19 @@ wxString strs17[] = { _("Default") }; - wxChoice *item17 = new wxChoice( this, ID_FONT, wxDefaultPosition, wxSize(100,-1), 1, strs17, 0 ); + wxChoice *item17 = new wxChoice( + this, ID_FONT, wxDefaultPosition, + wxSize(100,-1), 1, strs17, 0 + ); #ifndef __WXX11__ item17->SetToolTip( _("Change the font") ); #endif - item15->Add( item17, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item15->Add( item17, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5); - wxStaticText *item18 = new wxStaticText( this, ID_TEXT, _("Font Test :)"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticText *item18 = new wxStaticText( + this, ID_TEXT, _("Font Test :)"), wxDefaultPosition, + wxDefaultSize, 0 + ); item15->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 ); item14->Add( item15, 0, wxGROW|wxLEFT|wxRIGHT, 5 ); @@ -466,17 +491,27 @@ _("Messages"), _("Statistics") }; - wxChoice *item21 = new wxChoice( this, ID_STARTPAGE, wxDefaultPosition, wxSize(100,-1), 6, strs21, 0 ); + wxChoice *item21 = new wxChoice( + this, ID_STARTPAGE, wxDefaultPosition, wxSize(100,-1), + 6, strs21, 0 + ); #ifndef __WXX11__ - item21->SetToolTip( _("Set which page will be displayed on program startup") ); + item21->SetToolTip( + _("Set which page will be displayed on program startup") + ); #endif item19->Add( item21, 0, wxGROW|border_style, 5 ); - wxCheckBox *item22 = new wxCheckBox( this, ID_REMEMBER_LAST, _("Remember last"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item22 = new wxCheckBox( + this, ID_REMEMBER_LAST, _("Remember last"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ - item22->SetToolTip( _("Automatically remember which page was open between sessions") ); + item22->SetToolTip( + _("Automatically remember which page was \ + open between sessions")); #endif - item19->Add( item22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item19->Add(item22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5); item14->Add( item19, 0, wxLEFT|wxRIGHT, 5 ); @@ -484,58 +519,102 @@ wxBoxSizer *item23 = new wxBoxSizer( wxVERTICAL ); - wxCheckBox *item24 = new wxCheckBox( this, ID_SHOWSPLASH, _("Show splashscreen"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item24 = new wxCheckBox( + this, ID_SHOWSPLASH, _("Show splashscreen"), + wxDefaultPosition, wxDefaultSize, 0 + ); item24->SetValue( TRUE ); #ifndef __WXX11__ - item24->SetToolTip( _("Toggle wether splashscreen should be shown on program startup or not. Speeds up application starting if turned off. Default: On") ); + item24->SetToolTip( + _("Toggle wether splashscreen should be shown on program \ + startup or not. Speeds up application starting if turned off. \ + Default: On") + ); #endif item23->Add( item24, 0, wxGROW|wxLEFT|border_style, 5 ); - wxCheckBox *item25 = new wxCheckBox( this, ID_PROMPTEXIT, _("Prompt on exit"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item25 = new wxCheckBox( + this, ID_PROMPTEXIT, _("Prompt on exit"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ - item25->SetToolTip( _("Toggle wether confirmation is requested when closing program.") ); + item25->SetToolTip( + _("Toggle wether confirmation is requested \ + when closing program.") + ); #endif - item23->Add( item25, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|border_style, 5 ); + item23->Add( + item25, 0, wxGROW|wxALIGN_CENTER_VERTICAL + |wxLEFT|border_style, 5 + ); wxBoxSizer *item26 = new wxBoxSizer( wxHORIZONTAL ); - wxCheckBox *item27 = new wxCheckBox( this, ID_SHOWTOOL, _("Show ToolBar"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item27 = new wxCheckBox( + this, ID_SHOWTOOL, _("Show ToolBar"), wxDefaultPosition, + wxDefaultSize, 0 + ); item27->SetValue( TRUE ); #ifndef __WXX11__ item27->SetToolTip( _("Toggle wether toolbar is shown or not.") ); #endif - item26->Add( item27, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|border_style, 5 ); + item26->Add( + item27, 0, wxGROW|wxALIGN_CENTER_VERTICAL| + wxLEFT|border_style, 5 + ); wxString strs28[] = { _("Horizontal"), _("Vertical") }; - wxChoice *item28 = new wxChoice( this, ID_TOOLALIGN, wxDefaultPosition, wxSize(100,-1), 2, strs28, 0 ); + wxChoice *item28 = new wxChoice( + this, ID_TOOLALIGN, wxDefaultPosition, wxSize(100,-1), + 2, strs28, 0 + ); #ifndef __WXX11__ - item28->SetToolTip( _("Horizontal tooltip is shown on top of window (default), vertical is shown on the left side of window.") ); + item28->SetToolTip( + _("Horizontal tooltip is shown on top of window (default),\ + vertical is shown on the left side of window.") ); #endif - item26->Add( item28, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item26->Add( + item28, 0, wxALIGN_RIGHT| + wxALIGN_CENTER_VERTICAL|border_style, 5 + ); item23->Add( item26, 0, wxALIGN_CENTER_VERTICAL, 5 ); - wxCheckBox *item29 = new wxCheckBox( this, ID_SHOWMENU, _("Show MenuBar"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item29 = new wxCheckBox( + this, ID_SHOWMENU, _("Show MenuBar"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ - item29->SetToolTip( _("Toggle wether menubar (file/view etc) should be shown or not.") ); + item29->SetToolTip( + _("Toggle wether menubar (file/view etc) \ + should be shown or not.") + ); #endif - item23->Add( item29, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|border_style, 5 ); + item23->Add( + item29, 0, wxGROW|wxALIGN_CENTER_VERTICAL| + wxLEFT|border_style, 5 + ); item0->Add( item23, 0, wxGROW, 5 ); wxBoxSizer *item30 = new wxBoxSizer( wxHORIZONTAL ); - wxButton *item31 = new wxButton( this, GUI_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item31 = new wxButton( + this, GUI_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 + ); item31->SetDefault(); #ifndef __WXX11__ item31->SetToolTip( _("Save settings and close dialog") ); #endif item30->Add( item31, 0, wxALIGN_CENTER|wxALL, 5 ); - wxButton *item32 = new wxButton( this, GUI_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item32 = new wxButton( + this, GUI_CANCEL, _("Cancel"), wxDefaultPosition, + wxDefaultSize, 0 + ); #ifndef __WXX11__ item32->SetToolTip( _("Abort changes and close dialog") ); #endif Index: Images.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Images.cpp 30 Nov 2003 21:05:50 -0000 1.30 +++ Images.cpp 30 Nov 2003 23:07:27 -0000 1.31 @@ -98,48 +98,174 @@ path.Prepend(wxT("::Resources")); #endif - images.Append(wxT("friend"), new wxBitmap(path+wxT("friend.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("messages"), new wxBitmap(path+wxT("messages.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("searchresults"), new wxBitmap(path+wxT("searchresults.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("provider"), new wxBitmap(path+wxT("provider.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("serverlist"), new wxBitmap(path+wxT("serverlist.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("newserver"), new wxBitmap(path+wxT("newserver.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("updateservers"), new wxBitmap(path+wxT("updateservers.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("info"), new wxBitmap(path+wxT("info.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("serverinfo"), new wxBitmap(path+wxT("serverinfo.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("log"), new wxBitmap(path+wxT("log.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("sharedfiles"), new wxBitmap(path+wxT("sharedfiles.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("updown11"), new wxBitmap(path+wxT("updown11.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("updown00"), new wxBitmap(path+wxT("updown00.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("connectedhigh"), new wxBitmap(path+wxT("connectedhigh.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("disconnected"), new wxBitmap(path+wxT("disconnected.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("clock"), new wxBitmap(path+wxT("clock.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("user"), new wxBitmap(path+wxT("user.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("server"), new wxBitmap(path+wxT("server.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("arrow"), new wxBitmap(path+wxT("arrow.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("statistics"), new wxBitmap(path+wxT("statistics.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("upload"), new wxBitmap(path+wxT("upload.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("download"), new wxBitmap(path+wxT("download.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("partstats"), new wxBitmap(path+wxT("partstats.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("fullstats"), new wxBitmap(path+wxT("fullstats.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("exclamation"), new wxBitmap(path+wxT("exclamation.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("connection"), new wxBitmap(path+wxT("connection.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("daily"), new wxBitmap(path+wxT("daily.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("monthly"), new wxBitmap(path+wxT("monthly.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("yearly"), new wxBitmap(path+wxT("yearly.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("mule"), new wxBitmap(path+wxT("mule.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_connect"), new wxBitmap(path+wxT("btn_connect.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_servers"), new wxBitmap(path+wxT("btn_servers.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_transfer"), new wxBitmap(path+wxT("btn_transfer.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_search"), new wxBitmap(path+wxT("btn_search.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_shared"), new wxBitmap(path+wxT("btn_shared.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_messages"), new wxBitmap(path+wxT("btn_messages.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_statistics"), new wxBitmap(path+wxT("btn_statistics.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_guisettings"), new wxBitmap(path+wxT("btn_guisettings.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("btn_preferences"), new wxBitmap(path+wxT("btn_preferences.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("splashscreen"), new wxBitmap(path+wxT("splashscreen.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("leftarrow"), new wxBitmap(path+wxT("leftarrow.png"), wxBITMAP_TYPE_ANY)); - images.Append(wxT("rightarrow"), new wxBitmap(path+wxT("rightarrow.png"), wxBITMAP_TYPE_ANY)); + images.Append( + wxT("friend"), + new wxBitmap(path+wxT("friend.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("messages"), + new wxBitmap(path+wxT("messages.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("searchresults"), + new wxBitmap(path+wxT("searchresults.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("provider"), + new wxBitmap(path+wxT("provider.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("serverlist"), + new wxBitmap(path+wxT("serverlist.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("newserver"), + new wxBitmap(path+wxT("newserver.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("updateservers"), + new wxBitmap(path+wxT("updateservers.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("info"), + new wxBitmap(path+wxT("info.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("serverinfo"), + new wxBitmap(path+wxT("serverinfo.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("log"), + new wxBitmap(path+wxT("log.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("sharedfiles"), + new wxBitmap(path+wxT("sharedfiles.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("updown11"), + new wxBitmap(path+wxT("updown11.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("updown00"), + new wxBitmap(path+wxT("updown00.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("connectedhigh"), + new wxBitmap(path+wxT("connectedhigh.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("disconnected"), + new wxBitmap(path+wxT("disconnected.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("clock"), + new wxBitmap(path+wxT("clock.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("user"), + new wxBitmap(path+wxT("user.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("server"), + new wxBitmap(path+wxT("server.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("arrow"), + new wxBitmap(path+wxT("arrow.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("statistics"), + new wxBitmap(path+wxT("statistics.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("upload"), + new wxBitmap(path+wxT("upload.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("download"), + new wxBitmap(path+wxT("download.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("partstats"), + new wxBitmap(path+wxT("partstats.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("fullstats"), + new wxBitmap(path+wxT("fullstats.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("exclamation"), + new wxBitmap(path+wxT("exclamation.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("connection"), + new wxBitmap(path+wxT("connection.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("daily"), + new wxBitmap(path+wxT("daily.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("monthly"), + new wxBitmap(path+wxT("monthly.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("yearly"), + new wxBitmap(path+wxT("yearly.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("mule"), + new wxBitmap(path+wxT("mule.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_connect"), + new wxBitmap(path+wxT("btn_connect.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_servers"), + new wxBitmap(path+wxT("btn_servers.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_transfer"), + new wxBitmap(path+wxT("btn_transfer.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_search"), + new wxBitmap(path+wxT("btn_search.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_shared"), + new wxBitmap(path+wxT("btn_shared.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_messages"), + new wxBitmap(path+wxT("btn_messages.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_statistics"), + new wxBitmap(path+wxT("btn_statistics.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_guisettings"), + new wxBitmap(path+wxT("btn_guisettings.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("btn_preferences"), + new wxBitmap(path+wxT("btn_preferences.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("splashscreen"), + new wxBitmap(path+wxT("splashscreen.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("leftarrow"), + new wxBitmap(path+wxT("leftarrow.png"), wxBITMAP_TYPE_ANY) + ); + images.Append( + wxT("rightarrow"), + new wxBitmap(path+wxT("rightarrow.png"), wxBITMAP_TYPE_ANY) + ); } /** @@ -149,7 +275,7 @@ * corresponding image object (note that we should never save it to disc!). * The main reason for this was wxMac where toolbar button texts were not * supported, but eventually, this approach proves nicer quality because of - * added background colour and surrounding border to button images. + * possibility to later add custom background colour/borders to the images. */ void CImages::MakeToolImages() { wxBitmap tmp, tmp_new; @@ -175,7 +301,10 @@ btntxt.Add(_("Preferences")); btnimg.Add(wxT("btn_guisettings")); - /* Temporary bitmap for measuring text lengths. 100 pixels should be enuff. */ + /** + * Temporary bitmap for measuring text lengths. + * 100 pixels should be enough. + */ tmp = wxBitmap(100, 100); mdc.SelectObject(tmp); @@ -194,25 +323,37 @@ tool_img_width = width; tool_img_height = height; + /** + * This forloop goes through all images previously named in btnimg + * string array. It creates a new image with previously calculated + * height and width, draws the found bitmap on it and the corresponding + * text from imgtxt arraystring. To make the final image transparent, + * wxLIGHT_GREY colour pointer is used on wxMSW which seems to give + * system background colour on windows, on other platforms we use + * simple transparency mask. Finally, the generated image is saved + * back to images list by removing old image, creating new wxBitmap + * type object and storing the pointer in the list. + */ mdc.BeginDrawing(); - /* Loop through our lists of texts/images and draw images for toolbar */ for (unsigned int i=0;i<btntxt.GetCount();i++) { tmp_new = wxBitmap(width, height); mdc.SelectObject(tmp_new); - /* On wxMSW, wxLIGHT_GREY colour pointer gives system background colour */ #ifdef __WXMSW__ mdc.SetPen(*wxTRANSPARENT_PEN); mdc.SetBrush(wxBrush(*wxLIGHT_GREY, wxSOLID)); - /* Elsewhere 0,0,0 colour works for background */ #else mdc.SetBrush(wxBrush(wxColour(0, 0, 0), wxSOLID)); #endif - mdc.DrawRectangle(0, 0, tmp_new.GetWidth(), tmp_new.GetHeight()); - mdc.DrawBitmap(GetImage(btnimg.Item(i)), (tmp_new.GetWidth()-32)/2, 2, true); + mdc.DrawRectangle( + 0, 0, tmp_new.GetWidth(), tmp_new.GetHeight() + ); + mdc.DrawBitmap( + GetImage(btnimg.Item(i)), + (tmp_new.GetWidth()-32)/2, 2, true + ); mdc.SetTextForeground( wxColour(1,1,1)); mdc.GetTextExtent(btntxt.Item(i), &x, &y); mdc.DrawText(btntxt.Item(i), (tmp_new.GetWidth()-x)/2, 36); - /* Can't (and dont need to) use transparency mask on wxMSW */ #ifndef __WXMSW__ wxMask *tmp_mask; tmp_mask = new wxMask(tmp_new, wxColour(0,0,0)); @@ -235,7 +376,7 @@ if (tmp == NULL) { wxFAIL_MSG(wxString::Format( - wxT("Requested image `%s` could not be found!"), + wxT("Requested image `%s` could not be found!"), name.c_str() )); } Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- MainDlg.cpp 30 Nov 2003 21:04:38 -0000 1.19 +++ MainDlg.cpp 30 Nov 2003 23:07:27 -0000 1.20 @@ -108,7 +108,11 @@ wxPanel *statusbar = new wxPanel(this, -1); StatusBar(statusbar, true, true); m_mainsizer->Add(statusbar, 0, wxGROW|wxEXPAND, 0); - wxASSERT_MSG(statusbar, wxT("CMainDlg::CMainDlg() - StatusBar object not ready for accessing.")); + wxASSERT_MSG( + statusbar, + wxT("CMainDlg::CMainDlg() - StatusBar object \ + not ready for accessing.") + ); GetBmpStatusConnection()->SetBitmap(img->GetImage(wxT("disconnected"))); GetBmpStatusConnection()->SetName(wxT("disconnected")); @@ -245,42 +249,61 @@ tool_align|wxNO_BORDER|wxTB_3DBUTTONS|wxTB_FLAT ); - tb->SetToolBitmapSize(wxSize(img->tool_img_width, img->tool_img_height)); + tb->SetToolBitmapSize( + wxSize(img->tool_img_width, img->tool_img_height) + ); tb->SetMargins(2, 2); /* Add the buttons */ tb->AddTool( - ID_BTN_CONNECT, _("Connect"), img->GetImage(wxT("btn_connect")), - img->GetImage(wxT("btn_connect")), wxITEM_NORMAL, _("Connect to any server") + ID_BTN_CONNECT, _("Connect"), + img->GetImage(wxT("btn_connect")), + img->GetImage(wxT("btn_connect")), wxITEM_NORMAL, + _("Connect to any server") ); tb->AddSeparator(); tb->AddTool( - ID_BTN_SERVERS, _("Servers"), img->GetImage(wxT("btn_servers")), - img->GetImage(wxT("btn_servers")), wxITEM_CHECK, _("Server list") + ID_BTN_SERVERS, _("Servers"), + img->GetImage(wxT("btn_servers")), + img->GetImage(wxT("btn_servers")), wxITEM_CHECK, + _("Server list") ); tb->AddTool( - ID_BTN_SEARCH, _("Search"), img->GetImage(wxT("btn_search")), - img->GetImage(wxT("btn_search")), wxITEM_CHECK, _("Search files") + ID_BTN_SEARCH, _("Search"), + img->GetImage(wxT("btn_search")), + img->GetImage(wxT("btn_search")), wxITEM_CHECK, + _("Search files") ); tb->AddTool( - ID_BTN_TRANSFER, _("Transfer"), img->GetImage(wxT("btn_transfer")), - img->GetImage(wxT("btn_transfer")), wxITEM_CHECK, _("File Transfer") + ID_BTN_TRANSFER, _("Transfer"), + img->GetImage(wxT("btn_transfer")), + img->GetImage(wxT("btn_transfer")), wxITEM_CHECK, + _("File Transfer") ); tb->AddTool( - ID_BTN_SHARED_FILES, _("Shared Files"), img->GetImage(wxT("btn_shared")), - img->GetImage(wxT("btn_shared")), wxITEM_CHECK, _("Show shared files") + ID_BTN_SHARED_FILES, _("Shared Files"), + img->GetImage(wxT("btn_shared")), + img->GetImage(wxT("btn_shared")), wxITEM_CHECK, + _("Show shared files") ); tb->AddTool( - ID_BTN_MESSAGES, _("Messages"), img->GetImage(wxT("btn_messages")), - img->GetImage(wxT("btn_messages")), wxITEM_CHECK, _("Chatting") + ID_BTN_MESSAGES, _("Messages"), + img->GetImage(wxT("btn_messages")), + img->GetImage(wxT("btn_messages")), wxITEM_CHECK, + _("Chatting") ); tb->AddTool( - ID_BTN_STATISTICS, _("Statistics"), img->GetImage(wxT("btn_statistics")), - img->GetImage(wxT("btn_statistics")), wxITEM_CHECK, _("Show live statistics")); + ID_BTN_STATISTICS, _("Statistics"), + img->GetImage(wxT("btn_statistics")), + img->GetImage(wxT("btn_statistics")), wxITEM_CHECK, + _("Show live statistics") + ); tb->AddSeparator(); tb->AddTool( - ID_BTN_GUISETTINGS, _("Preferences"), img->GetImage(wxT("btn_guisettings")), - img->GetImage(wxT("btn_guisettings")), wxITEM_NORMAL, _("Modify settings") + ID_BTN_GUISETTINGS, _("Preferences"), + img->GetImage(wxT("btn_guisettings")), + img->GetImage(wxT("btn_guisettings")), wxITEM_NORMAL, + _("Modify settings") ); /* And go live */ @@ -426,9 +449,11 @@ ); m_config->Read(wxT("/General/Toolbar Alignment"), &tmp, 0); if (tmp) { - view_tbar_menu->FindItem(ID_VIEW_TBAR_ALIGN_HOR)->Check(); + view_tbar_menu-> + FindItem(ID_VIEW_TBAR_ALIGN_HOR)->Check(); } else { - view_tbar_menu->FindItem(ID_VIEW_TBAR_ALIGN_VER)->Check(); + view_tbar_menu-> + FindItem(ID_VIEW_TBAR_ALIGN_VER)->Check(); } #else view_tbar_menu->Append(ID_VIEW_TBAR_ALIGN_HOR, _("Horizontal")); Index: MainDlg.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MainDlg.h 25 Nov 2003 04:21:14 -0000 1.7 +++ MainDlg.h 30 Nov 2003 23:07:27 -0000 1.8 @@ -110,20 +110,46 @@ wxWindow* GetCurPage() { return activewnd; } /* Getters */ - wxMenuItem* GetViewMenuBar() {return GetMenuBar()->FindItem(ID_VIEW_MENUBAR);} - wxMenuItem* GetViewToolBar() {return GetMenuBar()->FindItem(ID_VIEW_TOOLBAR);} - wxMenuItem* GetViewServerWnd() {return GetMenuBar()->FindItem(ID_VIEW_SERVERS);} - wxMenuItem* GetViewSearchWnd() {return GetMenuBar()->FindItem(ID_VIEW_SEARCH);} - wxMenuItem* GetViewTransferWnd() {return GetMenuBar()->FindItem(ID_VIEW_TRANSFER);} - wxMenuItem* GetViewSharedWnd() {return GetMenuBar()->FindItem(ID_VIEW_SHARED_FILES);} - wxMenuItem* GetViewMessagesWnd() {return GetMenuBar()->FindItem(ID_VIEW_MESSAGES);} - wxMenuItem* GetViewStatisticsWnd() {return GetMenuBar()->FindItem(ID_VIEW_STATISTICS);} + wxMenuItem* GetViewMenuBar() { + return GetMenuBar()->FindItem(ID_VIEW_MENUBAR); + } + wxMenuItem* GetViewToolBar() { + return GetMenuBar()->FindItem(ID_VIEW_TOOLBAR); + } + wxMenuItem* GetViewServerWnd() { + return GetMenuBar()->FindItem(ID_VIEW_SERVERS); + } + wxMenuItem* GetViewSearchWnd() { + return GetMenuBar()->FindItem(ID_VIEW_SEARCH); + } + wxMenuItem* GetViewTransferWnd() { + return GetMenuBar()->FindItem(ID_VIEW_TRANSFER); + } + wxMenuItem* GetViewSharedWnd() { + return GetMenuBar()->FindItem(ID_VIEW_SHARED_FILES); + } + wxMenuItem* GetViewMessagesWnd() { + return GetMenuBar()->FindItem(ID_VIEW_MESSAGES); + } + wxMenuItem* GetViewStatisticsWnd() { + return GetMenuBar()->FindItem(ID_VIEW_STATISTICS); + } - wxStaticBitmap* GetBmpStatusConnection() { return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_CONNECTION ); } - wxStaticBitmap* GetBmpStatusDload() { return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_DLOAD ); } - wxStaticBitmap* GetBmpStatusUpload() { return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_UPLOAD ); } - wxStaticBitmap* GetBmpStatusFiles() { return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_FILES ); } - wxStaticBitmap* GetBmpStatusUsers() { return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_USERS ); } + wxStaticBitmap* GetBmpStatusConnection() { + return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_CONNECTION ); + } + wxStaticBitmap* GetBmpStatusDload() { + return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_DLOAD ); + } + wxStaticBitmap* GetBmpStatusUpload() { + return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_UPLOAD ); + } + wxStaticBitmap* GetBmpStatusFiles() { + return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_FILES ); + } + wxStaticBitmap* GetBmpStatusUsers() { + return (wxStaticBitmap*) FindWindow( ID_BMP_STATUS_USERS ); + } /* Member variables */ bool show_tool; // Wether toolbar should be shown or not. Index: ServerWnd.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- ServerWnd.cpp 28 Nov 2003 18:35:10 -0000 1.42 +++ ServerWnd.cpp 30 Nov 2003 23:07:27 -0000 1.43 @@ -97,14 +97,26 @@ void CServerWnd::SetToggleSideBarImage() { if (sidebar->IsShown()) { - GetBtnToggleSidebar()->SetBitmapLabel(img->GetImage(wxT("leftarrow"))); - GetBtnToggleSidebar()->SetBitmapSelected(img->GetImage(wxT("leftarrow"))); - GetBtnToggleSidebar()->SetBitmapFocus(img->GetImage(wxT("leftarrow"))); + GetBtnToggleSidebar()->SetBitmapLabel( + img->GetImage(wxT("leftarrow")) + ); + GetBtnToggleSidebar()->SetBitmapSelected( + img->GetImage(wxT("leftarrow")) + ); + GetBtnToggleSidebar()->SetBitmapFocus( + img->GetImage(wxT("leftarrow")) + ); } else { - GetBtnToggleSidebar()->SetBitmapLabel(img->GetImage(wxT("rightarrow"))); - GetBtnToggleSidebar()->SetBitmapSelected(img->GetImage(wxT("rightarrow"))); - GetBtnToggleSidebar()->SetBitmapFocus(img->GetImage(wxT("rightarrow"))); + GetBtnToggleSidebar()->SetBitmapLabel( + img->GetImage(wxT("rightarrow")) + ); + GetBtnToggleSidebar()->SetBitmapSelected( + img->GetImage(wxT("rightarrow")) + ); + GetBtnToggleSidebar()->SetBitmapFocus( + img->GetImage(wxT("rightarrow")) + ); } } @@ -255,7 +267,7 @@ * window to toggle sidebar on/off */ wxBitmapButton *toggler = new wxBitmapButton( - this, ID_BTN_TOGGLE_SIDEBAR, img->GetImage(wxT("leftarrow")), + this, ID_BTN_TOGGLE_SIDEBAR, img->GetImage(wxT("leftarrow")), wxDefaultPosition, wxSize(10,100) ); mainsizer->Add(toggler, 0, wxALIGN_CENTER, 5 ); @@ -307,17 +319,31 @@ mainsizer->RemoveGrowableCol(2); mainsizer->AddGrowableCol(1); sidebar->Hide(); - GetBtnToggleSidebar()->SetBitmapLabel(img->GetImage(wxT("rightarrow"))); - GetBtnToggleSidebar()->SetBitmapSelected(img->GetImage(wxT("rightarrow"))); - GetBtnToggleSidebar()->SetBitmapFocus(img->GetImage(wxT("rightarrow"))); + GetBtnToggleSidebar()->SetBitmapLabel( + img->GetImage(wxT("rightarrow")) + ); + GetBtnToggleSidebar()->SetBitmapSelected( + img->GetImage(wxT("rightarrow")) + ); + GetBtnToggleSidebar()->SetBitmapFocus( + img->GetImage(wxT("rightarrow")) + ); } else { - mainsizer->Prepend(sidebar, 0, wxGROW|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5); + mainsizer->Prepend( + sidebar, 0, wxGROW|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5 + ); mainsizer->RemoveGrowableCol(1); mainsizer->AddGrowableCol(2); sidebar->Show(); - GetBtnToggleSidebar()->SetBitmapLabel(img->GetImage(wxT("leftarrow"))); - GetBtnToggleSidebar()->SetBitmapSelected(img->GetImage(wxT("leftarrow"))); - GetBtnToggleSidebar()->SetBitmapFocus(img->GetImage(wxT("leftarrow"))); + GetBtnToggleSidebar()->SetBitmapLabel( + img->GetImage(wxT("leftarrow")) + ); + GetBtnToggleSidebar()->SetBitmapSelected( + img->GetImage(wxT("leftarrow")) + ); + GetBtnToggleSidebar()->SetBitmapFocus( + img->GetImage(wxT("leftarrow")) + ); } Layout(); Refresh(); @@ -329,7 +355,9 @@ * wxInterface_wdr.cpp to fix wxCheckBox borders (need wxALL on wxMSW and none * on wxGTK. */ -wxSizer* CServerWnd::SettingsPanel( wxWindow *parent, bool call_fit, bool set_sizer ) { +wxSizer* CServerWnd::SettingsPanel( + wxWindow *parent, bool call_fit, bool set_sizer +) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxCheckBox *item1 = new wxCheckBox( @@ -337,29 +365,47 @@ wxDefaultPosition, wxDefaultSize, 0 ); #ifndef __WXX11__ - item1->SetToolTip(_("Toggle wether application should automatically connect to any server on startup") ); + item1->SetToolTip( + _("Toggle wether application should automatically connect \ + to any server on startup") + ); #endif item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL ); - wxCheckBox *item3 = new wxCheckBox( parent, ID_SS_AC_STATIC_ONLY, _("To static only"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item3 = new wxCheckBox( + parent, ID_SS_AC_STATIC_ONLY, _("To static only"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ - item3->SetToolTip( _("Toggle wether application should connect to servers marked as \"static\" only") ); + item3->SetToolTip( + _("Toggle wether application should connect \ + to servers marked as \"static\" only") + ); #endif item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|border_style, 5 ); item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); - wxStaticLine *item4 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL ); + wxStaticLine *item4 = new wxStaticLine( + parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), + wxLI_HORIZONTAL + ); item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); wxBoxSizer *item5 = new wxBoxSizer( wxHORIZONTAL ); - wxStaticBitmap *item6 = new wxStaticBitmap( parent, ID_SS_SERVER_IMG, Icons( 0 ), wxDefaultPosition, wxDefaultSize, 0, wxT("provider") ); + wxStaticBitmap *item6 = new wxStaticBitmap( + parent, ID_SS_SERVER_IMG, Icons( 0 ), wxDefaultPosition, + wxDefaultSize, 0, wxT("provider") + ); item5->Add( item6, 0, wxALIGN_CENTER|wxLEFT, 5 ); - wxStaticText *item7 = new wxStaticText( parent, ID_SS_SERVER_NAME, wxT(""), wxDefaultPosition, wxSize(110,-1), 0 ); + wxStaticText *item7 = new wxStaticText( + parent, ID_SS_SERVER_NAME, wxT(""), + wxDefaultPosition, wxSize(110,-1), 0 + ); item5->Add( item7, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 ); item0->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); @@ -368,9 +414,15 @@ wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL ); - wxCheckBox *item10 = new wxCheckBox( parent, ID_CHECK_SS_STATIC, _("Static"), wxDefaultPosition, wxSize(130,-1), 0 ); + wxCheckBox *item10 = new wxCheckBox( + parent, ID_CHECK_SS_STATIC, _("Static"), + wxDefaultPosition, wxSize(130,-1), 0 + ); #ifndef __WXX11__ - item10->SetToolTip( _("Set server static. Static servers are not removed from list if they do not respond") ); + item10->SetToolTip( + _("Set server static. Static servers are not \ + removed from list if they do not respond") + ); #endif item9->Add( item10, 0, wxALIGN_CENTER|border_style, 5 ); @@ -378,7 +430,10 @@ wxBoxSizer *item11 = new wxBoxSizer( wxHORIZONTAL ); - wxStaticText *item12 = new wxStaticText( parent, ID_TEXT, _("Priority:"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticText *item12 = new wxStaticText( + parent, ID_TEXT, _("Priority:"), wxDefaultPosition, + wxDefaultSize, 0 + ); item11->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxString strs13[] = { @@ -386,7 +441,10 @@ _("Normal"), _("Low") }; - wxChoice *item13 = new wxChoice( parent, ID_SS_PRIO, wxDefaultPosition, wxSize(80,-1), 3, strs13, 0 ); + wxChoice *item13 = new wxChoice( + parent, ID_SS_PRIO, wxDefaultPosition, + wxSize(80,-1), 3, strs13, 0 + ); #ifndef __WXX11__ item13->SetToolTip( _("Change server priority") ); #endif @@ -413,18 +471,29 @@ * wxInterface_wdr.cpp to fix wxCheckBox borders (need wxALL on wxMSW and none * on wxGTK. */ -wxSizer* CServerWnd::LogOptionsPanel( wxWindow *parent, bool call_fit, bool set_sizer ) { +wxSizer* CServerWnd::LogOptionsPanel( + wxWindow *parent, bool call_fit, bool set_sizer +) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL ); - wxCheckBox *item2 = new wxCheckBox( parent, ID_CHECK_LINE_LIMIT, _("Line limit"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item2 = new wxCheckBox( + parent, ID_CHECK_LINE_LIMIT, _("Line limit"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ - item2->SetToolTip( _("Toggle wether there should be a line limit for log boxes (saves memory)") ); + item2->SetToolTip( + _("Toggle wether there should be a line limit \ + for log boxes (saves memory)") + ); #endif item1->Add( item2, 0, wxGROW|border_style, 5 ); - wxTextCtrl *item3 = new wxTextCtrl( parent, ID_TXT_LINE_LIMIT, wxT(""), wxDefaultPosition, wxSize(40,-1), 0 ); + wxTextCtrl *item3 = new wxTextCtrl( + parent, ID_TXT_LINE_LIMIT, wxT(""), + wxDefaultPosition, wxSize(40,-1), 0 + ); #ifndef __WXX11__ item3->SetToolTip( _("Maximum number of lines in log boxes") ); #endif @@ -432,13 +501,19 @@ item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - wxCheckBox *item4 = new wxCheckBox( parent, ID_CHECK_SAVE_TO_DISK, _("Save to disk"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item4 = new wxCheckBox( + parent, ID_CHECK_SAVE_TO_DISK, _("Save to disk"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ item4->SetToolTip( _("Save logs to disc also") ); #endif item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); - wxButton *item5 = new wxButton( parent, ID_BTN_CLEAR_LOGS, _("Clear"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item5 = new wxButton( + parent, ID_BTN_CLEAR_LOGS, _("Clear"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ item5->SetToolTip( _("Clear all logs") ); #endif @@ -456,26 +531,42 @@ return item0; } -wxSizer* CServerWnd::AddServerPanel( wxWindow *parent, bool call_fit, bool set_sizer ) -{ +wxSizer* CServerWnd::AddServerPanel( + wxWindow *parent, bool call_fit, bool set_sizer +) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxFlexGridSizer *item1 = new wxFlexGridSizer( 4, 0, 0, 0 ); item1->AddGrowableCol( 0 ); - wxStaticText *item2 = new wxStaticText( parent, ID_SERVER_IP, _("IP address:Port"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticText *item2 = new wxStaticText( + parent, ID_SERVER_IP, _("IP address:Port"), + wxDefaultPosition, wxDefaultSize, 0 + ); item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - wxTextCtrl *item3 = new wxTextCtrl( parent, ID_SERVER_IP, wxT(""), wxDefaultPosition, wxSize(110,-1), 0 ); + wxTextCtrl *item3 = new wxTextCtrl( + parent, ID_SERVER_IP, wxT(""), + wxDefaultPosition, wxSize(110,-1), 0 + ); #ifndef __WXX11__ - item3->SetToolTip( _("Type in the ip address and port of the new server, separated by :") ); + item3->SetToolTip( + _("Type in the ip address and port of the new \ + server, separated by `:`") + ); #endif item1->Add( item3, 0, wxGROW, 5 ); - wxStaticText *item4 = new wxStaticText( parent, ID_TEXT, _("Name"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticText *item4 = new wxStaticText( + parent, ID_TEXT, _("Name"), wxDefaultPosition, + wxDefaultSize, 0 + ); item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - wxTextCtrl *item5 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 ); + wxTextCtrl *item5 = new wxTextCtrl( + parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, + wxSize(80,-1), 0 + ); #ifndef __WXX11__ item5->SetToolTip( _("Optional: Enter the name of the new server") ); #endif @@ -483,11 +574,17 @@ item0->Add( item1, 0, wxGROW|wxRIGHT, 5 ); - wxButton *item6 = new wxButton( parent, ID_ADDTOLIST, _("Add to List"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item6 = new wxButton( + parent, ID_ADDTOLIST, _("Add to List"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ item6->SetToolTip( _("Add the server to list") ); #endif - item0->Add( item6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + item0->Add( + item6, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL| + wxLEFT|wxRIGHT|wxTOP, 5 + ); if (set_sizer) { parent->SetAutoLayout( TRUE ); @@ -501,16 +598,27 @@ return item0; } -wxSizer* CServerWnd::UpdatePanel( wxWindow *parent, bool call_fit, bool set_sizer ) { +wxSizer* CServerWnd::UpdatePanel( + wxWindow *parent, bool call_fit, bool set_sizer +) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); - wxTextCtrl *item1 = new wxTextCtrl( parent, ID_SERVERLISTURL, wxT("http://ocbmaurice.dyndns.org/pl/slist.pl/server.met?download/server-best.met"), wxDefaultPosition, wxSize(-1,100), wxTE_MULTILINE|wxTE_PROCESS_TAB ); + wxTextCtrl *item1 = new wxTextCtrl( + parent, ID_SERVERLISTURL, + wxT("http://ocbmaurice.dyndns.org/pl/slist.pl/server.met\ + ?download/server-best.met"), wxDefaultPosition, + wxSize(-1,100), wxTE_MULTILINE|wxTE_PROCESS_TAB + ); #ifndef __WXX11__ - item1->SetToolTip( wxT("Enter the URL or .met file location to update list from") ); + item1->SetToolTip( + wxT("Enter the URL or .met file location to update list from")); #endif item0->Add( item1, 0, wxGROW, 5 ); - wxButton *item2 = new wxButton( parent, ID_UPDATE, _("Update"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item2 = new wxButton( + parent, ID_UPDATE, _("Update"), + wxDefaultPosition, wxDefaultSize, 0 + ); item0->Add( item2, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); if (set_sizer) { @@ -525,32 +633,49 @@ return item0; } -wxSizer* CServerWnd::PortSettingsPanel( wxWindow *parent, bool call_fit, bool set_sizer ) { +wxSizer* CServerWnd::PortSettingsPanel( + wxWindow *parent, bool call_fit, bool set_sizer +) { wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *item2 = new wxBoxSizer( wxVERTICAL ); - wxStaticText *item3 = new wxStaticText( parent, ID_TEXT, wxT("TCP"), wxDefaultPosition, wxDefaultSize, 0 ); - item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 ); + wxStaticText *item3 = new wxStaticText( + parent, ID_TEXT, wxT("TCP"), wxDefaultPosition, + wxDefaultSize, 0 + ); + item2->Add(item3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5); - wxStaticText *item4 = new wxStaticText( parent, ID_TEXT, wxT("UDP"), wxDefaultPosition, wxDefaultSize, 0 ); - item2->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 ); + wxStaticText *item4 = new wxStaticText( + parent, ID_TEXT, wxT("UDP"), wxDefaultPosition, wxDefaultSize, 0 + ); + item2->Add(item4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5); item1->Add( item2, 0, wxALIGN_CENTER, 5 ); wxBoxSizer *item5 = new wxBoxSizer( wxVERTICAL ); - wxTextCtrl *item6 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(40,-1), 0 ); + wxTextCtrl *item6 = new wxTextCtrl( + parent, ID_TEXTCTRL, wxT(""), + wxDefaultPosition, wxSize(40,-1), 0 + ); #ifndef __WXX11__ - item6->SetToolTip( _("Enter the TCP port for connections (default: 4662)") ); + item6->SetToolTip( + _("Enter the TCP port for connections (default: 4662)") + ); #endif item5->Add( item6, 0, wxALIGN_CENTER, 5 ); - wxTextCtrl *item7 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(40,-1), 0 ); + wxTextCtrl *item7 = new wxTextCtrl( + parent, ID_TEXTCTRL, wxT(""), + wxDefaultPosition, wxSize(40,-1), 0 + ); #ifndef __WXX11__ - item7->SetToolTip( _("Enter the UDP port for connections (default: 4672)") ); + item7->SetToolTip( + _("Enter the UDP port for connections (default: 4672)") + ); #endif item5->Add( item7, 0, wxALIGN_CENTER, 5 ); @@ -560,9 +685,16 @@ item8->Add( 10, 20, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); - wxCheckBox *item9 = new wxCheckBox( parent, ID_CHECK_DISABLE_UDP, _("Disable"), wxDefaultPosition, wxDefaultSize, 0 ); + wxCheckBox *item9 = new wxCheckBox( + parent, ID_CHECK_DISABLE_UDP, _("Disable"), + wxDefaultPosition, wxDefaultSize, 0 + ); #ifndef __WXX11__ - item9->SetToolTip( _("Disable UDP port. This can somewhat lower traffic, but also results in less sources as client<->client source exchange is done via UDP") ); + item9->SetToolTip( + _("Disable UDP port. This can somewhat lower traffic, \ + but also results in less sources as client<->client source \ + exchange is done via UDP") + ); #endif item8->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 ); @@ -570,7 +702,10 @@ item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - wxButton *item10 = new wxButton( parent, ID_BUTTON, _("Apply changes"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item10 = new wxButton( + parent, ID_BUTTON, _("Apply changes"), + wxDefaultPosition, wxDefaultSize, 0 + ); item0->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 ); if (set_sizer) { Index: StatisticsTreeCtrl.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/StatisticsTreeCtrl.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- StatisticsTreeCtrl.cpp 27 Nov 2003 08:23:12 -0000 1.18 +++ StatisticsTreeCtrl.cpp 30 Nov 2003 23:07:27 -0000 1.19 @@ -48,27 +48,30 @@ /* This loads the correct images for the tree and assigns as imagelist. */ void CStatisticsTreeCtrl::GetTreeImages() { wxImageList *tree_images = new wxImageList(16, 16); - tree_images->Add(img->GetImage(wxT("updown11"))); // 0 Up/Down - tree_images->Add(img->GetImage(wxT("connectedhigh"))); // 1 Connection - tree_images->Add(img->GetImage(wxT("clock"))); // 2 Clock - tree_images->Add(img->GetImage(wxT("user"))); // 3 User - tree_images->Add(img->GetImage(wxT("server"))); // 4 Server - tree_images->Add(img->GetImage(wxT("sharedfiles"))); // 5 Shared Files - tree_images->Add(img->GetImage(wxT("arrow"))); // 6 Arrow Item - tree_images->Add(img->GetImage(wxT("statistics"))); // 7 Statistics - tree_images->Add(img->GetImage(wxT("upload"))); // 8 Uploads - tree_images->Add(img->GetImage(wxT("download"))); // 9 Downloads - tree_images->Add(img->GetImage(wxT("partstats"))); // 10 Statistics Session - tree_images->Add(img->GetImage(wxT("fullstats"))); // 11 Statistics Total - tree_images->Add(img->GetImage(wxT("exclamation"))); // 12 Records - tree_images->Add(img->GetImage(wxT("connection"))); // 13 Prefs.Connection - tree_images->Add(img->GetImage(wxT("daily"))); // 14 Daily - tree_images->Add(img->GetImage(wxT("monthly"))); // 15 Monthly - tree_images->Add(img->GetImage(wxT("yearly"))); // 16 Yearly + tree_images->Add(img->GetImage(wxT("updown11"))); // 0 + tree_images->Add(img->GetImage(wxT("connectedhigh"))); // 1 + tree_images->Add(img->GetImage(wxT("clock"))); // 2 + tree_images->Add(img->GetImage(wxT("user"))); // 3 + tree_images->Add(img->GetImage(wxT("server"))); // 4 + tree_images->Add(img->GetImage(wxT("sharedfiles"))); // 5 + tree_images->Add(img->GetImage(wxT("arrow"))); // 6 + tree_images->Add(img->GetImage(wxT("statistics"))); // 7 + tree_images->Add(img->GetImage(wxT("upload"))); // 8 + tree_images->Add(img->GetImage(wxT("download"))); // 9 + tree_images->Add(img->GetImage(wxT("partstats"))); // 10 + tree_images->Add(img->GetImage(wxT("fullstats"))); // 11 + tree_images->Add(img->GetImage(wxT("exclamation"))); // 12 + tree_images->Add(img->GetImage(wxT("connection"))); // 13 + tree_images->Add(img->GetImage(wxT("daily"))); // 14 + tree_images->Add(img->GetImage(wxT("monthly"))); // 15 + tree_images->Add(img->GetImage(wxT("yearly"))); // 16 AssignImageList(tree_images); } -/* This method generates the tree by calling a submethod for each of the branches. */ +/** + * This method generates the tree by calling + * a submethod for each of the branches. + */ void CStatisticsTreeCtrl::GenerateTree() { /* Clean up if theres anything already in tree */ DeleteAllItems(); @@ -95,23 +98,52 @@ /* Transfer branch */ AppendItem(t_transfer, wxT("Session UL:DL Ratio: 1:1"), 6); AppendItem(t_transfer, wxT("Comulative UL:DL Ratio: 1:1"), 6); - wxTreeItemId t_uploads = AppendItem(t_transfer, wxT("Uploads"), 8); + wxTreeItemId t_uploads = AppendItem( + t_transfer, wxT("Uploads"), 8 + ); SetItemBold(t_uploads); - wxTreeItemId t_session = AppendItem(t_uploads, wxT("Session"), 10); + wxTreeItemId t_session = AppendItem( + t_uploads, wxT("Session"), 10 + ); SetItemBold(t_session); /* Transfer->Uploads->Session branch */ - AppendItem(t_session, wxT("Uploaded Data: 0.0 MB"), 6); - AppendItem(t_session, wxT("Active Uploads: 0"), 6); - AppendItem(t_session, wxT("Waiting Uploads: 0"), 6); - AppendItem(t_session, wxT("Upload Sessions: 0"), 6); - AppendItem(t_session, wxT("Total Overhead (Packets): 0.0 MB (0.0 MB)"), 6); - wxTreeItemId t_comulative = AppendItem(t_uploads, wxT("Comulative"), 11); + AppendItem( + t_session,wxT("Uploaded Data: 0.0 MB"),6 + ); + AppendItem( + t_session, wxT("Active Uploads: 0"), 6 + ); + AppendItem( + t_session, wxT("Waiting Uploads: 0"), 6 + ); + AppendItem( + t_session, wxT("Upload Sessions: 0"), 6 + ); + AppendItem( + t_session, + wxT("Total Overhead (Packets): \ + 0.0 MB (0.0 MB)"), 6 + ); + wxTreeItemId t_comulative = AppendItem( + t_uploads, wxT("Comulative"), 11 + ); SetItemBold(t_comulative); /* Transfer->Uploads->Comulative branch */ - AppendItem(t_comulative, wxT("Uploaded Data: 0.0 MB"), 6); - AppendItem(t_comulative, wxT("Upload Sessions"), 6); - AppendItem(t_comulative, wxT("Total Overhead (Packets): 0.0 MB, (0.0 MB)"), 6); - wxTreeItemId t_downloads = AppendItem(t_transfer, wxT("Downloads"), 9); + AppendItem( + t_comulative, + wxT("Uploaded Data: 0.0 MB"), 6 + ); + AppendItem( + t_comulative, wxT("Upload Sessions"), 6 + ); + AppendItem( + t_comulative, + wxT("Total Overhead (Packets): \ + 0.0 MB, (0.0 MB)"), 6 + ); + wxTreeItemId t_downloads = AppendItem( + t_transfer, wxT("Downloads"), 9 + ); SetItemBold(t_downloads); /* Transfer->Downloads branch */ AppendItem(t_downloads, wxT("Session"), 10); @@ -124,48 +156,150 @@ void CStatisticsTreeCtrl::CreateConnectionBranch(wxTreeItemId root) { wxTreeItemId t_connection = AppendItem(root, wxT("Connection"), 1); SetItemBold(t_connection); - wxTreeItemId t_sess = AppendItem(t_connection, wxT("Session"), 10); + wxTreeItemId t_sess = AppendItem( + t_connection, wxT("Session"), 10 + ); SetItemBold(t_sess); - wxTreeItemId t_sess_gen = AppendItem(t_sess, wxT("General"), 13); + wxTreeItemId t_sess_gen = AppendItem( + t_sess, wxT("General"), 13 + ); SetItemBold(t_sess_gen); - AppendItem(t_sess_gen, wxT("Reconnects: 0"), 6); - AppendItem(t_sess_gen, wxT("Active Connections (estimate): 0"), 6); - AppendItem(t_sess_gen, wxT("Average Connections (estimate): 0"), 6); - AppendItem(t_sess_gen, wxT("Peak Connections (estimate): 0"), 6); - AppendItem(t_sess_gen, wxT("Max Connection Limit Reached: 0"), 6); - wxTreeItemId t_sess_up = AppendItem(t_sess, wxT("Upload"), 8); + AppendItem( + t_sess_gen, wxT("Reconnects: 0"), 6 + ); + AppendItem( + t_sess_gen, + wxT("Active Connections (estimate): 0"), + 6 + ); + AppendItem( + t_sess_gen, + wxT("Average Connections \ + (estimate): 0"), 6 + ); + AppendItem( + t_sess_gen, + wxT("Peak Connections (estimate): 0"), 6 + ); + AppendItem( + t_sess_gen, + wxT("Max Connection Limit Reached: 0"), + 6 + ); + wxTreeItemId t_sess_up = AppendItem( + t_sess, wxT("Upload"), 8 + ); SetItemBold(t_sess_up); - AppendItem(t_sess_up, wxT("Upload-Speed: 0.0 kb/s"), 6); - AppendItem(t_sess_up, wxT("Average Uploadrate: 0.0 kb/s"), 6); - AppendItem(t_sess_up, wxT("Max Upload Rate: 0.0 kb/s"), 6); - AppendItem(t_sess_up, wxT("Max Average Upload Rate: 0.0 kb/s"), 6); - wxTreeItemId t_sess_down = AppendItem(t_sess, wxT("Download"), 9); + AppendItem( + t_sess_up, + wxT("Upload-Speed: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_up, + wxT("Average Uploadrate: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_up, + wxT("Max Upload Rate: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_up, + wxT("Max Average Upload Rate: \ + 0.0 kb/s"), 6 + ); + wxTreeItemId t_sess_down = AppendItem( + t_sess, wxT("Download"), 9 + ); SetItemBold(t_sess_down); - AppendItem(t_sess_down, wxT("Download-Speed: 0.0 kb/s"), 6); - AppendItem(t_sess_down, wxT("Average Downloadrate: 0.0 kb/s"), 6); - AppendItem(t_sess_down, wxT("Max Download Rate: 0.0 kb/s"), 6); - AppendItem(t_sess_down, wxT("Max Average Download Rate: 0.0 kb/s"), 6); - wxTreeItemId t_com = AppendItem(t_connection, wxT("Comulative"), 11); + AppendItem( + t_sess_down, + wxT("Download-Speed: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_down, + wxT("Average Downloadrate: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_down, + wxT("Max Download Rate: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_down, + wxT("Max Average Download \ + Rate: 0.0 kb/s"), 6 + ); + wxTreeItemId t_com = AppendItem( + t_connection, wxT("Comulative"), 11 + ); SetItemBold(t_com); - wxTreeItemId t_com_gen = AppendItem(t_com, wxT("General"), 13); + wxTreeItemId t_com_gen = AppendItem( + t_com, wxT("General"), 13 + ); SetItemBold(t_com_gen); AppendItem(t_com_gen, wxT("Reconnects: 0"), 6); - AppendItem(t_com_gen, wxT("Active Connections (estimate): 0"), 6); - AppendItem(t_com_gen, wxT("Average Connections (estimate): 0"), 6); - AppendItem(t_com_gen, wxT("Peak Connections (estimate): 0"), 6); - AppendItem(t_com_gen, wxT("Max Connection Limit Reached: 0"), 6); - wxTreeItemId t_com_up = AppendItem(t_com, wxT("Upload"), 8); + AppendItem( + t_com_gen, + wxT("Active Connections (estimate): 0"), + 6 + ); + AppendItem( + t_com_gen, + wxT("Average Connections \ + (estimate): 0"), 6 + ); + AppendItem( + t_com_gen, + wxT("Peak Connections (estimate): 0"), + 6 + ); + AppendItem( + t_com_gen, + wxT("Max Connection Limit Reached: 0"), + 6 + ); + wxTreeItemId t_com_up = AppendItem( + t_com, wxT("Upload"), 8 + ); SetItemBold(t_com_up); - AppendItem(t_com_up, wxT("Upload-Speed: 0.0 kb/s"), 6); - AppendItem(t_com_up, wxT("Average Uploadrate: 0.0 kb/s"), 6); - AppendItem(t_com_up, wxT("Max Upload Rate: 0.0 kb/s"), 6); - AppendItem(t_com_up, wxT("Max Average Upload Rate: 0.0 kb/s"), 6); - wxTreeItemId t_com_down = AppendItem(t_com, wxT("Download"), 9); + AppendItem( + t_com_up, + wxT("Upload-Speed: 0.0 kb/s"), 6 + ); + AppendItem( + t_com_up, + wxT("Average Uploadrate: 0.0 kb/s"), 6 + ); + AppendItem( + t_com_up, + wxT("Max Upload Rate: 0.0 kb/s"), 6 + ); + AppendItem( + t_com_up, + wxT("Max Average Upload Rate: \ + 0.0 kb/s"), 6 + ); + wxTreeItemId t_com_down = AppendItem( + t_com, wxT("Download"), 9 + ); SetItemBold(t_com_down); - AppendItem(t_com_down, wxT("Download-Speed: 0.0 kb/s"), 6); - AppendItem(t_sess_down, wxT("Average Downloadrate: 0.0 kb/s"), 6); - AppendItem(t_com_down, wxT("Max Download Rate: 0.0 kb/s"), 6); - AppendItem(t_com_down, wxT("Max Average Download Rate: 0.0 kb/s"), 6); + AppendItem( + t_com_down, + wxT("Download-Speed: 0.0 kb/s"), 6 + ); + AppendItem( + t_sess_down, + wxT("Average Downloadrate: 0.0 kb/s"), + 6 + ); + AppendItem( + t_com_down, + wxT("Max Download Rate: 0.0 kb/s"), 6 + ); + AppendItem( + t_com_down, + wxT("Max Average Download Rate: \ + 0.0 kb/s"), 6 + ); } /* @@ -174,24 +308,66 @@ void CStatisticsTreeCtrl::CreateTimeStatisticsBranch(wxTreeItemId root) { wxTreeItemId t_statistics = AppendItem(root, wxT("Time Statistics"), 2); SetItemBold(t_statistics); - AppendItem(t_statistics, wxT("Statistics last reset: Unknown"), 6); - AppendItem(t_statistics, wxT("Time since last reset: Unknown"), 6); - wxTreeItemId t_sess = AppendItem(t_statistics, wxT("Session"), 10); + AppendItem( + t_statistics, + wxT("Statistics last reset: Unknown"), 6 + ); + AppendItem( + t_statistics, + wxT("Time since last reset: Unknown"), 6 + ); + wxTreeItemId t_sess = AppendItem( + t_statistics, wxT("Session"), 10 + ); SetItemBold(t_sess); AppendItem(t_sess, wxT("Runtime: 0 minutes"), 6); - wxTreeItemId t_sess_ttime = AppendItem(t_sess, wxT("Transfer Time: 0 minutes (0.0%)"), 6); - AppendItem(t_sess_ttime, wxT("Upload Time: 0:00 hours (0.0%)"), 6); - AppendItem(t_sess_ttime, wxT("Download Time: 0:00 hours (0.0%)"), 6); - AppendItem(t_sess, wxT("Current Server Duration: 0:00 hours (0.0%)"), 6); - AppendItem(t_sess, wxT("Total Server Duration: 0:00 hours (0.0%)"), 6); - wxTreeItemId t_com = AppendItem(t_statistics, wxT("Comulative"), 11); + wxTreeItemId t_sess_ttime = AppendItem( + t_sess, wxT("Transfer Time: 0 minutes (0.0%)"),6 + ); + AppendItem( + t_sess_ttime, + wxT("Upload Time: 0:00 hours (0.0%)"), 6 + ); + AppendItem( + t_sess_ttime, + wxT("Download Time: 0:00 hours (0.0%)"), + 6 + ); + AppendItem( + t_sess, + wxT("Current Server Duration: \ + 0:00 hours (0.0%)"), 6 + ); + AppendItem( + t_sess, + wxT("Total Server Duration: 0:00 hours (0.0%)"), + 6 + ); + wxTreeItemId t_com = AppendItem( + t_statistics, wxT("Comulative"), 11 + ); SetItemBold(t_com); AppendItem(t_com, wxT("Runtime: 0 minutes"), 6); - wxTreeItemId t_com_ttime = AppendItem(t_com, wxT("Transfer Time: 0 minutes (0.0%)"), 6); - AppendItem(t_com_ttime, wxT("Upload Time: 0:00 hours (0.0%)"), 6); - AppendItem(t_com_ttime, wxT("Download Time: 0:00 hours (0.0%)"), 6); - AppendItem(t_com, wxT("Total Server Duration: 0:00 hours (0.0%)"), 6); - wxTreeItemId t_avg = AppendItem(t_statistics, wxT("Projected Averages"), 7); + wxTreeItemId t_com_ttime = AppendItem( + t_com, wxT("Transfer Time: 0 minutes (0.0%)"), 6 + ); + AppendItem( + t_com_ttime, + wxT("Upload Time: 0:00 hours (0.0%)"), 6 + ); + AppendItem( + t_com_ttime, + wxT("Download Time: 0:00 hours (0.0%)"), + 6 + ); + AppendItem( + t_com, + wxT("Total Server Duration: 0:00 hours (0.0%)"), + 6 + ); + wxTreeItemId t_avg = AppendItem( + t_statistics, wxT("Projected Averages"), 7 + ); SetItemBold(t_avg); AppendItem(t_avg, wxT("Daily"), 14); AppendItem(t_avg, wxT("Monthly"), 15); @@ -204,33 +380,85 @@ void CStatisticsTreeCtrl::CreateClientsBranch(wxTreeItemId root) { wxTreeItemId t_clients = AppendItem(root, wxT("Clients"), 3); SetItemBold(t_clients); - wxTreeItemId t_soft = AppendItem(t_clients, wxT("Client Software"), 6); - wxTreeItemId t_emule = AppendItem(t_soft, wxT("eMule: 0 (0.0%)"), 6); + wxTreeItemId t_soft = AppendItem( + t_clients, wxT("Client Software"), 6 + ); + wxTreeItemId t_emule = AppendItem( + t_soft, wxT("eMule: 0 (0.0%)"), 6 + ); AppendItem(t_emule, wxT("v0.30: 0 (0.0%)"), 6); AppendItem(t_emule, wxT("v0.29: 0 (0.0%)"), 6); AppendItem(t_emule, wxT("v0.28: 0 (0.0%)"), 6); AppendItem(t_emule, wxT("v0.27: 0 (0.0%)"), 6); - wxTreeItemId t_mule_old = AppendItem(t_emule, wxT("Old 0 (0.0%)"), 6); - AppendItem(t_mule_old, wxT("v0.26: 0 (0.0%)"), 6); - AppendItem(t_mule_old, wxT("v0.25: 0 (0.0%)"), 6); - AppendItem(t_mule_old, wxT("v0.24: 0 (0.0%)"), 6); - AppendItem(t_mule_old, wxT("v0.23: 0 (0.0%)"), 6); - wxTreeItemId t_hybrid = AppendItem(t_soft, wxT("eD Hybrid: 0 (0.0%)"), 6); - AppendItem(t_hybrid, wxT("v50.1: 0 (0.0%)"), 6); - AppendItem(t_hybrid, wxT("v50.0: 0 (0.0%)"), 6); - AppendItem(t_hybrid, wxT("v49.9: 0 (0.0%)"), 6); - AppendItem(t_hybrid, wxT("v49.5: 0 (0.0%)"), 6); - wxTreeItemId t_hybrid_old = AppendItem(t_hybrid, wxT("Old: 0 (0.0%)"), 6); - AppendItem(t_hybrid_old, wxT("v49.4: 0 (0.0)"), 6); - AppendItem(t_hybrid_old, wxT("v48.1: 0 (0.0)"), 6); - AppendItem(t_hybrid_old, wxT("v48.0: 0 (0.0)"), 6); - AppendItem(t_hybrid_old, wxT("v47.0: 0 (0.0)"), 6); - wxTreeItemId t_donkey = AppendItem(t_soft, wxT("eDonkey: 0 (0.0%)"), 6); - AppendItem(t_donkey, wxT("v61.0: 0 (0.0%)"), 6); - AppendItem(t_donkey, wxT("v60.0: 0 (0.0%)"), 6); - AppendItem(t_donkey, wxT("v59.0: 0 (0.0%)"), 6); - wxTreeItemId t_xmule = AppendItem(t_soft, wxT("xMule: 0 (0.0%)"), 6); - AppendItem(t_xmule, wxT("xMule: 0 (0.0%)"), 6); + wxTreeItemId t_mule_old = AppendItem( + t_emule, wxT("Old 0 (0.0%)"), 6 + ); + AppendItem( + t_mule_old, + wxT("v0.26: 0 (0.0%)"), 6 + ); + AppendItem( + t_mule_old, + wxT("v0.25: 0 (0.0%)"), 6 + ); + AppendItem( + t_mul... [truncated message content] |