fix(amulegui): hide preferences not propagated to amuled via EC - #122
Merged
Conversation
Fifteen widgets in PrefsUnifiedDlg are NewCfgItem-bound and therefore persisted to amulegui's local remote.conf on save, but never packed into CEC_Prefs_Packet, so the values are never sent to amuled via EC_OP_SET_PREFERENCES. The control shows amulegui's stale local default rather than amuled's actual value, and editing it has no observable effect on the daemon. Same gap on both loopback and remote connections -- amuled never reads remote.conf, so the widget is dead in both cases. Hide unconditionally in CLIENT_GUI builds: - IDC_ADDRESS (amuled's TCP bind address) - IDC_UPNP_ENABLED (amuled's UPnP) - IDC_UPNPTCPPORT + IDC_UPNPTCPPORTTEXT label - IDC_UPNP_WEBSERVER_ENABLED (amuled's webserver UPnP) - IDC_WEBUPNPTCPPORT + IDC_WEBUPNPTCPPORTTEXT label - IDC_UPNP_EC_ENABLED (amuled's EC UPnP) - IDC_OSDIR (amuled's online-signature file dir) - IDC_OSUPDATE (amuled's online-signature interval) - IDC_EXT_CONN_ACCEPT (amuled's EC config -- chicken-and-egg - IDC_EXT_CONN_IP if amulegui could change it via EC) - IDC_EXT_CONN_TCP_PORT - IDC_EXT_CONN_PASSWD - IDC_PARANOID (amuled IP filter behaviour) - IDC_IPFILTERSYS (amuled system IP filter) - IDC_STARTNEXTFILE_ALPHA (amuled's download orchestration) IDC_FOLLOW_SYMLINKS_SHARED is promoted to EC-sync instead of hidden: add EC_TAG_DIRECTORIES_FOLLOW_SYMLINKS (0x1A06) alongside the existing EC_TAG_DIRECTORIES_SHARE_HIDDEN / EC_TAG_DIRECTORIES_AUTO_RESCAN, with matching pack and ApplyBoolean entries. The setting is consulted at directory-walk time in SharedFileList / SharedDirWatcher / SharedDirs ApplyTask, so the next rescan picks it up without needing an explicit immediate-apply hook on the daemon side. Mirrored across the abstract and Java bindings. The debug-name switch was missing 0x1A05 (auto- rescan) entirely; added that drive-by so EC trace logs render both new and adjacent tags by name. Proxy settings (ID_PROXY_*) are intentionally not hidden: amulegui's ApplyProxyToDefaultSession() consumes thePrefs::GetProxyData() to configure wxWebSession for its own GeoIP database fetch, so the widgets are meaningful in CLIENT_GUI builds even though amuled has its own separate copy in amule.conf. Refs amule-project#54.
got3nks
force-pushed
the
fix/amulegui-hide-dead-prefs
branch
from
June 12, 2026 10:20
3ee2382 to
3dc971a
Compare
The previous commit hid the amuled-only input widgets but left their
companion wxStaticText labels and the wrapping wxStaticBox visible,
because the wxFormBuilder-generated layout in muuli_wdr.cpp creates
those orphans with `-1` as the wxWindowID. FindWindow() can't reach
them, so the section ended up looking like:
External Connection Parameters
IP of the listening interface:
TCP port:
Password
with the input fields gone but the labels and group title still
showing.
Give the orphans IDs (10355..10361, taken from the free range between
IDC_FOLLOW_SYMLINKS_SHARED=10343 and IDC_GEOIP_SOURCE=10400, with
10344..10354 already used by the ID_BUTTON* toolbar slot) and plumb
them into the existing constructors:
- IDC_ADDRESSTEXT "Bind local address to IP..."
- IDC_EXT_CONN_PARAMS_BOX "External Connection Parameters"
- IDC_EXT_CONN_IPTEXT "IP of the listening interface:"
- IDC_EXT_CONN_TCPPORTTEXT "TCP port:" (EC block; not the connection-tab TCP port)
- IDC_EXT_CONN_PASSWDTEXT "Password"
- IDC_OSDIRTEXT "Save online signature file in:"
- IDC_OSUPDATETEXT "Update Frequency (Secs):"
Extend amuledOnlyPrefs[] with these seven plus the existing
IDC_SELOSDIR (online-signature dir Browse button), which is already
named but was missing from the hide list.
Refs amule-project#54.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses item #3 of #54 — the broader "which preferences should be editable in
amulegui" question. Eighteen widgets inPrefsUnifiedDlgareNewCfgItem-registered and therefore persisted to amulegui's localremote.confon Save, but never packed intoCEC_Prefs_Packet, so they're not sent to amuled viaEC_OP_SET_PREFERENCES. The control shows amulegui's stale local default rather than amuled's actual value, and editing has no observable effect on the daemon. Same gap on both loopback and remote connections — amuled never readsremote.conf— so the widget is dead in both cases. Hide unconditionally inCLIENT_GUIbuilds.Audit — the three categories
Crossed every
NewCfgItemregistration in Preferences.cpp:1050-1324 against every preference packed inCEC_Prefs_Packet::SetValues. The classification:A — GUI-only (lives in
remote.conf, doesn't touch amuled)Safe to keep editable on both localhost and remote. Affects only amulegui's own behaviour.
IDC_LANGUAGE,IDC_BROWSERTABS,IDC_BROWSERSELF,IDC_VIDEOPLAYER,IDC_MACHIDEONCLOSE,IDC_ENABLETRAYICON,IDC_MINTRAY,IDC_NOTIF,IDC_EXIT,IDC_STARTMIN,IDC_3DDEPTH,IDC_TOOLTIPDELAY,IDC_SHOWOVERHEAD,IDC_EXTCATINFO,IDC_FED2KLH,IDC_PROGBAR,IDC_PERCENT,IDC_SKIN,IDC_VERTTOOLBAR,IDC_SHOWVERSIONONTITLE,IDC_SHOW_COUNTRY_FLAGS,IDC_GEOIP_MAXMIND_LIC,IDC_GEOIP_CUSTOM_URL,IDC_GEOIP_AUTOUPDATE,IDC_SLIDER,IDC_SLIDER2,IDC_SLIDER3,IDC_SLIDER4,IDC_CLIENTVERSIONS,IDC_MSGLOG,IDC_AUTOSORT,IDC_FILTERCOMMENTS,IDC_COMMENTWORD,IDC_PREVENT_SLEEP(already disabled in CLIENT_GUI at line 367-369),ID_VERBOSEDEBUG,ID_VERBOSEDEBUGLOGFILE, and the proxy blockID_PROXY_*— proxy is GUI-side because amulegui's own HTTP client (inApplyProxyToDefaultSession) consumes those settings for the GeoIP DB fetch.B — EC-sync'd (round-trips via
GET_PREFERENCES/SET_PREFERENCES)Value shown comes from amuled. Editable on both connection types; the audit task here is just confirming each one actually round-trips, which is left for a separate pass.
Connection:
IDC_PORT,IDC_UDPPORT,IDC_UDPENABLE,IDC_MAXSOURCEPERFILE,IDC_MAXCON,IDC_AUTOCONNECT,IDC_RECONN,IDC_NETWORKED2K,IDC_NETWORKKAD,IDC_MAXUP,IDC_MAXDOWN,IDC_DOWNLOAD_CAP,IDC_UPLOAD_CAP,IDC_SLOTALLOC.Servers:
IDC_REMOVEDEAD,IDC_SERVERRETRIES,IDC_AUTOSERVER,IDC_UPDATESERVERCONNECT,IDC_UPDATESERVERCLIENT,IDC_SCORE,IDC_SAFESERVERCONNECT,IDC_AUTOCONNECTSTATICONLY,IDC_SMARTIDCHECK,IDC_MANUALSERVERHIGHPRIO. PlusEd2kServersUrl/KadNodesUrl(text fields in ServerWnd, notNewCfgItem).Files:
IDC_ICH,IDC_AICHTRUST,IDC_CHECKDISKSPACE,IDC_MINDISKSPACE,IDC_ADDNEWFILESPAUSED,IDC_PREVIEWPRIO,IDC_STARTNEXTFILE,IDC_STARTNEXTFILE_SAME,IDC_SRCSEEDS,IDC_DAP,IDC_UAP,IDC_ALLOCFULLFILE.Directories:
IDC_INCFILES,IDC_TEMPFILES,IDC_SHAREHIDDENFILES,IDC_AUTO_RESCAN_SHARED,IDC_FOLLOW_SYMLINKS_SHARED(promoted to EC in this PR — new tagEC_TAG_DIRECTORIES_FOLLOW_SYMLINKS= 0x1A06). (Shared-folders tree carries throughEC_TAG_DIRECTORIES_SHARED.)Security:
IDC_SEESHARES,IDC_IPFCLIENTS,IDC_IPFSERVERS,IDC_AUTOIPFILTER,IDC_IPFILTERURL,ID_IPFILTERLEVEL,IDC_FILTERLAN,IDC_SECIDENT,IDC_SUPPORT_PO,IDC_ENABLE_PO_OUTGOING,IDC_ENFORCE_PO_INCOMING.Webserver:
IDC_ENABLE_WEB,IDC_WEB_PASSWD,IDC_WEB_PASSWD_LOW,IDC_WEB_PORT,IDC_WEB_GZIP,IDC_ENABLE_WEB_LOW,IDC_WEB_REFRESH_TIMEOUT,IDC_WEBTEMPLATE.Message filter:
IDC_MSGFILTER,IDC_MSGFILTER_ALL,IDC_MSGFILTER_NONFRIENDS,IDC_MSGFILTER_NONSECURE,IDC_MSGFILTER_WORD,IDC_MSGWORD.Online signature enable:
IDC_ONLINESIG.Core tweaks:
IDC_MAXCON5SEC,IDC_FILEBUFFERSIZE,IDC_QUEUESIZE,IDC_SERVERKEEPALIVE.General:
IDC_NICK,IDC_NEWVERSION.C —
NewCfgItem-bound but not inCEC_Prefs_Packet— the dead widgets this PR hidesIDC_ADDRESS/eMule/AddressIDC_UPNP_ENABLED/eMule/UPnPEnabledIDC_UPNPTCPPORT+IDC_UPNPTCPPORTTEXT/eMule/UPnPTCPPortIDC_UPNP_WEBSERVER_ENABLEDIDC_WEBUPNPTCPPORT+IDC_WEBUPNPTCPPORTTEXT/WebServer/WebUPnPTCPPortIDC_UPNP_EC_ENABLED/ExternalConnect/UPnPECEnabledIDC_OSDIR/eMule/OSDirectoryIDC_OSUPDATE/eMule/OnlineSignatureUpdateIDC_EXT_CONN_ACCEPT/ExternalConnect/AcceptExternalConnectionsIDC_EXT_CONN_IP/ExternalConnect/ECAddressIDC_EXT_CONN_TCP_PORT/ExternalConnect/ECPortIDC_EXT_CONN_PASSWD/ExternalConnect/ECPasswordIDC_PARANOID/eMule/ParanoidFilteringIDC_IPFILTERSYS/eMule/IPFilterSystemIDC_STARTNEXTFILE_ALPHA/eMule/StartNextFileAlphaThe empty
EC_PREFS_STATISTICSbranch at ECSpecialMuleTags.cpp:286-288 is a related TODO that's been there since at least 2009 — out of scope for this PR.What this PR changes
A single
#ifdef CLIENT_GUIblock inPrefsUnifiedDlg::TransferToWindowiterates the Category-C ID list and callsHide()on each. NoIsConnectedToLocalHost()check needed because the gap is identical on loopback and remote (+38/-0 LOC).Test plan
cmake --build build-macos --target amulegui).Addressfield hidden, UPnP block hidden (Enabled + TCP port + label).Follow symlinks in shared folderscheckbox is still present (this PR promotes it from hidden-only to EC-sync'd via the newEC_TAG_DIRECTORIES_FOLLOW_SYMLINKStag) and toggling it round-trips against amuled.OS directoryandOS update intervalhidden.Paranoid filterandIPFilterSystemcheckboxes hidden.Hide()d, not removed from the sizer).Cross-platform manual verification is what's waiting on @ngosang via the fork's packaging run.