Package: amule
Version: 2.1.3-1+custom
Severity: normal
Tags: patch
Search type (in the "Searches" tab) is wrongly initialised. I think it checks
if we're connected to a network, and if we are, picks Kad instead of Local
Search. However, this check never succeeds. My assumption is that it won't
suceed because at the time this widget is initialised the network hasn't had
time to set up yet.
if (thePrefs::GetNetworkED2K()){
CastChild( ID_SEARCHTYPE, wxChoice )->SetSelection(0);
} else {
CastChild( ID_SEARCHTYPE, wxChoice )->SetSelection(2);
}
I propose to get rid of the check completely, and just SetSelection(2) directly.
Patch attached.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8)
Versions of packages amule depends on:
hi amule-common 2.1.3-1+custom common files for the rest of aMule
ii libc6 2.3.6-15 GNU C Library: Shared libraries
ii libcrypto++5.2c2a 5.2.1c2a-3 General purpose cryptographic shar
ii libgcc1 1:4.1.1-5 GCC support library
ii libstdc++6 4.1.1-5 The GNU Standard C++ Library v3
ii libwxbase2.6-0 2.6.3.2.1.1 wxBase library (runtime) - non-GUI
ii libwxgtk2.6-0 2.6.3.2.1.1 wxWidgets Cross-platform C++ GUI t
ii zlib1g 1:1.2.3-13 compression library - runtime
Versions of packages amule recommends:
pn amule-utils <none> (no description available)
-- no debconf information
diff -ur amule-2.1.3.old/src/SearchDlg.cpp amule-2.1.3/src/SearchDlg.cpp
--- amule-2.1.3.old/src/SearchDlg.cpp 2006-03-23 13:05:11.000000000 +0100
+++ amule-2.1.3/src/SearchDlg.cpp 2006-08-23 16:55:14.000000000 +0200
@@ -112,12 +112,7 @@
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);
- }
-
+ CastChild( ID_SEARCHTYPE, wxChoice )->SetSelection(2);
CastChild( IDC_TypeSearch, wxChoice )->SetSelection(0);
CastChild( IDC_SEARCHMINSIZE, wxChoice )->SetSelection(2);
CastChild( IDC_SEARCHMAXSIZE, wxChoice )->SetSelection(2);