aMule Bug Tracker - aMule
View Issue Details
0000738aMuleFeature Requestpublic2005-12-19 10:382006-03-21 09:57
0000738: Set search type to KAD if only KAD is selected as usable networks in settings
I run 2 kad-only CVS amule's (on diff. pc's) - and everytime the program restarts the search type is set to ed2k while it already knows I'm only going to connent to kad

Now I'd like to see it set to kad on startup if only the kad network is turned on in the settings.

Thank you :)
No tags attached.
patch aMule-CVS-20060105-kadsearch.patch (935) 2006-01-05 15:23
Issue History
2005-12-19 10:38quinoxNew Issue
2005-12-19 12:54RazZzielNote Added: 0001699
2005-12-19 12:54RazZzielNote Edited: 0001699
2005-12-20 09:33KryStatusnew => assigned
2005-12-20 09:33KryAssigned To => Kry
2005-12-23 16:33KryNote Added: 0001711
2006-01-05 15:23quinoxFile Added: aMule-CVS-20060105-kadsearch.patch
2006-01-05 15:29quinoxNote Added: 0001721
2006-01-05 20:53arichyNote Added: 0001722
2006-01-05 20:54arichyNote Deleted: 0001722
2006-03-21 09:57KryStatusassigned => resolved
2006-03-21 09:57KryFixed in Version => CVS
2006-03-21 09:57KryResolutionopen => fixed
2006-03-21 09:57KryNote Added: 0001910

2005-12-19 12:54   
It would be nice too if that selection box remembered last search type used in last session.
If I never use "Local search", it isn't cool to change search type every time I restart aMule.

edited on: 12-19-05 12:54
2005-12-23 16:33   
That'll never happen raziel, for the simple reason that global search/kad search stresses servers and peers too much. Default should be local, always.
2006-01-05 15:29   
I've made a patch myself - I used the latest CVS version (aMule-CVS-20060105.tar.bz2) from [^] . It selects 'local search' if the ED2K network is enabled, and it selects Kad otherwise

(well really it selects the third search method, I'm not sure if I had to use SetStringSelection with "Kad" as parameter, but since the old file used SetSelection to set the search to 'local search' I've used that too)

Hoping you can use it,


2006-03-21 09:57   
Fixed with added sanity.

    // Sanity sanity
    wxASSERT(CastChild( ID_SEARCHTYPE, wxChoice )->GetString(0) == _("Local Search"));
    wxASSERT(CastChild( ID_SEARCHTYPE, wxChoice )->GetString(2) == _("Kad"));

    if (thePrefs::GetNetworkED2K()){
        CastChild( ID_SEARCHTYPE, wxChoice )->SetSelection(0);
    } else {
        CastChild( ID_SEARCHTYPE, wxChoice )->SetSelection(2);