17 load-only hidden prefs not written back to preferences.ini
Historical reference only:
stale-v0.72a-experimental-cleanandanalysis\stale-v0.72a-experimental-cleanare retired reference sources, not active branch targets or current baselines. Use them only as provenance or idea-extraction sources; landed status is determined againstmain. See Historical References.
Summary¶
17 preference keys are read from preferences.ini at startup and used at runtime,
but no write-back path was found in srchybrid/Preferences.cpp. On every clean save
cycle these values are silently dropped. Users who hand-edit these keys see them
disappear after the next run.
Affected Keys & Runtime Locations¶
| Key | Runtime consumer | Effect if lost |
|---|---|---|
RestoreLastMainWndDlg |
EmuleDlg.cpp |
Main window page not restored on restart |
RestoreLastLogPane |
ServerWnd.cpp |
Log pane selection lost |
FileBufferTimeLimit |
PartFile.cpp |
Forced flush timing reset to default |
DateTimeFormat4Lists |
DownloadListCtrl.cpp |
List date format reset |
PreviewCopiedArchives |
ArchivePreviewDlg.cpp, PartFile.cpp |
Preview behaviour reset |
InspectAllFileTypes |
FileInfoDialog.cpp |
Metadata inspection scope reset |
PreviewOnIconDblClk |
DownloadListCtrl.cpp |
Double-click behaviour reset |
ShowActiveDownloadsBold |
DownloadListCtrl.cpp |
Bold rendering lost |
UseSystemFontForMainControls |
DownloadListCtrl.cpp, MuleListCtrl.cpp, ListCtrlX.cpp, SharedFilesWnd.cpp, StatisticsDlg.cpp |
Font override lost |
ReBarToolbar |
EmuleDlg.cpp, MuleToolBarCtrl.cpp |
Toolbar layout reset |
ShowUpDownIconInTaskbar |
EmuleDlg.cpp |
Taskbar icon lost |
ShowVerticalHourMarkers |
OScopeCtrl.cpp |
Stats graph markers gone |
ForceSpeedsToKB |
OtherFunctions.cpp |
Speed unit display resets |
ExtraPreviewWithMenu |
DownloadListCtrl.cpp |
Preview menu placement reset |
KeepUnavailableFixedSharedDirs |
Preferences.cpp (startup) |
Fixed dirs wiped if offline |
PartiallyPurgeOldKnownFiles |
AICHSyncThread.cpp, KnownFile.cpp |
AICH purge behaviour changes |
AdjustNTFSDaylightFileTime |
retired in current main | Historical stale key, no active preference member |
MessageFromValidSourcesOnly |
BaseClient.cpp via thePrefs.MsgOnlySecure() |
Chat filter disabled |
RearrangeKadSearchKeywords |
SearchResultsWnd.cpp |
Search keyword order resets |
Separate Finding¶
AICHTrustEveryHash was loaded into m_bTrustEveryHash but no non-Preferences
runtime consumer was found. Current main retired it and deletes old persisted
values during preference save.
Fix Options¶
For each key, one of:
1. Add write-back — add a WriteProfileInt/WriteProfileString call alongside
existing saves in Preferences.cpp::Save().
2. Formally retire — remove the read from Preferences.cpp, delete the member,
and add a migration note in HISTORY-CHANGELOG.md.
3. Document as import-only — leave the read, add a code comment explaining why
no write-back exists (e.g. intentional hidden override knob).
Files¶
srchybrid/Preferences.cpp— load path (search for the key names above)srchybrid/Preferences.h— member declarations
Implementation (Done)¶
Landed in eMule-main commit 4a02669 Persist and expose hidden runtime preferences (2026-04-09):
Write-backs added in Preferences.cpp::Save():
ini.WriteBool(_T("RestoreLastMainWndDlg"), m_bRestoreLastMainWndDlg);
ini.WriteBool(_T("RestoreLastLogPane"), m_bRestoreLastLogPane);
ini.WriteInt(_T("FileBufferTimeLimit"), static_cast<int>(m_uFileBufferTimeLimit / SEC2MS(1)));
ini.WriteString(_T("DateTimeFormat4Lists"), m_strDateTimeFormat4Lists);
ini.WriteBool(_T("PreviewCopiedArchives"), m_bPreviewCopiedArchives);
ini.WriteInt(_T("InspectAllFileTypes"), m_iInspectAllFileTypes);
ini.WriteBool(_T("PreviewOnIconDblClk"), m_bPreviewOnIconDblClk);
ini.WriteBool(_T("ShowActiveDownloadsBold"), m_bShowActiveDownloadsBold);
ini.WriteBool(_T("UseSystemFontForMainControls"), m_bUseSystemFontForMainControls);
ini.WriteBool(_T("ReBarToolbar"), m_bReBarToolbar);
ini.WriteBool(_T("ShowUpDownIconInTaskbar"), m_bShowUpDownIconInTaskbar);
ini.WriteBool(_T("ShowVerticalHourMarkers"), m_bShowVerticalHourMarkers);
ini.WriteBool(_T("ForceSpeedsToKB"), m_bForceSpeedsToKB);
ini.WriteBool(_T("ExtraPreviewWithMenu"), m_bExtraPreviewWithMenu);
ini.WriteBool(_T("KeepUnavailableFixedSharedDirs"), m_bKeepUnavailableFixedSharedDirs);
ini.WriteBool(_T("PartiallyPurgeOldKnownFiles"), m_bPartiallyPurgeOldKnownFiles);
ini.WriteBool(_T("MessageFromValidSourcesOnly"), msgsecure);
ini.WriteBool(_T("RearrangeKadSearchKeywords"), m_bRearrangeKadSearchKeywords);
ini.DeleteKey(_T("AICHTrustEveryHash")); // stale key removed
UI exposure in PPgTweaks.cpp/h: All hidden prefs now surfaced in the advanced tree view under grouped category headers (m_htiHiddenDisplay, m_htiHiddenFile, m_htiHiddenSecurity, m_htiHiddenStartup). Added m_htiInspectAllFileTypes and m_htiDateTimeFormat4Lists controls. This aligns with the experimental branch approach but targets eMule-main directly.
2026-04-25 follow-up: current main also exposes the remaining operator-safe
hidden settings in Tweaks, exposes WebServer MaxFileUploadSizeMB and
AllowedIPs on the WebServer page, and fixes ShowVerticalHourMarkers to load
from eMule while preserving fallback from the prior accidental Statistics
key.
Files changed: srchybrid/PPgTweaks.cpp, srchybrid/PPgTweaks.h, srchybrid/Preferences.cpp, srchybrid/Preferences.h, srchybrid/Resource.h, srchybrid/SHAHashSet.cpp, srchybrid/emule.rc (7 files, +291/-12 lines)
Experimental Reference Implementation¶
Status in stale-v0.72a-experimental-clean: Superseded — the main branch fix was ported from the experimental approach and is now live. The experimental branch had all 18+ write-backs and also removed several stale keys as part of feature retirement (IRC/SMTP/MiniMule/wizard/update-checker path).