You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(102) |
Dec
(255) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(38) |
Feb
(16) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ma...@us...> - 2004-01-14 10:05:55
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv26509 Modified Files: MainDlg.cpp Log Message: Re-added missing toolbar button separators in case of wxMSW vertical or wxMac toolbars. Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- MainDlg.cpp 30 Dec 2003 13:33:11 -0000 1.57 +++ MainDlg.cpp 14 Jan 2004 10:05:50 -0000 1.58 @@ -397,6 +397,7 @@ wxITEM_NORMAL, _("Connect to random server"), _("Connect to random server") ); + tb->AddSeparator(); } /* On wxGTK, we can use custom control in both toolbar positions */ #elif defined(__WXGTK__) @@ -418,6 +419,7 @@ wxITEM_NORMAL, _("Connect to random server"), _("Connect to random server") ); + tb->AddSeparator(); #endif /* Go through list of our pages and add all of them */ @@ -460,6 +462,7 @@ images.Clear(); names.Clear(); } else { + tb->AddSeparator(); tb->AddTool( ID_BTN_GUISETTINGS, _("Options"), img->GetImage(wxT("btn_guisettings")), @@ -481,6 +484,7 @@ names.Clear(); /* Anywhere else, custom controls in toolbar aren't supported at all */ #else + tb->AddSeparator(); tb->AddTool( ID_BTN_GUISETTINGS, _("Options"), img->GetImage(wxT("btn_guisettings")), |
From: <ma...@us...> - 2004-01-13 23:10:30
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv19364/src Modified Files: GUISettingsDlg.cpp Images.cpp SBPanel.cpp SearchListCtrl.cpp SearchListCtrl.h SearchWnd.cpp SearchWnd.h ServerWnd.cpp defines.h wxInterface.wdr wxInterface_wdr.cpp wxInterface_wdr.h Log Message: * Search page implemented. * Sidebar width is now correctly updated according to widest content. Index: GUISettingsDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/GUISettingsDlg.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- GUISettingsDlg.cpp 30 Dec 2003 13:31:48 -0000 1.36 +++ GUISettingsDlg.cpp 13 Jan 2004 23:10:26 -0000 1.37 @@ -397,7 +397,7 @@ _("Change the language of the interface. Requires interface \ restart to take effect") ); #endif - item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item2->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); wxGridSizer *item5 = new wxGridSizer( 2, 0, 0 ); @@ -434,7 +434,7 @@ #ifndef __WXX11__ item10->SetToolTip( _("Change the iconet the interface should use.") ); #endif - item8->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item8->Add( item10, 0, wxGROW|wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); wxGridSizer *item11 = new wxGridSizer( 2, 0, 0 ); @@ -477,7 +477,7 @@ #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|BORDERSTYLE, 5); wxStaticText *item18 = new wxStaticText( this, ID_TEXT, _("Font Test :)"), wxDefaultPosition, @@ -504,7 +504,7 @@ _("Set which page will be displayed on program startup") ); #endif - item19->Add( item21, 0, wxGROW|border_style, 5 ); + item19->Add( item21, 0, wxGROW|BORDERSTYLE, 5 ); wxCheckBox *item22 = new wxCheckBox( this, ID_REMEMBER_LAST, _("Remember last"), wxDefaultPosition, @@ -515,7 +515,7 @@ _("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|BORDERSTYLE, 5); item14->Add( item19, 0, wxLEFT|wxRIGHT, 5 ); @@ -535,7 +535,7 @@ Default: On") ); #endif - item23->Add( item24, 0, wxGROW|wxLEFT|border_style, 5 ); + item23->Add( item24, 0, wxGROW|wxLEFT|BORDERSTYLE, 5 ); wxCheckBox *item25 = new wxCheckBox( this, ID_PROMPTEXIT, _("Prompt on exit"), wxDefaultPosition, @@ -549,7 +549,7 @@ #endif item23->Add( item25, 0, wxGROW|wxALIGN_CENTER_VERTICAL - |wxLEFT|border_style, 5 + |wxLEFT|BORDERSTYLE, 5 ); wxBoxSizer *item26 = new wxBoxSizer( wxHORIZONTAL ); @@ -564,7 +564,7 @@ #endif item26->Add( item27, 0, wxGROW|wxALIGN_CENTER_VERTICAL| - wxLEFT|border_style, 5 + wxLEFT|BORDERSTYLE, 5 ); wxString strs28[] = { @@ -582,7 +582,7 @@ #endif item26->Add( item28, 0, wxALIGN_RIGHT| - wxALIGN_CENTER_VERTICAL|border_style, 5 + wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); item23->Add( item26, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -599,7 +599,7 @@ #endif item23->Add( item29, 0, wxGROW|wxALIGN_CENTER_VERTICAL| - wxLEFT|border_style, 5 + wxLEFT|BORDERSTYLE, 5 ); item0->Add( item23, 0, wxGROW, 5 ); Index: Images.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Images.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- Images.cpp 31 Dec 2003 10:52:55 -0000 1.55 +++ Images.cpp 13 Jan 2004 23:10:26 -0000 1.56 @@ -83,7 +83,7 @@ names.Add(wxT("btn_preferences")); names.Add(wxT("splashscreen")); names.Add(wxT("leftarrow")); names.Add(wxT("rightarrow")); names.Add(wxT("options")); names.Add(wxT("help")); - names.Add(wxT("quit")); + names.Add(wxT("quit")); names.Add(wxT("filter")); tool_img_width = 32; Index: SBPanel.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SBPanel.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- SBPanel.cpp 31 Dec 2003 10:24:26 -0000 1.19 +++ SBPanel.cpp 13 Jan 2004 23:10:26 -0000 1.20 @@ -113,7 +113,10 @@ mainsizer->Show(content); shown = true; } + GetParent()->Fit(); GetParent()->Layout(); + GetParent()->GetParent()->Layout(); + GetParent()->GetParent()->Update(); } /***************************************************************** SetContent */ Index: SearchListCtrl.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SearchListCtrl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SearchListCtrl.cpp 20 Nov 2003 01:27:26 -0000 1.8 +++ SearchListCtrl.cpp 13 Jan 2004 23:10:26 -0000 1.9 @@ -39,7 +39,7 @@ * column layout. */ CSearchListCtrl::CSearchListCtrl( - wxWindow*& parent,int id,const wxPoint& pos,wxSize siz,int flags + wxWindow* parent,int id,const wxPoint& pos,wxSize siz,int flags ) : CMListCtrl(parent,id,pos,siz,flags) { Index: SearchListCtrl.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SearchListCtrl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SearchListCtrl.h 24 Nov 2003 16:06:32 -0000 1.6 +++ SearchListCtrl.h 13 Jan 2004 23:10:26 -0000 1.7 @@ -36,7 +36,7 @@ class CSearchListCtrl: public CMListCtrl { public: - CSearchListCtrl(wxWindow*& parent,int id,const wxPoint& pos, + CSearchListCtrl(wxWindow* parent,int id,const wxPoint& pos, wxSize siz,int flags); private: Index: SearchWnd.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SearchWnd.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- SearchWnd.cpp 29 Dec 2003 09:25:25 -0000 1.17 +++ SearchWnd.cpp 13 Jan 2004 23:10:26 -0000 1.18 @@ -31,42 +31,617 @@ #include "SearchWnd.h" #include "MainDlg.h" -/* - * CSearchWnd class. - */ - +/**************************************************************** EVENT TABLE */ +/* Search Page event handling table. Not very interesting, sidebar toggling */ +/* event and checkboxes event handling is defined. Should get more */ +/* interesting in the future. */ +/******************************************************************************/ BEGIN_EVENT_TABLE(CSearchWnd,wxPanel) - EVT_TEXT_ENTER(ID_SEARCHSTRING, CSearchWnd::StartNewSearch) + EVT_BUTTON(ID_BTN_TOGGLE_SEARCH_SIDEBAR, CSearchWnd::ToggleSidebar) + EVT_CHECKBOX(-1, CSearchWnd::HandleCheckEvents) END_EVENT_TABLE() -/* - * Constructor for search window. - */ +/***************************************************************** CSearchWnd */ +/* Contructor for Search Page. Pretty much generic, call controls creation */ +/* method, and hide ourselves. */ +/******************************************************************************/ CSearchWnd::CSearchWnd( wxWindow *parent, wxWindowID id, const wxPoint &position, const wxSize& size, long style ) : wxPanel( parent, id, position, size, style ) { - SearchWnd( this, TRUE ); - - GetSearchResultsImage()->SetBitmap(img->GetImage(wxT("searchresults"))); - GetSearchResultsImage()->SetName(wxT("searchresults")); +bool sb_isshown; /* Wether sidebar is shown or not */ - Hide(); + CreateControls(); - GetSearchType()->SetSelection(0); - GetSearchMethod()->SetSelection(0); + m_config->Read(wxT("/SearchWnd/SideBar"), &sb_isshown); + + if (!sb_isshown) { + wxCommandEvent nullevent; + ToggleSidebar(nullevent); + } + + Hide(); } -/* - * Destructor for search window. All shutdown functions go here. - */ +/**************************************************************** ~CSearchWnd */ +/* The destroyer of Search Page. Just save the settings before leaving. */ +/******************************************************************************/ CSearchWnd::~CSearchWnd() { + SaveSettings(); } -/* - * Starts new search: Reads the search string from interface and sends search - * string to core. - */ -void CSearchWnd::StartNewSearch(wxCommandEvent &event) { - m_searchstring = GetSearchString()->GetValue(); +/************************************************************* CreateControls */ +/* There we go - start creating the page layout. Here we have: */ +/* mainsizer - class member variable, containing all controls of this page */ +/* sidebar - the sidebar containing various searching-related options/flags */ +/* Sidebar panels have their own controls-creation methods. Most of this page */ +/* is filled with CSearchListCtrl, which will contain the search results. */ +/******************************************************************************/ +void CSearchWnd::CreateControls() { + mainsizer = new wxFlexGridSizer(3); + mainsizer->AddGrowableCol(2); + mainsizer->AddGrowableRow(0); + + /* Sidebar ... */ + sidebar = new wxPanel( + this, -1, wxDefaultPosition, wxDefaultSize, + wxNO_FULL_REPAINT_ON_RESIZE|wxGROW, wxT("SearchWnd SideBar") + ); + wxFlexGridSizer *sbmain = new wxFlexGridSizer(1, 0, 0); + sbmain->AddGrowableCol(0); + + sidebar->SetSizer(sbmain); + sidebar->SetAutoLayout(true); + sbmain->Fit(sidebar); + sbmain->SetSizeHints(sidebar); + +#ifdef __WXMSW__ + mainsizer->Add(sidebar, 0, wxGROW|wxADJUST_MINSIZE, 5); +#else + mainsizer->Add(sidebar, 0, wxGROW|wxADJUST_MINSIZE|wxTOP, 5); +#endif + + /* Sidebar panels ... */ + CSBPanel *filters = new CSBPanel( + sidebar, -1, _("Results Filtering"), + wxT("SideBar_SearchFilter"), wxT("filter") + ); + filters->SetContent(CreateFiltersPanel(filters)); + sbmain->Add(filters, 0, wxGROW|wxALL|wxADJUST_MINSIZE); + + CSBPanel *methods = new CSBPanel( + sidebar, -1, _("Search Method"), + wxT("SideBar_SearchMethod"), wxT("searchresults") + ); + methods->SetContent(CreateMethodsPanel(methods)); + sbmain->Add(methods, 0, wxGROW|wxALL|wxADJUST_MINSIZE); + + /* Toggler ... */ + wxButton *toggler = new wxButton( + this, ID_BTN_TOGGLE_SEARCH_SIDEBAR, wxT("<"), + wxDefaultPosition, wxSize(12, 100), wxNO_BORDER + ); + toggler->SetFont(wxFont(14, wxNORMAL, wxNORMAL, wxBOLD)); + mainsizer->Add(toggler, 0, wxALIGN_CENTER, 5 ); + +#ifndef __WXX11__ + toggler->SetToolTip(_("Toggle sidebar on/off.")); +#endif + + wxFlexGridSizer *s_right = new wxFlexGridSizer(1); + s_right->AddGrowableCol(0); + s_right->AddGrowableRow(1); + + wxFlexGridSizer *s_top = new wxFlexGridSizer(2); + s_top->AddGrowableCol(0); + + wxTextCtrl *t_search = new wxTextCtrl(this, ID_SEARCH_STRING); + s_top->Add(t_search, 0, wxGROW|wxEXPAND); + wxButton *b_search = new wxButton( + this, ID_SEARCH, _("Search"), wxDefaultPosition, + wxDefaultSize, wxNO_BORDER + ); + s_top->Add(b_search); + +#ifndef __WXX11__ + t_search->SetToolTip( + _("Enter search string here. Regular expressions (AND/OR etc)" + "are supported. Alternativly, enter ed2k://file link to" + "directly start a download (multiple links supported).") + ); +#endif + s_right->Add(s_top, 0, wxGROW|wxEXPAND); + + list = new CSearchListCtrl( + this, -1, wxDefaultPosition, wxDefaultSize, + wxLC_REPORT|wxSUNKEN_BORDER + ); + s_right->Add(list, 0, wxGROW|wxEXPAND); + + mainsizer->Add(s_right, 0, wxGROW|wxEXPAND|wxTOP|wxRIGHT|wxBOTTOM, 5); + + SetSizer(mainsizer); + SetAutoLayout(true); + mainsizer->Fit(this); + mainsizer->SetSizeHints(this); +} + +/********************************************************* CreateFiltersPanel */ +/* This method creates the search result filtering panel content. The */ +/* interesting part here is the top part checkboxes - they are only visible */ +/* if `All types` box is unchecked. */ +/* @parent Parent window to be created controls in. */ +/******************************************************************************/ +wxSizer* CSearchWnd::CreateFiltersPanel(wxWindow *parent) { +bool tmp; /* Temporary storage for boolean values read from config */ +int tmp2; /* Temporary storage for integer values read from config */ + m_config->SetPath(wxT("/SearchWnd")); + + wxFlexGridSizer *s_main = new wxFlexGridSizer(1); + + /* Top part - 6 checkboxes for type filtering */ + wxFlexGridSizer *s_flex1 = new wxFlexGridSizer(2); + s_main->Add(s_flex1, 0, wxGROW|wxEXPAND); + s_filters = s_flex1; /* Store it there also for easier access */ + + wxCheckBox *c_all = new wxCheckBox(parent, ID_FLT_ALL, _("All types")); + wxFont fnt= c_all->GetFont(); + fnt.SetWeight(wxBOLD); + c_all->SetFont(fnt); + s_flex1->Add(c_all, 0, BORDERSTYLE|wxALIGN_LEFT|wxADJUST_MINSIZE, 5); + m_config->Read(wxT("Filter_ShowAll"), &tmp, true); + c_all->SetValue(tmp); + + if (!c_all->GetValue()) { + CreateFilterChecks(parent, s_flex1); + } + +#ifndef __WXX11__ + c_all->SetToolTip( + _("If checked, no search results filtering will accour.") + ); +#endif + + /* Bottom part - 8+8 check/txt boxes for other kinds of filtering */ + wxFlexGridSizer *s_flex2 = new wxFlexGridSizer(2); + s_main->Add(s_flex2, 0, wxGROW|wxEXPAND); + + wxCheckBox *c_size_l = new wxCheckBox( + parent, ID_CHK_FLT_SIZE_L, _("Size larger than") + ); + s_flex2->Add(c_size_l, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxTextCtrl *t_size_l = new wxTextCtrl( + parent, ID_TXT_FLT_SIZE_L, wxEmptyString, + wxDefaultPosition, wxSize(40, -1) + ); + s_flex2->Add(t_size_l, 0, wxALIGN_LEFT|wxEXPAND); + + wxCheckBox *c_size_s = new wxCheckBox( + parent, ID_CHK_FLT_SIZE_S, _("Size smaller than") + ); + s_flex2->Add(c_size_s, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxTextCtrl *t_size_s = new wxTextCtrl( + parent, ID_TXT_FLT_SIZE_S, wxEmptyString, + wxDefaultPosition, wxSize(40, -1) + ); + s_flex2->Add(t_size_s, 0, wxALIGN_LEFT|wxEXPAND); + + wxCheckBox *c_src_m = new wxCheckBox( + parent, ID_CHK_FLT_SRC_M, _("More than ... sources") + ); + s_flex2->Add(c_src_m, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxTextCtrl *t_src_m = new wxTextCtrl( + parent, ID_TXT_FLT_SRC_M, wxEmptyString, + wxDefaultPosition, wxSize(40, -1) + ); + s_flex2->Add(t_src_m, 0, wxALIGN_LEFT|wxEXPAND); + + wxCheckBox *c_limit = new wxCheckBox( + parent, ID_CHK_FLT_LIMIT, _("Limit number of results") + ); + s_flex2->Add(c_limit, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxTextCtrl *t_limit = new wxTextCtrl( + parent, ID_TXT_FLT_LIMIT, wxEmptyString, + wxDefaultPosition, wxSize(40, -1) + ); + s_flex2->Add(t_limit, 0, wxALIGN_LEFT|wxEXPAND); + +#ifndef __WXX11__ + c_size_l->SetToolTip( + _("Check to show only files with size larger than ...") + ); + t_size_l->SetToolTip( + _("The size (in MB's) of the smallest file to be shown.") + ); + c_size_s->SetToolTip( + _("Check to show only files with size smaller than ...") + ); + t_size_s->SetToolTip( + _("The size (in MB's) of the largest file to be shown.") + ); + c_src_m->SetToolTip( + _("Check to show only files with at least ... sources.") + ); + t_src_m->SetToolTip( + _("Minimal amount of sources a file needs to be shown.") + ); + c_limit->SetToolTip( + _("If checked, only ... first search results will be shown.") + ); + t_limit->SetToolTip( + _("Enter the maximum number of search results to be displayed.") + ); +#endif + + m_config->Read(wxT("Filter_Size_L_Check"), &tmp, false); + c_size_l->SetValue(tmp); + m_config->Read(wxT("Filter_Size_L_Value"), &tmp2, 0); + *t_size_l << tmp2; + t_size_l->Enable(tmp); + + m_config->Read(wxT("Filter_Size_S_Check"), &tmp, false); + c_size_s->SetValue(tmp); + m_config->Read(wxT("Filter_Size_S_Value"), &tmp2, 0); + *t_size_s << tmp2; + t_size_s->Enable(tmp); + + m_config->Read(wxT("Filter_Src_M_Check"), &tmp, false); + c_src_m->SetValue(tmp); + m_config->Read(wxT("Filter_Src_M_Value"), &tmp2, 0); + *t_src_m << tmp2; + t_src_m->Enable(tmp); + + m_config->Read(wxT("Filter_Limit_Check"), &tmp, true); + c_limit->SetValue(tmp); + m_config->Read(wxT("Filter_Limit_Value"), &tmp2, 300); + *t_limit << tmp2; + t_limit->Enable(tmp); + + return s_main; +} + +/********************************************************* CreateMethodsPanel */ +/* Creation of the search methology panel. Only controls there are 4 (more to */ +/* come!) radiobuttons. */ +/* @parent Parent window to be created controls in. */ +/******************************************************************************/ +wxSizer* CSearchWnd::CreateMethodsPanel(wxWindow *parent) { +int tmp; /* Temporary storage for integer type values read from config */ + wxFlexGridSizer *s_main = new wxFlexGridSizer(1); + s_main->AddGrowableCol(0); + + wxRadioButton *r_cursrv = new wxRadioButton( + parent, ID_RAD_MET_CURSRV, _("Current Server") + ); + s_main->Add(r_cursrv, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxRadioButton *r_allsrv = new wxRadioButton( + parent, ID_RAD_MET_ALLSRV, _("All Servers") + ); + s_main->Add(r_allsrv, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxRadioButton *r_jigle = new wxRadioButton( + parent, ID_RAD_MET_JIGLE, _("Jigle Database") + ); + s_main->Add(r_jigle, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxRadioButton *r_fdnk = new wxRadioButton( + parent, ID_RAD_MET_FDNK, _("FileDonkey Database") + ); + s_main->Add(r_fdnk, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + +#ifndef __WXX11__ + r_cursrv->SetToolTip(_("Search only the currently connected server.")); + r_allsrv->SetToolTip(_("Search all servers in server list.")); + r_jigle->SetToolTip(_("Search the Jigle web database.")); + r_fdnk->SetToolTip(_("Search the FileDonkey web database.")); +#endif + + m_config->Read(wxT("/SearchWnd/Method"), &tmp, 0); + switch (tmp) { + case 0: + r_cursrv->SetValue(true); + break; + case 1: + r_allsrv->SetValue(true); + break; + case 2: + r_jigle->SetValue(true); + break; + case 3: + r_fdnk->SetValue(true); + break; + default: + r_cursrv->SetValue(true); + break; + } + return s_main; +} + +/************************************************************** ToggleSidebar */ +/* Sidebar toggler. #ifdefed to be only used when we have patched wxSizer. */ +/* If its shown, remove it from mainsizer and hide it, otherwise, prepend it */ +/* to mainsizer and show it. Refresh() to avoid wierd visual leftovers. */ +/******************************************************************************/ +void CSearchWnd::ToggleSidebar(const wxCommandEvent &event) { +#ifdef __HAVE_REMOVE_GROWABLE_COL__ + if (sidebar->IsShown()) { + mainsizer->Remove(sidebar); + mainsizer->RemoveGrowableCol(2); + mainsizer->AddGrowableCol(1); + sidebar->Hide(); + GetBtnToggleSidebar()->SetLabel(wxT(">")); + } else { +#ifdef __WXMSW__ + mainsizer->Prepend( + sidebar, 0, wxGROW|wxBOTTOM|wxADJUST_MINSIZE, 5 + ); +#else + mainsizer->Prepend( + sidebar, 0, wxGROW|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5 + ); +#endif + mainsizer->RemoveGrowableCol(1); + mainsizer->AddGrowableCol(2); + sidebar->Show(); + GetBtnToggleSidebar()->SetLabel(wxT("<")); + } + Layout(); + Refresh(); +#endif +} + +/********************************************************** HandleCheckEvents */ +/* Here we hadle all check events. Its easier to handle them all in same */ +/* place, rather than having separate method for each of them (hei, they'r */ +/* not THAT important :P). Anyway, nothing of interest to see here - move on. */ +/******************************************************************************/ +void CSearchWnd::HandleCheckEvents(const wxCommandEvent &event) { + switch (event.GetId()) { + case ID_FLT_ALL: + CreateFilterChecks( + GetCheckFilterAll()->GetParent(), + s_filters, + !GetCheckFilterAll()->GetValue() + ); + break; + case ID_CHK_FLT_SIZE_L: + GetTextFilterSizeL()->Enable( + GetCheckFilterSizeL()->GetValue() + ); + break; + case ID_CHK_FLT_SIZE_S: + GetTextFilterSizeS()->Enable( + GetCheckFilterSizeS()->GetValue() + ); + break; + case ID_CHK_FLT_SRC_M: + GetTextFilterSrcM()->Enable( + GetCheckFilterSrcM()->GetValue() + ); + break; + case ID_CHK_FLT_LIMIT: + GetTextFilterLimit()->Enable( + GetCheckFilterLimit()->GetValue() + ); + break; + default: + break; + } +} + +/********************************************************* CreateFiltersPanel */ +/* Creates filtering checkboxes in @parent window to sizer @s_flex1. If @add */ +/* is true, the boxes are added, if false, they are removed/deleted. And */ +/* don't forget to save the checkbox states if they are removed. */ +/* @parent Parent window to be created controls in */ +/* @s_flex1 Sizer to append the checkboxes into */ +/* @add Wether to add or remove the checks - default: true (add) */ +/******************************************************************************/ +void CSearchWnd::CreateFilterChecks( + wxWindow *parent, wxFlexGridSizer *s_flex1, bool add +) { +bool tmp; /* Temporary storage for boolean type values read from config */ + if (add) { + wxCheckBox *c_audio = new wxCheckBox( + parent, ID_FLT_AUD, _("Audio") + ); + s_flex1->Add(c_audio, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_video = new wxCheckBox( + parent, ID_FLT_VID, _("Video") + ); + s_flex1->Add(c_video, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_archives = new wxCheckBox( + parent, ID_FLT_ARC, _("Archives") + ); + s_flex1->Add(c_archives, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_cdimages = new wxCheckBox( + parent, ID_FLT_CDI, _("CD Images") + ); + s_flex1->Add(c_cdimages, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_pictures = new wxCheckBox( + parent, ID_FLT_PIC, _("Pictures") + ); + s_flex1->Add(c_pictures, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_apps = new wxCheckBox( + parent, ID_FLT_APP, _("Applications") + ); + s_flex1->Add(c_apps, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + wxCheckBox *c_doc = new wxCheckBox( + parent, ID_FLT_DOC, _("Documents") + ); + s_flex1->Add(c_doc, 0, BORDERSTYLE|wxALIGN_LEFT, 5); + +#ifndef __WXX11__ + c_audio->SetToolTip( + _("UNcheck to filter OUT files with mp3/ogg/wav/ape " + "etc extensions.") + ); + c_video->SetToolTip( + _("UNcheck to filter OUT files with avi/mpg/ogm " + "etc extensions.") + ); + c_archives->SetToolTip( + _("UNcheck to filter OUT files with zip/rar/ace " + "etc extensions.") + ); + c_cdimages->SetToolTip( + _("UNcheck to filter OUT files with bin/ccd/iso " + "etc extensions.") + ); + c_pictures->SetToolTip( + _("UNcheck to filter OUT files with jpg/png/bmp " + "etc extensions.") + ); + c_apps->SetToolTip( + _("UNcheck to filter OUT files with exe/com/bat " + "etc extensions.") + ); + c_doc->SetToolTip( + _("UNcheck to filter OUT files with doc/pdf/txt " + "etc extensions.") + ); +#endif + + /* Set on/off/values according to config */ + m_config->SetPath(wxT("/SearchWnd")); + m_config->Read(wxT("Filter_Audio"), &tmp, true); + c_audio->SetValue(tmp); + m_config->Read(wxT("Filter_Video"), &tmp, true); + c_video->SetValue(tmp); + m_config->Read(wxT("Filter_Archives"), &tmp, true); + c_archives->SetValue(tmp); + m_config->Read(wxT("Filter_CDImages"), &tmp, true); + c_cdimages->SetValue(tmp); + m_config->Read(wxT("Filter_Pictures"), &tmp, true); + c_pictures->SetValue(tmp); + m_config->Read(wxT("Filter_Applications"), &tmp, true); + c_apps->SetValue(tmp); + m_config->Read(wxT("Filter_Documents"), &tmp, true); + c_doc->SetValue(tmp); + } else { + /* Don't forget states! */ + m_config->Write( + wxT("Filter_Audio"), + GetCheckFilterAudio()->GetValue() + ); + m_config->Write( + wxT("Filter_Video"), + GetCheckFilterVideo()->GetValue() + ); + m_config->Write( + wxT("Filter_Archives"), + GetCheckFilterArchives()->GetValue() + ); + m_config->Write( + wxT("Filter_Applications"), + GetCheckFilterApplications()->GetValue() + ); + m_config->Write( + wxT("Filter_CDIimages"), + GetCheckFilterCDImages()->GetValue() + ); + m_config->Write( + wxT("Filter_Pictures"), + GetCheckFilterPictures()->GetValue() + ); + m_config->Write( + wxT("Filter_Documents"), + GetCheckFilterDocuments()->GetValue() + ); + + s_flex1->Remove(GetCheckFilterAudio()); + delete GetCheckFilterAudio(); + s_flex1->Remove(GetCheckFilterVideo()); + delete GetCheckFilterVideo(); + s_flex1->Remove(GetCheckFilterArchives()); + delete GetCheckFilterArchives(); + s_flex1->Remove(GetCheckFilterCDImages()); + delete GetCheckFilterCDImages(); + s_flex1->Remove(GetCheckFilterPictures()); + delete GetCheckFilterPictures(); + s_flex1->Remove(GetCheckFilterApplications()); + delete GetCheckFilterApplications(); + s_flex1->Remove(GetCheckFilterDocuments()); + delete GetCheckFilterDocuments(); + } + parent->Layout(); /* SBPanel ... */ + parent->Fit(); + parent->GetParent()->Layout(); /* Sidebar ... */ + Layout(); +} + +/*************************************************************** SaveSettings */ +/* Save various settings relevant to this page. Don't touch filter checkboxes */ +/* if ShowAll isn't checked, since they don't exist then -> would crash us. */ +/******************************************************************************/ +void CSearchWnd::SaveSettings() { +long tmp; /* Temporary storage for long type values for writing to config */ + m_config->SetPath(wxT("/SearchWnd")); + m_config->Write(wxT("SideBar"), sidebar->IsShown()); + + m_config->Write(wxT("Filter_ShowAll"), GetCheckFilterAll()->GetValue()); + if (!GetCheckFilterAll()->GetValue()) { + m_config->Write( + wxT("Filter_Audio"), + GetCheckFilterAudio()->GetValue() + ); + m_config->Write( + wxT("Filter_Video"), + GetCheckFilterVideo()->GetValue() + ); + m_config->Write( + wxT("Filter_Archives"), + GetCheckFilterArchives()->GetValue() + ); + m_config->Write( + wxT("Filter_Applications"), + GetCheckFilterApplications()->GetValue() + ); + m_config->Write( + wxT("Filter_CDIimages"), + GetCheckFilterCDImages()->GetValue() + ); + m_config->Write( + wxT("Filter_Pictures"), + GetCheckFilterPictures()->GetValue() + ); + m_config->Write( + wxT("Filter_Documents"), + GetCheckFilterDocuments()->GetValue() + ); + } + + m_config->Write( + wxT("Filter_Size_L_Check"), GetCheckFilterSizeL()->GetValue() + ); + GetTextFilterSizeL()->GetValue().ToLong(&tmp); + m_config->Write(wxT("Filter_Size_L_Value"), tmp); + + m_config->Write( + wxT("Filter_Size_S_Check"), GetCheckFilterSizeS()->GetValue() + ); + GetTextFilterSizeS()->GetValue().ToLong(&tmp); + m_config->Write(wxT("Filter_Size_S_Value"), tmp); + + m_config->Write( + wxT("Filter_Src_M_Check"), GetCheckFilterSrcM()->GetValue() + ); + GetTextFilterSrcM()->GetValue().ToLong(&tmp); + m_config->Write(wxT("Filter_Src_M_Value"), tmp); + + m_config->Write( + wxT("Filter_Limit"), GetCheckFilterLimit()->GetValue() + ); + GetTextFilterLimit()->GetValue().ToLong(&tmp); + m_config->Write(wxT("Filter_Limit"), tmp); + + if (GetRadioMethodCurSrv()->GetValue()) { + m_config->Write(wxT("Method"), 0); + } else if (GetRadioMethodAllSrv()->GetValue()) { + m_config->Write(wxT("Method"), 1); + } else if (GetRadioMethodJigle()->GetValue()) { + m_config->Write(wxT("Method"), 2); + } else if (GetRadioMethodFDnk()->GetValue()) { + m_config->Write(wxT("Method"), 3); + } else { + m_config->Write(wxT("Method"), 0); + } } Index: SearchWnd.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/SearchWnd.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- SearchWnd.h 20 Nov 2003 01:27:26 -0000 1.9 +++ SearchWnd.h 13 Jan 2004 23:10:26 -0000 1.10 @@ -30,56 +30,113 @@ /* Private headers */ #include "wxInterface_wdr.h" +#include "SearchListCtrl.h" #include "defines.h" -/* - * CSearchWnd class. - */ - +/************************* CSearchWnd class ***********************************/ +/* This is the Search Page of the interface. Being a fairly standard page, it */ +/* has a sidebar with various options, a textbox+button for search string or */ +/* ed2k link, and da search list ofcourse. The list itself is done in */ +/* CSearcListCtrl class tho. */ +/******************************************************************************/ class CSearchWnd: public wxPanel { public: - CSearchWnd( + CSearchWnd( /* Constructor */ wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER | wxNO_FULL_REPAINT_ON_RESIZE ); - virtual ~CSearchWnd(); - + ~CSearchWnd(); /* Destructor */ + private: DECLARE_EVENT_TABLE() - void StartNewSearch(wxCommandEvent &event); - - /* Getters for dialog controls */ - wxTextCtrl* GetExtension() { - return (wxTextCtrl*) FindWindow( ID_EXTENSION ); + + /* Private methods */ + void CreateControls(); /* Main controls creation method */ + wxSizer* CreateFiltersPanel(wxWindow *parent); + void CreateFilterChecks( /* Filter SBPanel checkboxes creation */ + wxWindow *parent, wxFlexGridSizer *s_flex1, bool add = true + ); + wxSizer* CreateMethodsPanel(wxWindow *parent);/* Search methods panel */ + void SaveSettings(); /* Save various settings, like check states etc */ + + /* Event handlers */ + void ToggleSidebar(const wxCommandEvent &event);/* Toggles sidebar :) */ + void HandleCheckEvents( /* Handles checkbox on/off switching events */ + const wxCommandEvent &event + ); + + /* Getters */ + wxButton* GetBtnToggleSidebar() { + return (wxButton*)FindWindow(ID_BTN_TOGGLE_SEARCH_SIDEBAR); } - wxTextCtrl* GetMaxsize() { - return (wxTextCtrl*) FindWindow( ID_MAXSIZE ); + wxCheckBox* GetCheckFilterAll() { + return (wxCheckBox*)FindWindow(ID_FLT_ALL); } - wxTextCtrl* GetAvail() { - return (wxTextCtrl*) FindWindow( ID_AVAIL ); + wxCheckBox* GetCheckFilterVideo() { + return (wxCheckBox*)FindWindow(ID_FLT_VID); } - wxTextCtrl* GetMinsize() { - return (wxTextCtrl*) FindWindow( ID_MINSIZE ); + wxCheckBox* GetCheckFilterAudio() { + return (wxCheckBox*)FindWindow(ID_FLT_AUD); } - wxChoice* GetSearchMethod() { - return (wxChoice*) FindWindow( ID_SEARCHMETHOD ); + wxCheckBox* GetCheckFilterArchives() { + return (wxCheckBox*)FindWindow(ID_FLT_ARC); } - wxChoice* GetSearchType() { - return (wxChoice*) FindWindow( ID_SEARCHTYPE ); + wxCheckBox* GetCheckFilterCDImages() { + return (wxCheckBox*)FindWindow(ID_FLT_CDI); } - wxTextCtrl* GetSearchString() { - return (wxTextCtrl*) FindWindow( ID_SEARCHSTRING ); + wxCheckBox* GetCheckFilterPictures() { + return (wxCheckBox*)FindWindow(ID_FLT_PIC); } - wxStaticBitmap* GetSearchResultsImage() { - return (wxStaticBitmap*) FindWindow( ID_SEARCH_RESULTS_IMAGE ); + wxCheckBox* GetCheckFilterApplications() { + return (wxCheckBox*)FindWindow(ID_FLT_APP); } - - wxString m_searchstring; - wxImageList *m_imagelist; + wxCheckBox* GetCheckFilterDocuments() { + return (wxCheckBox*)FindWindow(ID_FLT_DOC); + } + wxCheckBox* GetCheckFilterSizeL() { + return (wxCheckBox*)FindWindow(ID_CHK_FLT_SIZE_L); + } + wxTextCtrl* GetTextFilterSizeL() { + return (wxTextCtrl*)FindWindow(ID_TXT_FLT_SIZE_L); + } + wxCheckBox* GetCheckFilterSizeS() { + return (wxCheckBox*)FindWindow(ID_CHK_FLT_SIZE_S); + } + wxTextCtrl* GetTextFilterSizeS() { + return (wxTextCtrl*)FindWindow(ID_TXT_FLT_SIZE_S); + } + wxCheckBox* GetCheckFilterSrcM() { + return (wxCheckBox*)FindWindow(ID_CHK_FLT_SRC_M); + } + wxTextCtrl* GetTextFilterSrcM() { + return (wxTextCtrl*)FindWindow(ID_TXT_FLT_SRC_M); + } + wxCheckBox* GetCheckFilterLimit() { + return (wxCheckBox*)FindWindow(ID_CHK_FLT_LIMIT); + } + wxTextCtrl* GetTextFilterLimit() { + return (wxTextCtrl*)FindWindow(ID_TXT_FLT_LIMIT); + } + wxRadioButton* GetRadioMethodCurSrv() { + return (wxRadioButton*)FindWindow(ID_RAD_MET_CURSRV); + } + wxRadioButton* GetRadioMethodAllSrv() { + return (wxRadioButton*)FindWindow(ID_RAD_MET_ALLSRV); + } + wxRadioButton* GetRadioMethodJigle() { + return (wxRadioButton*)FindWindow(ID_RAD_MET_JIGLE); + } + wxRadioButton* GetRadioMethodFDnk() { + return (wxRadioButton*)FindWindow(ID_RAD_MET_FDNK); + } + wxFlexGridSizer *mainsizer; /* Main sizer of this page */ + wxFlexGridSizer *s_filters; /* SB filters page checkboxes sizer */ + wxPanel *sidebar; /* Hm, I think its the sidebar... */ + CSearchListCtrl *list; /* And what could this be ? */ }; Index: ServerWnd.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerWnd.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- ServerWnd.cpp 29 Dec 2003 19:02:13 -0000 1.57 +++ ServerWnd.cpp 13 Jan 2004 23:10:26 -0000 1.58 @@ -314,7 +314,7 @@ to any server on startup") ); #endif - item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL ); @@ -328,7 +328,7 @@ to servers marked as \"static\" only") ); #endif - item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item2->Add( item3, 0, wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); @@ -368,7 +368,7 @@ removed from list if they do not respond") ); #endif - item9->Add( item10, 0, wxALIGN_CENTER|border_style, 5 ); + item9->Add( item10, 0, wxALIGN_CENTER|BORDERSTYLE, 5 ); item8->Add( item9, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); @@ -432,7 +432,7 @@ for log boxes (saves memory)") ); #endif - item1->Add( item2, 0, wxGROW|border_style, 5 ); + item1->Add( item2, 0, wxGROW|BORDERSTYLE, 5 ); wxTextCtrl *item3 = new wxTextCtrl( parent, ID_TXT_LINE_LIMIT, wxT(""), @@ -452,7 +452,7 @@ #ifndef __WXX11__ item4->SetToolTip( _("Save logs to disc also") ); #endif - item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|border_style, 5 ); + item0->Add( item4, 0, wxGROW|wxALIGN_CENTER_VERTICAL|BORDERSTYLE, 5 ); wxButton *item5 = new wxButton( parent, ID_BTN_CLEAR_LOGS, _("Clear"), Index: defines.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/defines.h,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- defines.h 30 Dec 2003 13:32:23 -0000 1.46 +++ defines.h 13 Jan 2004 23:10:26 -0000 1.47 @@ -51,9 +51,9 @@ * required. Thus we define it here and use where needed. */ #if defined(__WXMSW__) || defined (__WXX11__) - #define border_style wxALL + #define BORDERSTYLE wxALL #else - #define border_style 0 + #define BORDERSTYLE 0 #endif /** @@ -157,6 +157,31 @@ ID_LOG, ID_DEBUGLOG, + /* Search page */ + ID_BTN_TOGGLE_SEARCH_SIDEBAR, + ID_SEARCH_STRING, + ID_SEARCH, + ID_FLT_ALL, + ID_FLT_VID, + ID_FLT_AUD, + ID_FLT_ARC, + ID_FLT_CDI, + ID_FLT_PIC, + ID_FLT_APP, + ID_FLT_DOC, + ID_CHK_FLT_SIZE_L, + ID_TXT_FLT_SIZE_L, + ID_CHK_FLT_SIZE_S, + ID_TXT_FLT_SIZE_S, + ID_CHK_FLT_SRC_M, + ID_TXT_FLT_SRC_M, + ID_CHK_FLT_LIMIT, + ID_TXT_FLT_LIMIT, + ID_RAD_MET_CURSRV, + ID_RAD_MET_ALLSRV, + ID_RAD_MET_JIGLE, + ID_RAD_MET_FDNK, + /* Transfer page */ ID_SPLITTER, ID_CATEGORY, Index: wxInterface.wdr =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.wdr,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 Binary files /tmp/cvsW2v3TX and /tmp/cvsWo17VL differ Index: wxInterface_wdr.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface_wdr.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- wxInterface_wdr.cpp 17 Dec 2003 05:16:01 -0000 1.10 +++ wxInterface_wdr.cpp 13 Jan 2004 23:10:26 -0000 1.11 @@ -40,7 +40,6 @@ */ #include "ServerListCtrl.h" -#include "SearchListCtrl.h" #include "SharedFilesListCtrl.h" #include "StatisticsTreeCtrl.h" #include "ColorFrameCtrl.h" @@ -48,199 +47,6 @@ // Implement window functions -wxSizer *SearchWnd( wxWindow *parent, bool call_fit, bool set_sizer ) -{ - wxFlexGridSizer *item0 = new wxFlexGridSizer( 6, 0, 0, 0 ); - item0->AddGrowableCol( 0 ); - item0->AddGrowableRow( 2 ); - - wxFlexGridSizer *item1 = new wxFlexGridSizer( 1, 0, 0, 0 ); - item1->AddGrowableCol( 2 ); - item1->AddGrowableRow( 0 ); - - wxStaticBox *item3 = new wxStaticBox( parent, -1, _("Search") ); - wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL ); - - wxStaticText *item4 = new wxStaticText( parent, ID_TEXT, _("Name"), wxDefaultPosition, wxDefaultSize, 0 ); - item2->Add( item4, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item5 = new wxTextCtrl( parent, ID_SEARCHSTRING, wxT(""), wxDefaultPosition, wxSize(80,-1), wxTE_PROCESS_ENTER ); - item2->Add( item5, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - wxFlexGridSizer *item6 = new wxFlexGridSizer( 3, 0, 0 ); - - wxStaticText *item7 = new wxStaticText( parent, ID_TEXT, _("Method"), wxDefaultPosition, wxDefaultSize, 0 ); - item6->Add( item7, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxStaticText *item8 = new wxStaticText( parent, ID_TEXT, _("Type"), wxDefaultPosition, wxDefaultSize, 0 ); - item6->Add( item8, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - item6->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 ); - - wxString strs9[] = - { - _("Global"), - _("Server") - }; - wxChoice *item9 = new wxChoice( parent, ID_SEARCHMETHOD, wxDefaultPosition, wxSize(100,-1), 2, strs9, 0 ); - item6->Add( item9, 0, wxALIGN_CENTER, 5 ); - - wxString strs10[] = - { - _("Any"), - _("Video"), - _("Audio"), - _("Archive"), - _("Text"), - _("Image") - }; - wxChoice *item10 = new wxChoice( parent, ID_SEARCHTYPE, wxDefaultPosition, wxSize(100,-1), 6, strs10, 0 ); - item6->Add( item10, 0, wxALIGN_CENTER, 5 ); - - wxButton *item11 = new wxButton( parent, ID_BTN_RESET, _("Reset"), wxDefaultPosition, wxDefaultSize, 0 ); - item6->Add( item11, 0, wxGROW, 5 ); - - item2->Add( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - item1->Add( item2, 0, wxGROW, 5 ); - - wxStaticBox *item13 = new wxStaticBox( parent, -1, _("Filter") ); - wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL ); - - wxBoxSizer *item14 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer *item15 = new wxBoxSizer( wxVERTICAL ); - - wxStaticText *item16 = new wxStaticText( parent, ID_TEXT, _("min Size"), wxDefaultPosition, wxDefaultSize, 0 ); - item15->Add( item16, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item17 = new wxTextCtrl( parent, ID_MINSIZE, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 ); - item15->Add( item17, 0, wxALIGN_CENTER, 5 ); - - item14->Add( item15, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxStaticText *item18 = new wxStaticText( parent, ID_TEXT, wxT("MB"), wxDefaultPosition, wxDefaultSize, 0 ); - item14->Add( item18, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - wxBoxSizer *item19 = new wxBoxSizer( wxVERTICAL ); - - wxStaticText *item20 = new wxStaticText( parent, ID_TEXT, _("max Size"), wxDefaultPosition, wxDefaultSize, 0 ); - item19->Add( item20, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item21 = new wxTextCtrl( parent, ID_MAXSIZE, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 ); - item19->Add( item21, 0, wxALIGN_CENTER, 5 ); - - item14->Add( item19, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL, 5 ); - - wxStaticText *item22 = new wxStaticText( parent, ID_TEXT, wxT("MB"), wxDefaultPosition, wxDefaultSize, 0 ); - item14->Add( item22, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM, 5 ); - - item12->Add( item14, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer *item23 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer *item24 = new wxBoxSizer( wxVERTICAL ); - - wxStaticText *item25 = new wxStaticText( parent, ID_TEXT, _("Availability"), wxDefaultPosition, wxDefaultSize, 0 ); - item24->Add( item25, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item26 = new wxTextCtrl( parent, ID_AVAIL, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 ); - item24->Add( item26, 0, wxALIGN_CENTER, 5 ); - - item23->Add( item24, 0, wxALIGN_CENTER, 5 ); - - item23->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 0 ); - - wxBoxSizer *item27 = new wxBoxSizer( wxVERTICAL ); - - wxStaticText *item28 = new wxStaticText( parent, ID_TEXT, _("Extension"), wxDefaultPosition, wxDefaultSize, 0 ); - item27->Add( item28, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item29 = new wxTextCtrl( parent, ID_EXTENSION, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 ); - item27->Add( item29, 0, wxALIGN_CENTER, 5 ); - - item23->Add( item27, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL, 5 ); - - item12->Add( item23, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - item1->Add( item12, 0, wxGROW|wxLEFT, 5 ); - - wxStaticBox *item31 = new wxStaticBox( parent, -1, _("Direct Download") ); - wxStaticBoxSizer *item30 = new wxStaticBoxSizer( item31, wxVERTICAL ); - - wxStaticText *item32 = new wxStaticText( parent, ID_TEXT, _("ED2K Link(s)"), wxDefaultPosition, wxDefaultSize, 0 ); - item30->Add( item32, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - wxTextCtrl *item33 = new wxTextCtrl( parent, ID_TEXTCTRL, wxT(""), wxDefaultPosition, wxSize(-1,85), wxTE_MULTILINE ); - item30->Add( item33, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - item1->Add( item30, 0, wxGROW|wxLEFT, 5 ); - - item0->Add( item1, 0, wxGROW|wxALL, 5 ); - - wxFlexGridSizer *item34 = new wxFlexGridSizer( 2, 0, 0 ); - item34->AddGrowableCol( 0 ); - - wxBoxSizer *item35 = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBitmap *item36 = new wxStaticBitmap( parent, ID_SEARCH_RESULTS_IMAGE, Icons( 0 ), wxDefaultPosition, wxDefaultSize ); - item35->Add( item36, 0, wxALIGN_CENTER|wxALL, 5 ); - - wxStaticText *item37 = new wxStaticText( parent, ID_TEXT, _("Search Results"), wxDefaultPosition, wxDefaultSize, 0 ); - item35->Add( item37, 0, wxALIGN_CENTER|wxRIGHT|wxTOP|wxBOTTOM, 5 ); - - item34->Add( item35, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - wxBoxSizer *item38 = new wxBoxSizer( wxHORIZONTAL ); - - wxButton *item39 = new wxButton( parent, ID_BUTTON, _("Start"), wxDefaultPosition, wxDefaultSize, 0 ); - item38->Add( item39, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxBOTTOM, 5 ); - - wxButton *item40 = new wxButton( parent, ID_BUTTON, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - item40->Enable( FALSE ); - item38->Add( item40, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxBOTTOM, 5 ); - - item34->Add( item38, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - item0->Add( item34, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); - - CSearchListCtrl *item41 = new CSearchListCtrl( parent, ID_SEARCHRESULTS, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER ); - item0->Add( item41, 0, wxGROW|wxLEFT|wxRIGHT, 5 ); - - wxGauge *item42 = new wxGauge( parent, ID_GAUGE, 100, wxDefaultPosition, wxSize(100,10), 0 ); - item0->Add( item42, 0, wxGROW|wxLEFT|wxRIGHT, 5 ); - - wxBoxSizer *item43 = new wxBoxSizer( wxHORIZONTAL ); - - wxButton *item44 = new wxButton( parent, ID_BUTTON, _("Download Selected"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); - item43->Add( item44, 0, wxALIGN_CENTER|wxALL, 5 ); - - wxStaticText *item45 = new wxStaticText( parent, ID_TEXT, wxT("->"), wxDefaultPosition, wxDefaultSize, 0 ); - item45->SetFont( wxFont( 12, wxMODERN, wxNORMAL, wxNORMAL ) ); -#if defined(__WXMSW__) && !(wxCHECK_VERSION(2,3,0)) - item45->SetSize( item45->GetBestSize() ); -#endif - item43->Add( item45, 0, wxALIGN_CENTER|wxALL, 5 ); - - wxButton *item46 = new wxButton( parent, ID_BUTTON, _("All"), wxDefaultPosition, wxDefaultSize, 0 ); - item43->Add( item46, 0, wxALIGN_CENTER|wxALL, 5 ); - - item0->Add( item43, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - if (set_sizer) - { - parent->SetAutoLayout( TRUE ); - parent->SetSizer( item0 ); - if (call_fit) - { - item0->Fit( parent ); - item0->SetSizeHints( parent ); - } - } - - return item0; -} - wxSizer *SharedFilesWnd( wxWindow *parent, bool call_fit, bool set_sizer ) { wxFlexGridSizer *item0 = new wxFlexGridSizer( 4, 0, 0, 0 ); Index: wxInterface_wdr.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface_wdr.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- wxInterface_wdr.h 17 Dec 2003 05:16:01 -0000 1.5 +++ wxInterface_wdr.h 13 Jan 2004 23:10:26 -0000 1.6 @@ -28,77 +28,64 @@ // Declare window functions -#define ID_TEXT 10000 -#define ID_SEARCHSTRING 10001 -#define ID_SEARCHMETHOD 10002 -#define ID_SEARCHTYPE 10003 -#define ID_BTN_RESET 10004 -#define ID_MINSIZE 10005 -#define ID_MAXSIZE 10006 -#define ID_AVAIL 10007 -#define ID_EXTENSION 10008 -#define ID_TEXTCTRL 10009 -#define ID_SEARCH_RESULTS_IMAGE 10010 -#define ID_BUTTON 10011 -#define ID_SEARCHRESULTS 10012 -#define ID_GAUGE 10013 -wxSizer *SearchWnd( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); - -#define ID_SHARED_FILES_IMAGE 10014 -#define ID_TXT_SHARED 10015 -#define ID_SHAREDLISTCTRL 10016 -#define ID_CURSES_REQUESTS 10017 -#define ID_CURSES_ACCEPTED_UPLOADS 10018 -#define ID_CURSES_TRANSFERRED 10019 -#define ID_G_REQUESTS 10020 -#define ID_G_UPLOADS 10021 -#define ID_G_TRANSFERRED 10022 -#define ID_TOTAL_REQUESTS 10023 -#define ID_TOTAL_ACCEPTED_UPLOADS 10024 -#define ID_TOTAL_TRANSFERRED 10025 +#define ID_SHARED_FILES_IMAGE 10000 +#define ID_TXT_SHARED 10001 +#define ID_SHAREDLISTCTRL 10002 +#define ID_TEXT 10003 +#define ID_CURSES_REQUESTS 10004 +#define ID_CURSES_ACCEPTED_UPLOADS 10005 +#define ID_CURSES_TRANSFERRED 10006 +#define ID_G_REQUESTS 10007 +#define ID_G_UPLOADS 10008 +#define ID_G_TRANSFERRED 10009 +#define ID_TOTAL_REQUESTS 10010 +#define ID_TOTAL_ACCEPTED_UPLOADS 10011 +#define ID_TOTAL_TRANSFERRED 10012 wxSizer *SharedFilesWnd( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_FRIEND_IMAGE 10026 -#define ID_LISTCTRL 10027 -#define ID_MESSAGES_IMAGE 10028 -#define ID_NOTEBOOK 10029 +#define ID_FRIEND_IMAGE 10013 +#define ID_LISTCTRL 10014 +#define ID_MESSAGES_IMAGE 10015 +#define ID_NOTEBOOK 10016 +#define ID_TEXTCTRL 10017 +#define ID_BUTTON 10018 wxSizer *MessagesWnd( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define BTN_STAT 10030 -#define ID_STATSTREECTRL 10031 -#define ID_FOREIGN 10032 -#define ID_CON_GRAPH 10033 -#define ID_DL_SES 10034 -#define ID_DL_CUR 10035 -#define ID_DL_AVG 10036 -#define ID_DL_GRAPH 10037 -#define ID_UL_SES 10038 -#define ID_UL_CUR 10039 -#define ID_UL_AVG 10040 -#define ID_UL_GRAPH 10041 +#define BTN_STAT 10019 +#define ID_STATSTREECTRL 10020 +#define ID_FOREIGN 10021 +#define ID_CON_GRAPH 10022 +#define ID_DL_SES 10023 +#define ID_DL_CUR 10024 +#define ID_DL_AVG 10025 +#define ID_DL_GRAPH 10026 +#define ID_UL_SES 10027 +#define ID_UL_CUR 10028 +#define ID_UL_AVG 10029 +#define ID_UL_GRAPH 10030 wxSizer *StatisticsWnd( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_LANG_NAME 10042 -#define ID_BTN_ADD_LANG_OK 10043 -#define ID_BTN_ADD_LANG_CANCEL 10044 +#define ID_LANG_NAME 10031 +#define ID_BTN_ADD_LANG_OK 10032 +#define ID_BTN_ADD_LANG_CANCEL 10033 wxSizer *Dlg_AddLanguage( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_BTN_ADDICONSET_OK 10045 -#define ID_BTN_ADDICONSET_CANCEL 10046 +#define ID_BTN_ADDICONSET_OK 10034 +#define ID_BTN_ADDICONSET_CANCEL 10035 wxSizer *Dlg_AddIconSet( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); -#define ID_LINE 10047 -#define ID_STATUS_TXT 10048 -#define ID_BMP_STATUS_USERS 10049 -#define ID_STATUS_USERS 10050 -#define ID_BMP_STATUS_FILES 10051 -#define ID_STATUS_FILES 10052 -#define ID_BMP_STATUS_UPLOAD 10053 -#define ID_STATUS_UPLOAD 10054 -#define ID_BMP_STATUS_DLOAD 10055 -#define ID_STATUS_DLOAD 10056 -#define ID_BMP_STATUS_CONNECTION 10057 -#define ID_STATUS_CONNECTION 10058 +#define ID_LINE 10036 +#define ID_STATUS_TXT 10037 +#define ID_BMP_STATUS_USERS 10038 +#define ID_STATUS_USERS 10039 +#define ID_BMP_STATUS_FILES 10040 +#define ID_STATUS_FILES 10041 +#define ID_BMP_STATUS_UPLOAD 10042 +#define ID_STATUS_UPLOAD 10043 +#define ID_BMP_STATUS_DLOAD 10044 +#define ID_STATUS_DLOAD 10045 +#define ID_BMP_STATUS_CONNECTION 10046 +#define ID_STATUS_CONNECTION 10047 wxSizer *StatusBar( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE ); // Declare menubar functions @@ -107,7 +94,7 @@ // Declare bitmap functions -#define ID_NULL_BMP 10059 +#define ID_NULL_BMP 10048 wxBitmap Icons( size_t index ); #endif |
From: <ma...@us...> - 2004-01-13 23:10:29
|
Update of /cvsroot/sharedaemon/ui-wx/src/images/emule_inverted In directory sc8-pr-cvs1:/tmp/cvs-serv19364/src/images/emule_inverted Added Files: filter.png Log Message: * Search page implemented. * Sidebar width is now correctly updated according to widest content. --- NEW FILE: filter.png --- (This appears to be a binary file; contents omitted.) |
From: <ma...@us...> - 2004-01-13 23:10:29
|
Update of /cvsroot/sharedaemon/ui-wx/src/images/emule_greyscale In directory sc8-pr-cvs1:/tmp/cvs-serv19364/src/images/emule_greyscale Added Files: filter.png Log Message: * Search page implemented. * Sidebar width is now correctly updated according to widest content. --- NEW FILE: filter.png --- (This appears to be a binary file; contents omitted.) |
From: <ma...@us...> - 2004-01-13 23:10:29
|
Update of /cvsroot/sharedaemon/ui-wx/src/images/default In directory sc8-pr-cvs1:/tmp/cvs-serv19364/src/images/default Added Files: filter.png Log Message: * Search page implemented. * Sidebar width is now correctly updated according to widest content. --- NEW FILE: filter.png --- (This appears to be a binary file; contents omitted.) |
From: <ma...@us...> - 2004-01-13 23:10:29
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv19364 Modified Files: Changelog Log Message: * Search page implemented. * Sidebar width is now correctly updated according to widest content. Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- Changelog 10 Jan 2004 23:04:24 -0000 1.125 +++ Changelog 13 Jan 2004 23:10:26 -0000 1.126 @@ -25,6 +25,13 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/11/14 Alo Sarv + * Search page implemented. + * Sidebar width is now correctly updated according to widest content. + +2003/11/13 Alo Sarv + * Fixed minor memory leak in listcontrol column context menu creation. + 2003/01/11 Alo Sarv * Applied patch [871350] by Julien Palmas - automatic creation of wxInterface.app package for Mac OS. |
From: <ma...@us...> - 2004-01-13 20:54:10
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv21193/src Modified Files: Makefile.am Log Message: Reset colour in the end... Index: Makefile.am =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.am 10 Jan 2004 23:01:57 -0000 1.14 +++ Makefile.am 13 Jan 2004 20:54:07 -0000 1.15 @@ -100,7 +100,7 @@ echo -e "$(WARNINGCOLOR)$(BUILD)\\c"; \ echo -e "$(OUTPUTCOLOR)$@$(WELLCOLOR) binary!$(ACTIONCOLOR)"; \ echo -e "$(ACTIONCOLOR)Now cd to src/ dir and type $(OUTPUTCOLOR)./$@$(ACTIONCOLOR) to start the application."; \ - echo -e "$(ACTIONCOLOR)or if you are under Mac OS X, type $(OUTPUTCOLOR)make dist$(ACTIONCOLOR) to build $(OUTPUTCOLOR)$@.app"; \ + echo -e "$(ACTIONCOLOR)or if you are under Mac OS X, type $(OUTPUTCOLOR)make dist$(ACTIONCOLOR) to build $(OUTPUTCOLOR)$@.app$(DEFAULTCOLOR)"; \ else \ echo -e "failed:"; \ cat .err; \ |
From: <ma...@us...> - 2004-01-13 01:06:13
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv9919/src Modified Files: MListCtrl.cpp Log Message: Fixed memory leak in popupmenu handling. Index: MListCtrl.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MListCtrl.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- MListCtrl.cpp 20 Nov 2003 01:27:26 -0000 1.7 +++ MListCtrl.cpp 13 Jan 2004 01:06:07 -0000 1.8 @@ -73,6 +73,7 @@ ); } PopupMenu(colmenu, event.GetPoint()); + delete colmenu; } /* |
From: <bo...@us...> - 2004-01-12 21:39:58
|
Update of /cvsroot/sharedaemon/core/src In directory sc8-pr-cvs1:/tmp/cvs-serv30982 Modified Files: Ed2kConnection.h test.cpp Log Message: Cleaned up a function by splitting it down to two, added new state CLIENT_TCP_WAITING_FOR_HASHSET_ANSWER and added initial support to load known.met and preferences.dat (pref_met_ps) Index: Ed2kConnection.h =================================================================== RCS file: /cvsroot/sharedaemon/core/src/Ed2kConnection.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Ed2kConnection.h 26 Nov 2003 01:22:56 -0000 1.4 +++ Ed2kConnection.h 12 Jan 2004 21:39:55 -0000 1.5 @@ -49,6 +49,7 @@ // we are contacting a client: CLIENT_TCP_SENDING_HELLO_PACKET, CLIENT_TCP_WAITING_FOR_HELLO_ANSWER, + CLIENT_TCP_WAITING_FOR_HASHSET_ANSWER, // Unused ILLEGAL }; Index: test.cpp =================================================================== RCS file: /cvsroot/sharedaemon/core/src/test.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- test.cpp 6 Jan 2004 05:59:55 -0000 1.31 +++ test.cpp 12 Jan 2004 21:39:55 -0000 1.32 @@ -362,7 +362,7 @@ for (num=PNUM;num;) bitmap[--num]=0; - for (long i=0;i<0x7fffffff;++i) { + for (long i=0;i<0x7fffffffLU;++i) { int r=rand(); r=(int)(((4.0*num)*rand())/RAND_MAX); @@ -371,7 +371,7 @@ // BitmapX.DebugPrint(); unsigned long rc=BitmapX->Alloc(); printf("=%lx\n",rc); - if (rc==0xffffffff) { + if (rc==0xffffffffLU) { if (NUM && num!=NUM) { printf("Error: Couldn't allocate entry while at least one was still free.\n"); exit(2); @@ -588,6 +588,9 @@ struct parsestruct * server_met_ps; struct parsestruct * part_met_ps; +struct parsestruct * known_met_ps; +struct parsestruct * pref_met_ps; + int num_partfiles=0; int max_partfiles=0; std::string IncomingDirectory="/mnt/Fat_C/gesaugt/Internet/eMule/Incoming"; @@ -674,13 +677,41 @@ "<BYTE>magic<DWORD>date<HASH>filehash" /* * According to eDonkey-protocol-0.6.1, there are existing - * broken clients, which doubles the list of chunkhashs. + * broken clients, which doubles the list of chunkhashes. * So, numchunks may be 2*real_num_chunks. Keep this in mind. */ "<WORD>chunkcount<HASH>chunkhash[chunkcount]" "<DWORD>tagcount<TAG>tag[tagcount]" ); + known_met_ps=parse_line( + /* + * According to eDonkey-protocol-0.6.1, the field magic is + * 0x0e. + */ + "<BYTE>magic<DWORD>numfiles{" + "<DWORD>date<HASH>file" + "<WORD>chunkcount<HASH>chunkhash[chunkcount]" + "<DWORD>tagcount<TAG>tag[tagcount]" + "}file[numfiles]" + ); + + pref_met_ps=parse_line( + /* + * The following entry shows, how stupid the one developing + * ed2k must be, to store the IP address in the preferences + * file. What shall this be good for? + */ + "<IPPORT>address<HASH>user" + /* + * There are two tagsets, I called the first 'sometags' and + * the other 'preftags', as I didn't get better names for + * them. As I know what the meaning of that is, I can get + * them better names ... + */ + "<DWORD>sometagcount<TAG>sometag[sometagcount]" + "<DWORD>preftagcount<TAG>preftag[preftagcount]" + ); /* print_parsestruct(server_met_ps,0); */ @@ -801,6 +832,32 @@ return PClist[proto_opcode]=new ParseClass(ps); } +void Client_Tcp_Sending_Hashset_Request(u32 id,hash file) { + Ed2kPacket p; + + ParseClass * PC=GetParseClass("HASHSETREQUEST"); + PC->Set(file,"file_hash"); + PC->Write(p,0xe3,HASHSETREQUEST); + + printf( + "Sending packet (id=%lu; ip:port=%lu:%u. Protocol=0x%02x, Opcode=0x%02x, Size=0x%08x\n", + (long unsigned)id,(long unsigned)Connection::GetSocket(id).GetIP(), + (unsigned)Connection::GetSocket(id).GetPort(),p.GetProtocol(), + p.GetOpcode(),(int)p.GetSize() + ); + printf("%s:%i: \n",__FILE__,__LINE__); HexDump(p.GetPtr(),p.GetSize(),true); + + if (!Connection::GetSocket(id).EnqueuePacket(p)) { + if (get_errno()!=SOCKET_EWOULDBLOCK) { + Connection::GetSocket(id).Close(); + Connection::SetStatus(id,ILLEGAL); + Connection::Free(id); + return; + } + } + Connection::SetStatus(id,CLIENT_TCP_WAITING_FOR_HASHSET_ANSWER); +} + void Client_Tcp_Sending_Hello_Packet(u32 id) { bool rc; Ed2kPacket p; @@ -870,19 +927,7 @@ } Connection::SetStatus(id,CLIENT_TCP_WAITING_FOR_HELLO_ANSWER); - p.BuildHashsetRequestPacket(filehash); - printf( - "Sending packet (id=%lu; ip:port=%lu:%u. Protocol=0x%02x, Opcode=0x%02x, Size=0x%08x\n", - (long unsigned)id,(long unsigned)Connection::GetSocket(id).GetIP(), - (unsigned)Connection::GetSocket(id).GetPort(),p.GetProtocol(), - p.GetOpcode(),(int)p.GetSize() - ); - printf("%s:%i: \n",__FILE__,__LINE__); HexDump(p.GetPtr(),p.GetSize(),true); - rc=Connection::GetSocket(id).EnqueuePacket(p); - if (!rc) { - printf("error sending hashset request.\n"); - } - rc=true; + Client_Tcp_Sending_Hashset_Request(id,filehash); } void Server_Tcp_Sending_Login_Request(u32 id) { @@ -973,10 +1018,7 @@ u16 msglen,i; char * msg; - printf("Servermessage:\n"); - // Log Message. PC->Get(msglen,"message_len"); - printf("msglen=%u\n",msglen); msg=new char[msglen+1]; for (i=0;i<msglen;++i) { PC->GetF(msg[i],"message[%u]",i); @@ -1009,6 +1051,7 @@ "Out of memory.\n" ,__FILE__,__FUNCTION__,__LINE__ ); + exit(2); } } connection_id[num_connected]=id; @@ -1098,7 +1141,7 @@ void Serve(u32 id) { bool again; - static u32 nc=0xffffffff; + static u32 nc=0xffffffffLU; bool rc; |
From: <bo...@us...> - 2004-01-12 21:32:45
|
Update of /cvsroot/sharedaemon/core/src In directory sc8-pr-cvs1:/tmp/cvs-serv29094 Modified Files: Ed2kPacket.cpp parse-ed2k.c parse-ed2k.h Log Message: Removed double #defines Index: Ed2kPacket.cpp =================================================================== RCS file: /cvsroot/sharedaemon/core/src/Ed2kPacket.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Ed2kPacket.cpp 20 Nov 2003 16:27:25 -0000 1.3 +++ Ed2kPacket.cpp 12 Jan 2004 21:32:42 -0000 1.4 @@ -20,6 +20,9 @@ #include "Ed2kPacket.h" +#include "parse-ed2k.h" + +/* #define LOGINREQUEST 0x01 // mlDonkey adds DWORD with content: 'MLDK' #define REJECT 0x05 #define GETSERVERLIST 0x14 @@ -102,6 +105,7 @@ #define VERIFYUPSANSWER 0x72 // (never used) #define UDPVERIFYUPREQ 0x73 // (never used) #define UDPVERIFYUPA 0x74 // (never used) +*/ static u8 buf[1024]; static int ofs; Index: parse-ed2k.c =================================================================== RCS file: /cvsroot/sharedaemon/core/src/parse-ed2k.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- parse-ed2k.c 9 Dec 2003 00:16:29 -0000 1.15 +++ parse-ed2k.c 12 Jan 2004 21:32:42 -0000 1.16 @@ -95,15 +95,10 @@ // | | | | | +---- Client <-> Server // | | | | | | +-- Client <-> Client // Client <-> Server -#define LOGINREQUEST 0x01 // mlDonkey adds a DWORD with content: 'MLDK' // <DWORD>tagcount<TAG>tag[tagcount] // <BYTE>magic=0x10 { 1,0,0,0,0,1,0,PROT_NAME(LOGINREQUEST) ,"cse301",NULL,"<HASH>user_hash<IPPORT>client_address=0,0<DWORD>tagcount<TAG>tag[tagcount]<IPPORT>server_address<DWORD>*software_id=1262767181" }, -#define REJECT 0x05 { 1,0,0,0,0,0,0,PROT_NAME(REJECT) ,"cse305",NULL,"" }, -#define GETSERVERLIST 0x14 { 1,0,0,0,0,0,0,PROT_NAME(GETSERVERLIST) ,"cse314",NULL,"" }, -#define OFFERFILES 0x15 { 1,0,0,0,0,0,0,PROT_NAME(OFFERFILES) ,"cse315",NULL,"<DWORD>filecount{<HASH>hash<IPPORT>source<DWORD>tagcount<TAG>tag[tagcount]}file[filecount]" }, -#define SEARCHREQUEST 0x16 // { 1,0,0,0,0,0,0,PROT_NAME(SEARCHREQUEST) ,"cse316",NULL,"<Query_Tree>query" }, /* @@ -130,188 +125,111 @@ */ -#define DISCONNECT 0x18 // (not verified) { 1,0,0,0,0,0,0,PROT_NAME(DISCONNECT) ,"cse318",NULL,"" }, -#define GETSOURCES 0x19 { 1,0,0,0,0,0,0,PROT_NAME(GETSOURCES) ,"cse319",NULL,"<HASH>file_hash" }, -#define SEARCH_USER 0x1A // { 1,0,0,0,0,0,0,PROT_NAME(SEARCH_USER) ,"cse31a",NULL,"<Query_Tree>query" }, // Maybe there is a 0x1b too // CONFORMING TO "eDonkey-protocol-0.6.1" -#define CALLBACKREQUEST 0x1C // <ID 4> { 1,0,0,0,0,0,0,PROT_NAME(CALLBACKREQUEST) ,"cse31c",NULL,"<DWORD>LowID_client_ip" }, // Maybe there is a 0x20 too // CONFORMING TO "eDonkey-protocol-0.6.1" : Exception in Connection::doTask 25 for 16.39 -#define QUERY_MORE_RESULT 0x21 { 1,0,0,0,0,0,0,PROT_NAME(QUERY_MORE_RESULT) ,"cse321",NULL,"" }, -#define SERVERLIST 0x32 // Server -> Client { 1,0,0,0,0,0,0,PROT_NAME(SERVERLIST) ,"cse332",NULL,"<BYTE>server_count<IPPORT>server[server_count]" }, -#define SEARCHRESULT 0x33 { 1,0,0,0,0,0,0,PROT_NAME(SEARCHRESULT) ,"cse333",NULL,"<DWORD>num_results{<HASH>hash<IPPORT>ipport<DWORD>tag_count<TAG>tag[tag_count]}user[num_results]<DWORD>unknown1<DWORD>unknown2" }, -#define SERVERSTATUS 0x34 { 1,0,0,0,0,0,0,PROT_NAME(SERVERSTATUS) ,"cse334",NULL,"<DWORD>user_count<DWORD>file_count" }, -#define CALLBACKREQUESTED 0x35 { 1,0,0,0,0,0,0,PROT_NAME(CALLBACKREQUESTED) ,"cse335",NULL,"<IPPORT>HighID_client_ip" }, -#define CALLBACK_FAIL 0x36 { 1,0,0,0,0,0,0,PROT_NAME(CALLBACK_FAIL) ,"cse336",NULL,"<DWORD>client_id" }, -#define SERVERMESSAGE 0x38 { 1,0,0,0,0,0,0,PROT_NAME(SERVERMESSAGE) ,"cse338",NULL,"<WORD>message_len<CHAR>message[message_len]" }, -#define IDCHANGE 0x40 { 1,0,0,0,0,0,0,PROT_NAME(IDCHANGE) ,"cse340",NULL,"<DWORD>new_id" }, -#define SERVERIDENT 0x41 { 1,0,0,0,0,0,0,PROT_NAME(SERVERIDENT) ,"cse341",NULL,"<HASH>server_hash<IPPORT>server_address<DWORD>tag_count<TAG>tag[tag_count]" }, -#define FOUNDSOURCES 0x42 { 1,0,0,0,0,0,0,PROT_NAME(FOUNDSOURCES) ,"cse342",NULL,"<HASH>file_hash<BYTE>source_count<IPPORT>source_address[source_count]" }, -#define USERS_LIST 0x43 { 1,0,0,0,0,0,0,PROT_NAME(USERS_LIST) ,"cse343",NULL,"<DWORD>user_count{<HASH>hash<IPPORT>address<TAG>name}user[user_count]" }, -#define QUERY_CHATS 0x1D // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(QUERY_CHATS) ,"cse31d",NULL,"DEPRECATED" }, -#define CHAT_MESSAGE 0x1E // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_MESSAGE) ,"cse31e",NULL,"DEPRECATED" }, -#define JOIN_ROOM 0x1F // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(JOIN_ROOM) ,"cse31f",NULL,"DEPRECATED" }, -#define CHAT_ROOM_REQUEST 0x39 // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_ROOM_REQUEST) ,"cse339",NULL,"DEPRECATED" }, -#define CHAT_BROADCAST 0x3A // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_BROADCAST) ,"cse33a",NULL,"DEPRECATED" }, -#define CHAT_USER_JOIN 0x3B // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_USER_JOIN) ,"cse33b",NULL,"DEPRECATED" }, -#define CHAT_USER_LEAVE 0x3C // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_USER_LEAVE) ,"cse33c",NULL,"DEPRECATED" }, -#define CHAT_USER 0x3D // (deprecated not supported by server any longer) // { 1,0,0,0,0,0,0,PROT_NAME(CHAT_USER) ,"cse33d",NULL,"DEPRECATED" }, // client <-> server [UDP] -#define GLOBSERVSTATREQ 0x96 { 1,0,0,0,0,0,0,PROT_NAME(GLOBSERVSTATREQ) ,"cse396",NULL,"<WORD>unknown1<WORD>unknown2" }, // if unknown2==0xaa,0x5a, The respond contains max_users, else not. // { 1,0,0,0,0,0,0,PROT_NAME(GLOBSERVSTATRES) ,"cse396",NULL,"<DWORD>user_count<DWORD>file_count" }, -#define GLOBSERVSTATRES 0x97 { 1,0,0,0,0,0,0,PROT_NAME(GLOBSERVSTATRES) ,"cse397",NULL,"<WORD>unknown1<WORD>unknown2<DWORD>user_count<DWORD>file_count<DWORD>*max_users" }, -#define GLOBSEARCHREQUEST 0x98 // { 1,0,0,0,0,0,0,PROT_NAME(GLOBSEARCHREQUEST) ,"cse398",NULL,"<Search query>" }, -#define GLOBSEARCHRESULT 0x99 { 1,0,0,0,0,0,0,PROT_NAME(GLOBSEARCHRESULT) ,"cse399",NULL,"<HASH>hash<IPPORT>dummy<DWORD>tag_count<TAG>tag[tag_count]" }, -#define GLOBGETSOURCES 0x9A { 1,0,0,0,0,0,0,PROT_NAME(GLOBGETSOURCES) ,"cse39a",NULL,"<HASH>file_hash" }, -#define GLOBFOUNDSORUCES 0x9B { 1,0,0,0,0,0,0,PROT_NAME(GLOBFOUNDSORUCES) ,"cse39b",NULL,"<HASH>file_hash<BYTE>num_peers<IPPORT>peer[num_peers]" }, -#define GLOBCALLBACKREQ 0x9C { 1,0,0,0,0,0,0,PROT_NAME(GLOBCALLBACKREQ) ,"cse39c",NULL,"<DWORD>LowID_client_id" }, -#define GLOBCALLBACKFAILED 0x9E // CONFORMING TO "eDonkey-protocol-0.6.1" { 1,0,0,0,0,0,0,PROT_NAME(GLOBCALLBACKFAILED) ,"cse39e",NULL,"<DWORD>LowID_client_id" }, // Maybe there is a 0xA0 too // CONFORMING TO "eDonkey-protocol-0.6.1" : Exception in Connection::doTask 25 for 16.39 -#define UDP_SERVERLIST 0xA1 // CONFORMING TO "eDonkey-protocol-0.6.1" // { 1,0,0,0,0,0,0,PROT_NAME(UDP_SERVERLIST) ,"cse3a1",NULL,"<Address list>" }, -#define UNKNOWN1 0xA2 { 1,0,0,0,0,0,0,PROT_NAME(UNKNOWN1) ,"cse3a2",NULL,"" }, -#define UDP_SERVERINFO 0xA3 // CONFORMING TO "eDonkey-protocol-0.6.1" // { 1,0,0,0,0,0,0,PROT_NAME(UDP_SERVERLIST) ,"cse3a3",NULL,"<String>name<String>description" }, -#define UNKNOWN2 0xA4 { 1,0,0,0,0,0,0,PROT_NAME(UNKNOWN2) ,"cse3a4",NULL,"" }, // client <-> client -#define HELLO 0x01 { 1,0,0,0,0,0,1,PROT_NAME(HELLO) ,"cce301",NULL,"<BYTE>magic=0x10<HASH>user_hash<IPPORT>address<DWORD>tagcount<TAG>tag[tagcount]<IPPORT>server_address" }, -#define SENDINGPART 0x46 { 1,0,0,0,0,0,0,PROT_NAME(SENDINGPART) ,"cce346",NULL,"<HASH>file_hash<RANGE>range<BYTE>data[range]" }, -#define REQUESTPARTS 0x47 // "<HASH>file_hash<DWORD>start[3]<DWORD>end[3]" { 1,0,0,0,0,0,0,PROT_NAME(REQUESTPARTS) ,"cce347",NULL,"<HASH>file_hash<DWORD>part_1_start<DWORD>part_2_start<DWORD>part_3_start<DWORD>part_1_end<DWORD>part_2_end<DWORD>part_3_end" }, // <HASH>file_hash<DWORD>start[3]<DWORD>end[3] -#define FILEREQANSNOFIL 0x48 { 1,0,0,0,0,0,0,PROT_NAME(FILEREQANSNOFIL) ,"cce348",NULL,"<HASH>file_hash" }, -#define END_OF_DOWNLOAD 0x49 { 1,0,0,0,0,0,0,PROT_NAME(END_OF_DOWNLOAD) ,"cce349",NULL,"<HASH>file_hash" }, -#define ASKSHAREDFILES 0x4A { 1,0,0,0,0,0,0,PROT_NAME(ASKSHAREDFILES) ,"cce34a",NULL,"" }, -#define ASKSHAREDFILESANSWER 0x4B // ? "<DWORD>file_count{<HASH>file<TAG>name}file[file_count]" }, { 1,0,0,0,0,0,0,PROT_NAME(ASKSHAREDFILESANSWER) ,"cce34b",NULL,"<DWORD>file_count{<IPPORT>address<TAG>name}file[file_count]" }, -#define HELLOANSWER 0x4C { 1,0,0,0,0,0,0,PROT_NAME(HELLOANSWER) ,"cce34c",NULL,"<HASH>user_hash<IPPORT>user<DWORD>tagcount<TAG>tag[tagcount]<IPPORT>server" }, -#define CHANGE_CLIENT_ID 0x4D { 1,0,0,0,0,0,0,PROT_NAME(CHANGE_CLIENT_ID) ,"cce34d",NULL,"<DWORD>old_id<DWORD>new_id" }, -#define MESSAGE 0x4E { 1,0,0,0,0,0,0,PROT_NAME(MESSAGE) ,"cce34e",NULL,"<WORD>message_len<CHAR>message[message_len]" }, -#define SETREQFILEID 0x4F { 1,0,0,0,0,0,0,PROT_NAME(SETREQFILEID) ,"cce34f",NULL,"<HASH>file_hash" }, -#define FILESTATUS 0x50 { 1,0,0,0,0,0,0,PROT_NAME(FILESTATUS) ,"cce350",NULL,"<HASH>file_hash<BITMAP>chunks" }, -#define HASHSETREQUEST 0x51 { 1,0,0,0,0,0,0,PROT_NAME(HASHSETREQUEST) ,"cce351",NULL,"<HASH>file_hash" }, -#define HASHSETANSWER 0x52 { 1,0,0,0,0,0,0,PROT_NAME(HASHSETANSWER) ,"cce352",NULL,"<HASH>file_hash<WORD>chunk_count<HASH>chunk_hash[chunk_count]" }, // Maybe there is a 0x53 too // CONFORMING TO "eDonkey-protocol-0.6.1" -#define STARTUPLOADREQ 0x54 // The file_hash seems to be optional { 1,0,0,0,0,0,0,PROT_NAME(STARTUPLOADREQ) ,"cce354",NULL,"<HASH>*file_hash" }, -#define ACCEPTUPLOADREQ 0x55 { 1,0,0,0,0,0,0,PROT_NAME(ACCEPTUPLOADREQ) ,"cce355",NULL,"<EMPTY>" }, -#define CANCELTRANSFER 0x56 { 1,0,0,0,0,0,0,PROT_NAME(CANCELTRANSFER) ,"cce356",NULL,"<EMPTY>" }, -#define OUTOFPARTREQS 0x57 { 1,0,0,0,0,0,0,PROT_NAME(OUTOFPARTREQS) ,"cce357",NULL,"<EMPTY>" }, -#define FILEREQUEST 0x58 { 1,0,0,0,0,0,0,PROT_NAME(FILEREQUEST) ,"cce358",NULL,"<HASH>file_hash<BITMAP>*chunks" }, -#define FILEREQANSWER 0x59 { 1,0,0,0,0,0,0,PROT_NAME(FILEREQANSWER) ,"cce359",NULL,"<HASH>file_hash<WORD>filename_len<CHAR>filename[filename_len]" }, -#define CHANGE_SLOT 0x5B // The writers of "eDonkey-protocol-0.6.1" are not sure about this... { 1,0,0,0,0,0,0,PROT_NAME(CHANGE_SLOT) ,"cce35b",NULL,"<HASH>file_hash" }, -#define QUEUERANK 0x5C // (original comment: slot index of the request) { 1,0,0,0,0,0,0,PROT_NAME(QUEUERANK) ,"cce35c",NULL,"<DWORD>rank" }, // Client -> Client, CONFORMING TO "eDonkey-protocol-0.6.1" -#define GETSHAREDDIRS 0x5d // Request shared directories { 1,0,0,0,0,0,0,PROT_NAME(GETSHAREDDIRS) ,"cce35d",NULL,"" }, -#define GETSHAREDFILES4DIR 0x5e // Request shared files from directory // { 1,0,0,0,0,0,0,PROT_NAME(GETSHAREDFILES4DIR) ,"cce35e",NULL,"<Directory>" }, -#define ANSWERSHAREDDIRS 0x5f // { 1,0,0,0,0,0,0,PROT_NAME(ANSWERSHAREDDIRS) ,"cce35f",NULL,"<Directory list>" }, -#define ANSWERSHAREDFILES4DIR 0x60 // { 1,0,0,0,0,0,0,PROT_NAME(ANSWERSHAREDFILES4DIR),"cce360",NULL,"<Directory> <File info list>" }, -#define ANSWERSHAREDDENIED 0x61 { 1,0,0,0,0,0,0,PROT_NAME(ANSWERSHAREDDENIED) ,"cce361",NULL,"" }, // extened prot client <-> extened prot client -#define EMULEINFO 0x01 { 0,1,0,0,0,0,0,PROT_NAME(EMULEINFO) ,"ccc5e301",NULL,"<BYTE>client_version<BYTE>protocol_version<DWORD>tagcount<TAG>tag[tagcount]" }, // Values: ET_COMPRESSION ET_UDPPORT ET_UDPVER ET_SOURCEEXCHANGE ET_COMMENTS ET_EXTENDEDREQUEST ET_COMPATABLECLIENT ET_MOD_VERSION -#define EMULEINFOANSWER 0x02 { 0,1,0,0,0,0,0,PROT_NAME(EMULEINFOANSWER) ,"ccc502",NULL,"<BYTE>client_version<BYTE>protocol_version<DWORD>tagcount<TAG>tag[tagcount]" }, // // CONFORMING TO "eDonkey-protocol-0.6.1" and comfirming to the xMule sources, // a part may be split down to several packets. Each packet _may_ have same // value for range. -#define COMPRESSEDPART 0x40 { 0,1,0,0,0,0,0,PROT_NAME(COMPRESSEDPART) ,"ccc540",NULL,"<HASH>file_hash<RANGE>range<BYTE>cdata[range]" }, -#define QUEUERANKING 0x60 { 0,1,0,0,0,0,0,PROT_NAME(QUEUERANKING) ,"ccc560",NULL,"<WORD>rank<DWORD>unknown1=0<DWORD>unknown2=0<WORD>unknown3=0" }, // "eDonkey-protocol-0.6.1" doesn't know anything about 0x61: -#define FILEDESC 0x61 // max len = 128 [Why the hell is comment_len a 32 bit value, and than limited to 128 bytes?] { 0,1,0,0,0,0,0,PROT_NAME(FILEDESC) ,"ccc561",NULL,"<BYTE>quality_rating<DWORD>comment_len<CHAR>comment[comment_len]" }, -#define REQUESTSOURCES 0x81 { 0,1,0,0,0,0,0,PROT_NAME(REQUESTSOURCES) ,"ccc581",NULL,"<HASH>file_hash" }, -#define ANSWERSOURCES 0x82 { 0,1,0,0,0,0,0,PROT_NAME(ANSWERSOURCES) ,"ccc582",NULL,"<HASH>file_hash<WORD>num_sources{<IPPORT>server<IPPORT>client}source[num_sources]" }, // extened prot client <-> extened prot client UDP -#define REASKFILEPING 0x90 { 0,1,0,0,0,0,0,PROT_NAME(REASKFILEPING) ,"ccc590",NULL,"<HASH>file_hash" }, -#define REASKACK 0x91 { 0,1,0,0,0,0,0,PROT_NAME(REASKACK) ,"ccc591",NULL,"<WORD>rank" }, -#define FILENOTFOUND 0x92 { 0,1,0,0,0,0,0,PROT_NAME(FILENOTFOUND) ,"ccc592",NULL,"" }, -#define QUEUEFULL 0x93 { 0,1,0,0,0,0,0,PROT_NAME(QUEUEFULL) ,"ccc593",NULL,"" }, // unknown: (?extened prot client <-> extened prot client?) -#define VERIFYUPSREQ 0x71 // (never used) */ { 0,1,0,0,0,0,0,PROT_NAME(VERIFYUPSREQ) ,"ccc571",NULL,"" }, -#define VERIFYUPSANSWER 0x72 // (never used) */ { 0,1,0,0,0,0,0,PROT_NAME(VERIFYUPSANSWER) ,"ccc572",NULL,"" }, -#define UDPVERIFYUPREQ 0x73 // (never used) */ { 0,1,0,0,0,0,0,PROT_NAME(UDPVERIFYUPREQ) ,"ccc573",NULL,"" }, -#define UDPVERIFYUPA 0x74 // (never used) { 0,1,0,0,0,0,0,PROT_NAME(UDPVERIFYUPA) ,"ccc574",NULL,"" } }; Index: parse-ed2k.h =================================================================== RCS file: /cvsroot/sharedaemon/core/src/parse-ed2k.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- parse-ed2k.h 20 Nov 2003 16:27:25 -0000 1.9 +++ parse-ed2k.h 12 Jan 2004 21:32:42 -0000 1.10 @@ -158,4 +158,87 @@ # define typename type_name #endif // #ifdef __cplusplus, #else +#define LOGINREQUEST 0x01 // mlDonkey adds a DWORD with content: 'MLDK' // <DWORD>tagcount<TAG>tag[tagcount] // <BYTE>magic=0x10 +#define REJECT 0x05 +#define GETSERVERLIST 0x14 +#define OFFERFILES 0x15 +#define SEARCHREQUEST 0x16 +#define DISCONNECT 0x18 // (not verified) +#define GETSOURCES 0x19 +#define SEARCH_USER 0x1A +#define CALLBACKREQUEST 0x1C // <ID 4> +#define QUERY_MORE_RESULT 0x21 +#define SERVERLIST 0x32 // Server -> Client +#define SEARCHRESULT 0x33 +#define SERVERSTATUS 0x34 +#define CALLBACKREQUESTED 0x35 +#define CALLBACK_FAIL 0x36 +#define SERVERMESSAGE 0x38 +#define IDCHANGE 0x40 +#define SERVERIDENT 0x41 +#define FOUNDSOURCES 0x42 +#define USERS_LIST 0x43 +#define QUERY_CHATS 0x1D // (deprecated not supported by server any longer) +#define CHAT_MESSAGE 0x1E // (deprecated not supported by server any longer) +#define JOIN_ROOM 0x1F // (deprecated not supported by server any longer) +#define CHAT_ROOM_REQUEST 0x39 // (deprecated not supported by server any longer) +#define CHAT_BROADCAST 0x3A // (deprecated not supported by server any longer) +#define CHAT_USER_JOIN 0x3B // (deprecated not supported by server any longer) +#define CHAT_USER_LEAVE 0x3C // (deprecated not supported by server any longer) +#define CHAT_USER 0x3D // (deprecated not supported by server any longer) +#define GLOBSERVSTATREQ 0x96 +#define GLOBSERVSTATRES 0x97 +#define GLOBSEARCHREQUEST 0x98 +#define GLOBSEARCHRESULT 0x99 +#define GLOBGETSOURCES 0x9A +#define GLOBFOUNDSORUCES 0x9B +#define GLOBCALLBACKREQ 0x9C +#define GLOBCALLBACKFAILED 0x9E // CONFORMING TO "eDonkey-protocol-0.6.1" +#define UDP_SERVERLIST 0xA1 // CONFORMING TO "eDonkey-protocol-0.6.1" +#define UNKNOWN1 0xA2 +#define UDP_SERVERINFO 0xA3 // CONFORMING TO "eDonkey-protocol-0.6.1" +#define UNKNOWN2 0xA4 +#define HELLO 0x01 +#define SENDINGPART 0x46 +#define REQUESTPARTS 0x47 // "<HASH>file_hash<DWORD>start[3]<DWORD>end[3]" +#define FILEREQANSNOFIL 0x48 +#define END_OF_DOWNLOAD 0x49 +#define ASKSHAREDFILES 0x4A +#define ASKSHAREDFILESANSWER 0x4B // ? "<DWORD>file_count{<HASH>file<TAG>name}file[file_count]" }, +#define HELLOANSWER 0x4C +#define CHANGE_CLIENT_ID 0x4D +#define MESSAGE 0x4E +#define SETREQFILEID 0x4F +#define FILESTATUS 0x50 +#define HASHSETREQUEST 0x51 +#define HASHSETANSWER 0x52 +#define STARTUPLOADREQ 0x54 // The file_hash seems to be optional +#define ACCEPTUPLOADREQ 0x55 +#define CANCELTRANSFER 0x56 +#define OUTOFPARTREQS 0x57 +#define FILEREQUEST 0x58 +#define FILEREQANSWER 0x59 +#define CHANGE_SLOT 0x5B // The writers of "eDonkey-protocol-0.6.1" are not sure about this... +#define QUEUERANK 0x5C // (original comment: slot index of the request) +#define GETSHAREDDIRS 0x5d // Request shared directories +#define GETSHAREDFILES4DIR 0x5e // Request shared files from directory +#define ANSWERSHAREDDIRS 0x5f +#define ANSWERSHAREDFILES4DIR 0x60 +#define ANSWERSHAREDDENIED 0x61 +#define EMULEINFO 0x01 +#define EMULEINFOANSWER 0x02 +#define COMPRESSEDPART 0x40 +#define QUEUERANKING 0x60 +#define FILEDESC 0x61 // max len = 128 [Why the hell is comment_len a 32 bit value, and than limited to 128 bytes?] +#define REQUESTSOURCES 0x81 +#define ANSWERSOURCES 0x82 +#define REASKFILEPING 0x90 +#define REASKACK 0x91 +#define FILENOTFOUND 0x92 +#define QUEUEFULL 0x93 +#define VERIFYUPSREQ 0x71 // (never used) */ +#define VERIFYUPSANSWER 0x72 // (never used) */ +#define UDPVERIFYUPREQ 0x73 // (never used) */ +#define UDPVERIFYUPA 0x74 // (never used) + #endif // #ifndef PARSE_ED2K_H |
From: <ma...@us...> - 2004-01-10 23:04:26
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv7773 Modified Files: Changelog Log Message: dist rule patch for osx Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- Changelog 10 Jan 2004 19:00:02 -0000 1.124 +++ Changelog 10 Jan 2004 23:04:24 -0000 1.125 @@ -25,6 +25,10 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/01/11 Alo Sarv + * Applied patch [871350] by Julien Palmas - automatic creation of + wxInterface.app package for Mac OS. + 2003/01/10 Alo Sarv * Updated Hungarian and German translations by Reviczky. * Flat-look on win32 (via patching wxWindows). |
From: <ma...@us...> - 2004-01-10 23:02:00
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv7356 Modified Files: Makefile.am configure Added Files: Info.plist PkgInfo Log Message: Applied patch [ 871350 ] Added creation of the wxInterface.app package for Mac OS X --- NEW FILE: Info.plist --- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>torrent</string> </array> <key>CFBundleTypeIconFile</key> <string>torrent.icns</string> <key>CFBundleTypeMIMETypes</key> <array> <string>application/x-bittorrent</string> </array> <key>CFBundleTypeName</key> <string>BitTorrent Metainfo File</string> <key>CFBundleTypeOSTypes</key> <array> <string>BTMF</string> </array> <key>CFBundleTypeRole</key> <string>Viewer</string> </dict> </array> <key>CFBundleExecutable</key> <string>wxInterface</string> <key>CFBundleGetInfoString</key> <string>wxInterface 0.2.0</string> <key>CFBundleIconFile</key> <string>wxInterface.icns</string> <key>CFBundleIdentifier</key> <string>wxInterface</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>wxInterface</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>0.2.0</string> <key>CFBundleSignature</key> <string>BTBC</string> <key>CFBundleVersion</key> <string>0.2.0</string> <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> </plist> --- NEW FILE: PkgInfo --- APPLBTBC Index: Makefile.am =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 12 Dec 2003 08:37:48 -0000 1.1 +++ Makefile.am 10 Jan 2004 23:01:57 -0000 1.2 @@ -1,5 +1,7 @@ all: @cd src && make all +dist: + @cd src && make dist clean: @cd src && make clean distclean: Index: configure =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/configure,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- configure 2 Jan 2004 13:42:10 -0000 1.18 +++ configure 10 Jan 2004 23:01:57 -0000 1.19 @@ -55,6 +55,9 @@ OpenBSD) system=BSD; ;; + Darwin) + system=Darwin + ;; SunOS) system=SunOS; ;; @@ -471,8 +474,30 @@ " src/Makefile.am >> src/Makefile; } - - +add_dist_rule () { +echo "" >> src/Makefile; +echo -e "dist:" >> src/Makefile; + case $system in + Darwin) + echo ' @echo "creating src/wxInterface.app";' >> src/Makefile + echo ' @if test -d ./wxinterface.app; then \' >> src/Makefile + echo ' echo -e "$(ATTENTIONCOLOR)wxInterface.app already exists, \' >> src/Makefile + echo ' remove this directory and try again"; \' >> src/Makefile + echo ' else \' >> src/Makefile + echo ' mkdir ./wxInterface.app; \' >> src/Makefile + echo ' mkdir ./wxInterface.app/Contents; \' >> src/Makefile + echo ' mkdir ./wxInterface.app/Contents/MacOS; \' >> src/Makefile + echo ' mkdir ./wxInterface.app/Contents/Resources; \' >> src/Makefile + echo ' cp ../Info.plist ./wxInterface.app/Contents/Info.plist; \' >> src/Makefile + echo ' cp ../PkgInfo ./wxInterface.app/Contents/PkgInfo; \' >> src/Makefile + echo ' cp -R ./images ./wxInterface.app/Contents/Resources/images; \' >> src/Makefile + echo ' cp -R ./lang ./wxInterface.app/Contents/Resources/lang; \' >> src/Makefile + echo ' cp ./wxInterface ./wxInterface.app/Contents/MacOS/wxInterface; \' >> src/Makefile + echo ' fi' >> src/Makefile + echo ' @echo -e "Successfully created $(OUTPUTCOLOR)wxInterface.app";' >> src/Makefile + ;; + esac +} ## # Outputs error message about too old wxWindows library and exits with false. @@ -524,5 +549,6 @@ check_gtkconfig; check_ccache; gen_makefile; +add_dist_rule; echo -e "configure complete. Now type ${colour_output}make${colour_default} and pray."; |
From: <ma...@us...> - 2004-01-10 23:02:00
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv7356/src Modified Files: Makefile.am Log Message: Applied patch [ 871350 ] Added creation of the wxInterface.app package for Mac OS X Index: Makefile.am =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 2 Jan 2004 13:42:10 -0000 1.13 +++ Makefile.am 10 Jan 2004 23:01:57 -0000 1.14 @@ -100,6 +100,7 @@ echo -e "$(WARNINGCOLOR)$(BUILD)\\c"; \ echo -e "$(OUTPUTCOLOR)$@$(WELLCOLOR) binary!$(ACTIONCOLOR)"; \ echo -e "$(ACTIONCOLOR)Now cd to src/ dir and type $(OUTPUTCOLOR)./$@$(ACTIONCOLOR) to start the application."; \ + echo -e "$(ACTIONCOLOR)or if you are under Mac OS X, type $(OUTPUTCOLOR)make dist$(ACTIONCOLOR) to build $(OUTPUTCOLOR)$@.app"; \ else \ echo -e "failed:"; \ cat .err; \ |
From: <ma...@us...> - 2004-01-10 19:00:05
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv15105 Modified Files: INSTALL Changelog Added Files: mswflatbuttons.patch Log Message: Flat-look on win32: Another patch for wxWindows library. --- NEW FILE: mswflatbuttons.patch --- Index: src/msw/button.cpp =================================================================== RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/button.cpp,v retrieving revision 1.75 diff -b -u -2 -r1.75 button.cpp --- src/msw/button.cpp 2003/09/24 00:41:05 1.75 +++ src/msw/button.cpp 2004/01/10 16:44:14 @@ -184,4 +184,7 @@ if ( style & wxBU_BOTTOM ) msStyle |= BS_BOTTOM; + // flat 2d buttons + if ( style & wxNO_BORDER ) + msStyle |= BS_FLAT; #endif // __WIN32__ Index: INSTALL =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/INSTALL,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- INSTALL 29 Dec 2003 06:52:31 -0000 1.7 +++ INSTALL 10 Jan 2004 19:00:02 -0000 1.8 @@ -20,6 +20,7 @@ is considered hidden if its size is less than or equal to 10, but the 'hidden' columns will then have width 10 instead of zero. Apply the patch in src/generic/ directory in wxWindows sources, and recompile. + Apply in src/generic directory. -- wxWindows patching: src/common/sizer.cpp (flexgridsizer.patch) Due to missing wxFlexGridSizer::RemoveGrowableCol() method in @@ -27,6 +28,12 @@ file in wxWindows sources for sidebar hiding code to work. Do so using flexgridsizer.patch file (apply in the src/common directory of wxWindows sources), and add --has-patched-wxsizer flag to configure. + Apply in src/common directory. + + -- wxWindows patching: src/msw/button.cpp (mswflatbuttons.patch) + This patch implements flat-buttons on wxMSW by using BS_FLAT CButton + style. Apply at top level of wxWindows source hierarchy with -p0 + flag. * Note about GTK2 As GTK2 support in wxWindows library is, according to them, Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- Changelog 5 Jan 2004 11:59:52 -0000 1.123 +++ Changelog 10 Jan 2004 19:00:02 -0000 1.124 @@ -25,6 +25,10 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/01/10 Alo Sarv + * Updated Hungarian and German translations by Reviczky. + * Flat-look on win32 (via patching wxWindows). + 2003/01/05 Alo Sarv * Added hungarian translation by Reviczky. |
From: <ma...@us...> - 2004-01-10 18:59:03
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv14966 Modified Files: ServerListCtrl.h StatisticsTreeCtrl.h wxInterface.cpp Log Message: wxWindows 2.5 compatibility. Index: ServerListCtrl.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/ServerListCtrl.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ServerListCtrl.h 17 Dec 2003 05:16:01 -0000 1.9 +++ ServerListCtrl.h 10 Jan 2004 18:59:00 -0000 1.10 @@ -26,6 +26,7 @@ #ifndef WX_PRECOMP #include "wx/wx.h" + #include "wx/imaglist.h" #endif #include "wxInterface_wdr.h" Index: StatisticsTreeCtrl.h =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/StatisticsTreeCtrl.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- StatisticsTreeCtrl.h 27 Nov 2003 08:23:12 -0000 1.8 +++ StatisticsTreeCtrl.h 10 Jan 2004 18:59:00 -0000 1.9 @@ -26,6 +26,7 @@ #ifndef WX_PRECOMP #include "wx/wx.h" + #include "wx/imaglist.h" #endif #include "wxInterface_wdr.h" Index: wxInterface.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- wxInterface.cpp 5 Jan 2004 11:59:52 -0000 1.16 +++ wxInterface.cpp 10 Jan 2004 18:59:00 -0000 1.17 @@ -48,6 +48,7 @@ bool wxInterface::OnInit() { int show_splash = true; mainframe_active = false; + wxLog::SetActiveTarget(NULL); new wxLogChain(new wxLogStderr); SetVendorName(wxT("ShareDaemon")); |
From: <ma...@us...> - 2004-01-10 18:53:45
|
Update of /cvsroot/sharedaemon/ui-wx/src/lang In directory sc8-pr-cvs1:/tmp/cvs-serv10004 Modified Files: German.po Hungarian.po Log Message: Updated German and Hungarian translations by Reviczky. Index: German.po =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/lang/German.po,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- German.po 31 Dec 2003 16:27:19 -0000 1.7 +++ German.po 10 Jan 2004 18:53:40 -0000 1.8 @@ -1,17 +1,17 @@ -# German translation for xMule2 wx-ui package. -# Copyright (C) 2003 Seneca -# This file is distributed under the same license as the xMule2 package. -# Seneca <sen...@ya...>, 2003. +# German translation for ShareDaemon wxInterface package. +# Copyright (C) 2004 Reviczky Ãdám János +# This file is distributed under the same license as the ShareDaemon wxInterface package. +# Reviczky Ãdám János <rev...@fr...>, 2004. # msgid "" msgstr "" [...1127 lines suppressed...] +"Iconset Name also MeinNeuerIconSet ist, wird dies im\n" +"images/meinneuericonset Verzeichnis gesucht." #: ../wxInterface_wdr.cpp:743 msgid "ShareDaemon wxInterface ready!" -msgstr "" +msgstr "ShareDaemon wxInterface bereit!" #: ../wxInterface_wdr.cpp:779 msgid "0 kb/s" -msgstr "" +msgstr "0 kb/s" +# or "Verbindung verloren" is good too #: ../wxInterface_wdr.cpp:788 -#, fuzzy msgid "Disconnected" -msgstr "Verbunden" +msgstr "Getrennt" Index: Hungarian.po =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/lang/Hungarian.po,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Hungarian.po 5 Jan 2004 11:59:52 -0000 1.1 +++ Hungarian.po 10 Jan 2004 18:53:40 -0000 1.2 @@ -7,13 +7,12 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2003-12-31 16:27+0200\n" -"PO-Revision-Date: 2004-01-04 07:18+0100\n" -"Last-Translator: Reviczky Ãdám János <rev...@fr...>\n" +"PO-Revision-Date: 2004-01-10 03:38+0200\n" +"Last-Translator: \n" "Language-Team: LANGUAGE <LL...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Report-Msgid-Bugs-To: \n" #: ../DownloadListCtrl.cpp:52 #: ../SharedFilesListCtrl.cpp:52 @@ -90,11 +89,11 @@ "\t\tThe actual language files will not be deleted." msgstr "" "Biztosan le akarja törölni a \t\t%s nyelvet a nyelvek listájáról?\n" -"\t\tAz aktuális nyelvfájlok nem törlodnek le." +"\t\tAz aktuális nyelvfájlok nem törlÅdnek le." #: ../GUISettingsDlg.cpp:340 msgid "Confirm remove language" -msgstr "Letörlendo nyelv megerosÃtése" +msgstr "LetörlendÅ nyelv megerÅsÃtése" # maybe to translate iconset or not ? #: ../GUISettingsDlg.cpp:353 @@ -110,12 +109,12 @@ "\t\tThe actual iconset files will not be deleted." msgstr "" "Biztosan le akarja törölni a \t\t%s iconset-et az iconsets listájáról?\n" -"\t\tAz aktuális iconset fájlok nem törlodnek le." +"\t\tAz aktuális iconset fájlok nem törlÅdnek le." # here to :) ... iconset to translate ? #: ../GUISettingsDlg.cpp:375 msgid "Confirm remove iconset" -msgstr "Letörlendo iconset megerosÃtése" +msgstr "LetörlendÅ iconset megerÅsÃtése" #: ../GUISettingsDlg.cpp:388 msgid "Language" @@ -140,10 +139,9 @@ msgid "Remove currently selected language" msgstr "Jelenleg kiválasztott nyelv törlése" -# maybe to translate #: ../GUISettingsDlg.cpp:426 msgid "Icon set" -msgstr "Icon set" +msgstr "Icon alkalmazása" # translate interface? #: ../GUISettingsDlg.cpp:435 @@ -158,7 +156,7 @@ # maybe "Font" too #: ../GUISettingsDlg.cpp:467 msgid "Font" -msgstr "BetutÃpus" +msgstr "BetűtÃpus" #: ../GUISettingsDlg.cpp:471 msgid "Default" @@ -166,45 +164,45 @@ #: ../GUISettingsDlg.cpp:478 msgid "Change the font" -msgstr "BetutÃpus megváltoztatása" +msgstr "BetűtÃpus megváltoztatása" # or "test" #: ../GUISettingsDlg.cpp:483 msgid "Font Test :)" -msgstr "BetutÃpus próba :)" +msgstr "BetűtÃpus próba :)" #: ../GUISettingsDlg.cpp:490 msgid "Startup page" -msgstr "Kezdooldal" +msgstr "KezdÅoldal" #: ../GUISettingsDlg.cpp:504 msgid "Set which page will be displayed on program startup" -msgstr "Kezdooldal beállÃtása program indulásakor" +msgstr "KezdÅoldal beállÃtása program indulásakor" #: ../GUISettingsDlg.cpp:510 msgid "Remember last" msgstr "Utolsó megjegyzése" -# session = "menet", but not for that +# session = "menet" or "ülés", but not for that #: ../GUISettingsDlg.cpp:515 msgid "Automatically remember which page was \t\topen between sessions" msgstr "Automatikusan megjegyzi a \t\tmegnyitott oldalt a session-ök között" #: ../GUISettingsDlg.cpp:527 msgid "Show splashscreen" -msgstr "Nyitóképernyo megjelenÃtése" +msgstr "NyitóképernyÅ megjelenÃtése" #: ../GUISettingsDlg.cpp:533 msgid "Toggle wether splashscreen should be shown on program \t\tstartup or not. Speeds up application starting if turned off. \t\tDefault: On" -msgstr "Nyitóképernyo megjelenÃtése program \t\tindulásakor vagy nem. Kikapcsolása felgyorsÃtja a program indulását. \t\tAlapértelmezett: Bekapcsolva" +msgstr "NyitóképernyÅ megjelenÃtése program \t\tindulásakor vagy nem. Kikapcsolása felgyorsÃtja a program indulását. \t\tAlapértelmezett: Bekapcsolva" #: ../GUISettingsDlg.cpp:541 msgid "Prompt on exit" -msgstr "Kilépésnél megerosÃtésre vár" +msgstr "Kilépésnél megerÅsÃtésre vár" #: ../GUISettingsDlg.cpp:546 msgid "Toggle wether confirmation is requested \t\twhen closing program." -msgstr "MegerosÃtést kér a program \t\tbezárásakor" +msgstr "MegerÅsÃtést kér a program \t\tbezárásakor" #: ../GUISettingsDlg.cpp:558 #: ../MainDlg.cpp:647 @@ -230,11 +228,11 @@ #: ../MainDlg.cpp:926 #: ../MainDlg.cpp:940 msgid "Vertical" -msgstr "Függoleges" +msgstr "FüggÅleges" #: ../GUISettingsDlg.cpp:580 msgid "Horizontal tooltip is shown on top of window (default),\t\tvertical is shown on the left side of window." -msgstr "A vÃzszintes tooltip az ablak tetején (alapértelmezett),\t\tfüggolegesnél az ablak bal oldalán mutatja" +msgstr "A vÃzszintes tooltip az ablak tetején (alapértelmezett),\t\tfüggÅlegesnél az ablak bal oldalán mutatja" # please not use Menutár! #: ../GUISettingsDlg.cpp:591 @@ -251,7 +249,7 @@ #: ../wxInterface_wdr.cpp:668 #: ../wxInterface_wdr.cpp:710 msgid "OK" -msgstr "MegerosÃt" +msgstr "MegerÅsÃt" #: ../GUISettingsDlg.cpp:614 msgid "Save settings and close dialog" @@ -292,7 +290,7 @@ "Please make sure you specified correct name, and\t\t\t the\n" "translated and compiled .mo file exists in\t\t\t lang subdir." msgstr "" -"Gyozodjön meg arról, hogy helyesen adta meg a nevet és\t\t\t a\n" +"GyÅzÅdjön meg arról, hogy helyesen adta meg a nevet és\t\t\t a\n" " lefordÃtott és létrehozott .mo fájl létezik a\t\t\t lang alkönyvtárban." # maybe "A kért fájlt nem találtam" @@ -382,7 +380,7 @@ #: ../MainDlg.cpp:418 #: ../MainDlg.cpp:419 msgid "Connect to random server" -msgstr "Véletlenszeru kapcsolódás egy kiszolgálóhoz" +msgstr "Véletlenszerű kapcsolódás egy kiszolgálóhoz" #: ../MainDlg.cpp:454 #: ../MainDlg.cpp:474 @@ -399,7 +397,7 @@ #: ../MainDlg.cpp:509 msgid "Question" -msgstr "Kérdések" +msgstr "Kérdés" #: ../MainDlg.cpp:529 #: ../MainDlg.cpp:615 @@ -468,7 +466,7 @@ #: ../MainDlg.cpp:673 #: ../MainDlg.cpp:951 msgid "Fullscreen" -msgstr "Teljes képernyo" +msgstr "Teljes képernyÅ" #: ../MainDlg.cpp:678 #: ../MainDlg.cpp:952 @@ -491,7 +489,7 @@ #: ../MainDlg.cpp:946 msgid "Detach current page" -msgstr "Feloldja a jelenlegi oldalt" +msgstr "Leválasztja a jelenlegi oldalt" #: ../MainDlg.cpp:953 #: ../SysTray.cpp:667 @@ -832,7 +830,7 @@ #: ../SysTray.cpp:398 msgid "Uptime: " -msgstr "Feltöltési ido: " +msgstr "Feltöltési idÅ: " #: ../SysTray.cpp:398 msgid "None" @@ -956,7 +954,7 @@ #: ../UploadListCtrl.cpp:53 msgid "Upload Time" -msgstr "Feltöltési ido" +msgstr "Feltöltési idÅ" #: ../wxInterface_wdr.cpp:72 msgid "Method" @@ -1001,7 +999,7 @@ #: ../wxInterface_wdr.cpp:107 msgid "Filter" -msgstr "Szuro" +msgstr "SzűrÅ" #: ../wxInterface_wdr.cpp:114 msgid "min Size" @@ -1013,7 +1011,7 @@ #: ../wxInterface_wdr.cpp:144 msgid "Availability" -msgstr "Elérhetoség" +msgstr "ElérhetÅség" #: ../wxInterface_wdr.cpp:156 msgid "Extension" @@ -1039,7 +1037,7 @@ msgid "Download Selected" msgstr "Letöltés kiválasztva" -# Session = "Menet" here too, but not use it for that ... +# Session = "Menet" or "Ãlés"" here too, but not use it for that ... #: ../wxInterface_wdr.cpp:272 msgid "Current Session" msgstr "Jelenlegi Session" @@ -1097,10 +1095,11 @@ msgid "Download-Speed" msgstr "Letöltési-Sebesség" +# "Menetatlag" or "Ãlésátlag", but i think not for that ... #: ../wxInterface_wdr.cpp:542 #: ../wxInterface_wdr.cpp:595 msgid "session average" -msgstr "Session terhelés" +msgstr "Sessionátlag" #: ../wxInterface_wdr.cpp:558 #: ../wxInterface_wdr.cpp:611 @@ -1110,7 +1109,7 @@ #: ../wxInterface_wdr.cpp:569 #: ../wxInterface_wdr.cpp:622 msgid "average (5 mins)" -msgstr "terhelés (5 perc)" +msgstr "átlag (5 perc)" #: ../wxInterface_wdr.cpp:586 msgid "Upload-Speed" @@ -1126,7 +1125,7 @@ "Kérem adja meg az új nyelv nevét. \n" "Ilyen nevu fájlnak .mo kiterjesztéssel léteznie kell \n" " a lang/ alkönyvtárban. Ilyen fájl létrehozásához kÃsérje\n" -"figyelemmel a csomag könyvtárában lévo TRANSLATION fájlt." +"figyelemmel a csomag könyvtárában lévÅ TRANSLATION fájlt." # I translated the youriconsetname and MyNewIconSet, but you can replace it with the original ... #: ../wxInterface_wdr.cpp:696 @@ -1140,7 +1139,7 @@ msgstr "" "Kérem adja meg a nevét az új icon set-jének az alábbi boxban.\n" "Az iconset fájlok PNG formátumba kell lenniük és\n" -"fájlnevük megfeleloen meg kell egyezniük a többi setekben lévoekkel. A fájlokat az\n" +"fájlnevük megfelelÅen meg kell egyezniük a többi setekben lévÅekkel. A fájlokat az\n" "images/sajaticonsetnev (kisbetukkel!) -ben fogja keresni. Ãgy ha a saját\n" "iconset-ed neve SajatUjIconSetem, akkor azt az images/sajatujiconsetem könyvtárban fogja keresni." |
From: <bo...@us...> - 2004-01-06 05:59:58
|
Update of /cvsroot/sharedaemon/core/src In directory sc8-pr-cvs1:/tmp/cvs-serv13920 Modified Files: ParseClass.cpp ParseClass.h osdep.h test.cpp Log Message: Fixed the five-week bug Index: ParseClass.cpp =================================================================== RCS file: /cvsroot/sharedaemon/core/src/ParseClass.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ParseClass.cpp 13 Dec 2003 05:06:15 -0000 1.16 +++ ParseClass.cpp 6 Jan 2004 05:59:55 -0000 1.17 @@ -201,11 +201,8 @@ size=ps->offset+ps->size+numPCs*sizeof(ParseClass*); } else { - if (IsStruct()) { - assert(!IsStruct()); - } else { - size=::type[type->type_id].len; - } + assert(!IsStruct()); + size=::type[type->type_id].len; } return; @@ -256,12 +253,12 @@ || ps->type_id==STRUCT) { assert(ps->referer_id<numPCs); if (ps->type_id==STRUCT) { - (*(PC+ps->referer_id))=new + PC[ps->referer_id]=new ParseClass(this,reinterpret_cast< struct parsestruct * >(ps->default_value)); } else { - (*(PC+ps->referer_id))=new + PC[ps->referer_id]=new ParseClass(this,ps); } assert (!constructed[ps->referer_id]); @@ -558,7 +555,8 @@ } } else { ParseClass * * PC; - u32 val; + u32 val=0; + // Initialisation of val only to get GCC to shut up unsigned j; bool scalar; @@ -670,7 +668,7 @@ "same data as just being Read in.\n" ,__FILE__,__FUNCTION__,__LINE__ ); - Write("wrondata.met"); + Write("wrongdata.met"); exit(1); } } @@ -882,8 +880,7 @@ if (!tag->id_len) { fprintf( stderr, - "%s:%s:%i: Fatal: ParseClass::" - "IncrementalWrite: Type id len = 0.\n" + "%s:%s:%i: Fatal: Type id len = 0.\n" ,__FILE__,__FUNCTION__,__LINE__ ); exit(1); @@ -922,8 +919,7 @@ default: fprintf( stderr, - "%s:%s:%i: Fatal: ParseClass::" - "IncrementalRead: Unknown tag " + "%s:%s:%i: Fatal: Unknown tag " "type %i\n" ,__FILE__,__FUNCTION__,__LINE__ ,tag->type @@ -1016,7 +1012,7 @@ p.SetData(protocol,opcode,buffsize,buffer); - delete buffer; + delete[] buffer; return true; } @@ -1033,7 +1029,7 @@ return false; } - delete buffer; + delete[] buffer; return true; } @@ -1079,7 +1075,7 @@ unlink(othername); } - delete othername; + delete[] othername; return rc; } Index: ParseClass.h =================================================================== RCS file: /cvsroot/sharedaemon/core/src/ParseClass.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ParseClass.h 12 Dec 2003 16:48:54 -0000 1.12 +++ ParseClass.h 6 Jan 2004 05:59:55 -0000 1.13 @@ -76,6 +76,12 @@ inline int GetTypeID(const tag &t ) { return TAG; } inline int GetTypeID(const bitmap &t ) { return BITMAP; } +inline u32 GetIpOf(const ipport &t) { return hton32(t.ip); } +template <class T> u32 GetIpOf(const T &t) { fprintf(stderr,"We should never reach this point (GetIpOf)!\n"); exit(2); } + +inline u16 GetPortOf(const ipport &t) { return t.port; } +template <class T> u16 GetPortOf(const T &t) { fprintf(stderr,"We should never reach this point (GetPortOf)!\n"); exit(2); } + #define ISSTRUCT(x) true #define ISARRAY(x) true @@ -337,7 +343,7 @@ } fprintf(stderr, - "%s:%s:%i: FATAL: Type doesn " + "%s:%s:%i: FATAL: Type does " "not match. %s was expected " "but %s was given\n" ,__FILE__,__FUNCTION__,__LINE__ @@ -397,7 +403,12 @@ resize=false; if (tid == ps->type_id) { - *(T*)ptr=var; + if (tid == IPPORT) { + ((u32*)ptr)[0]=GetIpOf(var); + ((u16*)ptr)[2]=GetPortOf(var); + } else { + *(T*)ptr=var; + } if (tid == DWORD || tid == WORD || tid == BYTE) { resize = true; Index: osdep.h =================================================================== RCS file: /cvsroot/sharedaemon/core/src/osdep.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- osdep.h 16 Dec 2003 22:47:21 -0000 1.15 +++ osdep.h 6 Jan 2004 05:59:55 -0000 1.16 @@ -39,6 +39,12 @@ * b = big endian */ +#define hton32 htonl +#define hton16 htons + +#define ntoh32 ntohl +#define ntoh16 ntohs + #define bswap16(x) ( \ ((((x) )&(u16)0xff)<< 8) \ |((((x)>> 8)&(u16)0xff) ) \ @@ -53,15 +59,15 @@ #define ltoh32(x) ntohl(lton32(x)) #define lton32(x) bswap32(x) -#define ltoh16(x) ntohs(lton16(x)) +#define ltoh16(x) ntoh16(lton16(x)) #define lton16(x) bswap16(x) -#define btoh32(x) ntohl(x) +#define btoh32(x) ntoh32(x) #define htol16(x) bswap16(htons(x)) #define htol32(x) bswap32(htonl(x)) #define ntol16(x) bswap16(x) #define ntol32(x) bswap32(x) -#define htob32(x) htonl(x) +#define htob32(x) hton32(x) #ifdef MACOSX #include <sys/types.h> Index: test.cpp =================================================================== RCS file: /cvsroot/sharedaemon/core/src/test.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- test.cpp 9 Dec 2003 00:16:29 -0000 1.30 +++ test.cpp 6 Jan 2004 05:59:55 -0000 1.31 @@ -558,6 +558,7 @@ u32 nt; ServerMet->Read(server_met); + ServerMet->Get(server_met_magic,"magic"); ServerMet->Get(num_servers,"num_servers"); @@ -812,6 +813,14 @@ ipport(MY_IP,DEFAULT_SERVERPORT) ); + printf( + "Dumping packet [Using old BuildHello3Packet] (id=%lu; ip:port=%lu:%u. Protocol=0x%02x, Opcode=0x%02x, Size=0x%08x\n", + (long unsigned)id,(long unsigned)Connection::GetSocket(id).GetIP(), + (unsigned)Connection::GetSocket(id).GetPort(),p.GetProtocol(), + p.GetOpcode(),(int)p.GetSize() + ); + printf("%s:%i: \n",__FILE__,__LINE__); HexDump(p.GetPtr(),p.GetSize(),true); + ParseClass * PC=GetParseClass("HELLO"); // e301 const ipport & client=ipport(MY_IP,DEFAULT_CLIENTPORT); const ipport & server=ipport(MY_IP,DEFAULT_SERVERPORT); @@ -839,17 +848,17 @@ PC->Set(tag, "tag[2]"); PC->Set(server, "server_address"); -/* - PC->Write(p); -*/ + + PC->Write(p,0xe3,0x01); printf( - "Sending packet (id=%lu; ip:port=%lu:%u. Protocol=0x%02x, Opcode=0x%02x, Size=0x%08x\n", + "Sending packet [Using new Write method] (id=%lu; ip:port=%lu:%u. Protocol=0x%02x, Opcode=0x%02x, Size=0x%08x\n", (long unsigned)id,(long unsigned)Connection::GetSocket(id).GetIP(), (unsigned)Connection::GetSocket(id).GetPort(),p.GetProtocol(), p.GetOpcode(),(int)p.GetSize() ); printf("%s:%i: \n",__FILE__,__LINE__); HexDump(p.GetPtr(),p.GetSize(),true); + rc=Connection::GetSocket(id).EnqueuePacket(p); if (!rc) { if (get_errno()!=SOCKET_EWOULDBLOCK) { @@ -960,7 +969,7 @@ PC->Read(p); switch ((u16)p.GetProtocol()*0x100+p.GetOpcode()) { - case 0xe338: // Servermessage + case 0xe338U: // Servermessage u16 msglen,i; char * msg; @@ -977,13 +986,13 @@ delete msg; break; - case 0xe334: // Serverstatus + case 0xe334U: // Serverstatus printf("Serverstatus:\n"); // Update ServerMet // Schedule ServerMet to write back to disk break; - case 0xe340: // IDchange + case 0xe340U: // IDchange printf("IDchange:\n"); if (num_connected) { Log("Duh, we are already connected.\n"); @@ -1005,7 +1014,7 @@ connection_id[num_connected]=id; PC->Get(OurClientID[num_connected],"new_id"); char * tmp,*t; - if (OurClientID[num_connected]<0x1000000) { + if (OurClientID[num_connected]<0x1000000L) { t=strdup("LowID"); } else { t=mprintf( @@ -1032,7 +1041,7 @@ ++num_connected; break; - case 0xe341: // ServerIdent + case 0xe341U: // ServerIdent printf("ServerIdent:\n"); printf("%s:%i: \n",__FILE__,__LINE__); HexDump(p.GetPtr(),p.GetSize(),false); // Update ServerMet @@ -1114,7 +1123,7 @@ for (again=true;!(again=!again);) switch (Connection::GetStatus(id)) { case CLIENT_TCP_LISTENING: - if (nc==0xffffffff) { + if (nc==0xffffffffLU) { nc=Connection::Alloc(); } if (!(rc=ClientTcpAccept(id,nc))) { @@ -1123,7 +1132,7 @@ } rc=true; } else { - nc=0xffffffff; + nc=0xffffffffLU; } break; case CLIENT_UDP_LISTENING: |
From: <bo...@us...> - 2004-01-06 01:23:19
|
Update of /cvsroot/sharedaemon/core/src In directory sc8-pr-cvs1:/tmp/cvs-serv4076 Modified Files: debug.h Log Message: Corrected the 'AlexCeli'-Bug Index: debug.h =================================================================== RCS file: /cvsroot/sharedaemon/core/src/debug.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- debug.h 20 Nov 2003 16:27:25 -0000 1.6 +++ debug.h 6 Jan 2004 01:23:16 -0000 1.7 @@ -32,6 +32,7 @@ # define PRINTER bprintf extern bool inited_stddbg; # else +# include <stdio.h> # define PRINTER printf # endif // #ifdef HAVE_BTLINUXLIBRARY |
From: <ma...@us...> - 2004-01-05 11:59:55
|
Update of /cvsroot/sharedaemon/ui-wx/src/lang In directory sc8-pr-cvs1:/tmp/cvs-serv1777/src/lang Added Files: Hungarian.po Log Message: Hungarian translation by Reviczky. --- NEW FILE: Hungarian.po --- (This appears to be a binary file; contents omitted.) |
From: <ma...@us...> - 2004-01-05 11:59:55
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv1777/src Modified Files: wxInterface.cpp Log Message: Hungarian translation by Reviczky. Index: wxInterface.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/wxInterface.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- wxInterface.cpp 31 Dec 2003 16:40:12 -0000 1.15 +++ wxInterface.cpp 5 Jan 2004 11:59:52 -0000 1.16 @@ -170,6 +170,7 @@ supportedlangs.Add(wxT("Estonian")); supportedlangs.Add(wxT("French")); supportedlangs.Add(wxT("Spanish")); + supportedlangs.Add(wxT("Hungarian")); m_config->SetPath(wxT("/General/Lang")); |
From: <ma...@us...> - 2004-01-05 11:59:55
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv1777 Modified Files: Changelog Log Message: Hungarian translation by Reviczky. Index: Changelog =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/Changelog,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- Changelog 31 Dec 2003 17:21:27 -0000 1.122 +++ Changelog 5 Jan 2004 11:59:52 -0000 1.123 @@ -25,6 +25,9 @@ # This also helps in backtracking changes, or reviewing development history. # ############################################################################### +2003/01/05 Alo Sarv + * Added hungarian translation by Reviczky. + Version 0.2.0 ------------- 2003/12/31 Alo Sarv |
From: <bo...@us...> - 2004-01-04 23:09:25
|
Update of /cvsroot/sharedaemon/core/src In directory sc8-pr-cvs1:/tmp/cvs-serv20044 Modified Files: Makefile.cvs Log Message: Initial support for BeOS Index: Makefile.cvs =================================================================== RCS file: /cvsroot/sharedaemon/core/src/Makefile.cvs,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.cvs 16 Dec 2003 22:47:21 -0000 1.15 +++ Makefile.cvs 4 Jan 2004 18:25:53 -0000 1.16 @@ -26,17 +26,20 @@ # the hash signs ('#'). If you don't have a Linux system. Comment them # out by prefixing them by a hash sign. -# LINUX = true +LINUX = true # If you have a Win32 system, behave like for Linux, but with the following # line -WIN32 = true +# WIN32 = true # If you have a Mac OS X system, ... # MACOSX = true +# If you have a BeOS system ... + +# BEOS = true # Do you want colored debug output? If yes, uncomment the following line. @@ -49,7 +52,7 @@ ifdef WIN32 CXX = g++ -b i686-mingw32msvc CC = gcc -b i686-mingw32msvc -LDFLAGS += -lwsock32 -lmingwex +LDFLAGS += -lwsock32 -lmingwex -lm BINARY = test.exe CPPFLAGS += -DWIN32 endif @@ -58,21 +61,29 @@ BINARY = test CPPFLAGS += -DLINUX CFLAGS += -std=c99 +LDFLAGS += -lm endif ifdef MACOSX BINARY = test CPPFLAGS += -DMACOSX CFLAGS += -std=c99 +LDFLAGS += -lm endif +ifdef BEOS +BINARY = test +CPPFLAGS += -DBEOS +LDFLAGS += -lsocket -lbind +endif all: $(BINARY) + echo $(OSTYPE) CFLAGS += -g -Wall -O3 CXXFLAGS += -g -Wall -O3 CPPFLAGS += -DXMULE2 -LDFLAGS += -g -lm +LDFLAGS += -g # -lstdc++ OBJS = ClientList.oo Client.oo test.oo ClientShadow.oo Socket.oo osdep.oo \ |
From: <ma...@us...> - 2004-01-02 13:42:16
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1:/tmp/cvs-serv5445/src Modified Files: Makefile.am Log Message: Fixed resources compilation (was incorrect --include directive) Index: Makefile.am =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 31 Dec 2003 14:29:02 -0000 1.12 +++ Makefile.am 2 Jan 2004 13:42:10 -0000 1.13 @@ -72,7 +72,7 @@ @RES@: @echo -e "$(ACTIONCOLOR)Compiling $(INPUTCOLOR)wxInterface_private.rc$(ACTIONCOLOR) to \\c"; @echo -e "$(OUTPUTCOLOR)$@$(ACTIONCOLOR): $(ATTENTIONCOLOR)\\c"; - @if windres -i wxInterface_private.rc -I rc -o $@ -O coff --include-dir=/local/include 2>.err; then \ + @if windres -i wxInterface_private.rc -I rc -o $@ -O coff --include-dir=@RES_INCLUDE@ 2>.err; then \ if test -s .err; then \ echo -e "$(WARNINGCOLOR)ok, but warnings:"; \ cat .err; \ |
From: <ma...@us...> - 2004-01-02 13:42:16
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv5445 Modified Files: configure Log Message: Fixed resources compilation (was incorrect --include directive) Index: configure =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/configure,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- configure 30 Dec 2003 05:43:52 -0000 1.17 +++ configure 2 Jan 2004 13:42:10 -0000 1.18 @@ -467,6 +467,7 @@ s#@PRINT_LINK_FLAGS@#$print_link_flags#; \ s#@TRAY_OBJECTS@#$tray_objs#; \ s#@RES@#$res#; \ + s#@RES_INCLUDE@#`$wxconfig --prefix`/include#; \ " src/Makefile.am >> src/Makefile; } |
From: <mik...@us...> - 2004-01-01 14:51:04
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv9842 Modified Files: ChangeLog Log Message: 01/01/2004 Mikael Barbeaux * Fixed a bug while parsing query string of http request. * Basic implementation for method processors ( GET, HEAD and POST ). Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ChangeLog 1 Jan 2004 14:21:11 -0000 1.30 +++ ChangeLog 1 Jan 2004 14:51:00 -0000 1.31 @@ -24,6 +24,8 @@ ----------------------------------------------------------- 01/01/2004 Mikael Barbeaux + * Fixed a bug while parsing query string of http request. + * Basic implementation for method processors ( GET, HEAD and POST ). * Externalized http method processing algorithms. * HAPPY NEW YEAR !!!! :P * Started to implement http processing code. |