fix(amule): persist Messages columns + minimized window geometry - #138
Merged
got3nks merged 2 commits intoJun 13, 2026
Merged
Conversation
CFriendListCtrl never called SetTableName(), so CMuleListCtrl::SaveSettings
short-circuited on the empty-name guard and nothing was ever written
under /eMule/TableWidths*. InsertColumn was also called without a column
name, so even with SetTableName there was nothing to save.
Tag the lone column with name "N" (matching the other lists' single-char
naming convention) and call SetTableName("Friend") + LoadSettings() in
the ctor.
Reported in amule-project#137.
CamuleDlg::SaveGUIPrefs gated all of MAIN_X_POS / MAIN_Y_POS / MAIN_X_SIZE / MAIN_Y_SIZE / Maximized behind "if (!IsIconized())", so a user who closed the app from a taskbar/dock minimized state never had their last layout written. Next launch fell back to wx defaults. Snapshot the frame's geometry on every Move/Size event while NOT iconized into a new m_lastShown* cache, and have SaveGUIPrefs fall back to that cache when the live frame is iconized. Iconized GetPosition() returns sentinel values (e.g. -32000,-32000 on Windows) which isn't safe to round-trip, so it's still excluded from the live path. Reported in amule-project#137.
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.
Refs #137 (Messages-tab columns + minimized-exit geometry parts).
The Downloads, Shared files, Networks, Searches and Messages tabs all use
CMuleListCtrlfor their lists, but only Messages had itsCFriendListCtrlctor calling neitherSetTableName()nor naming the column it inserts. Result:~CMuleListCtrlshort-circuited on the empty-name guard and nothing was ever written under/eMule/TableWidthsFriend. Column widths in Messages reset on every restart.Separately,
CamuleDlg::SaveGUIPrefswraps the wholeMAIN_X_POS / MAIN_Y_POS / MAIN_X_SIZE / MAIN_Y_SIZE / Maximizedblock inif (!IsIconized()), so a user who closes the app from a taskbar/dock minimized state has their last layout dropped — next launch falls back to wx defaults.Commits
fix(messages): persist column widths on the Friend list— Name the single column"N"(matching the other lists' single-char convention), callSetTableName("Friend")andLoadSettings()in the ctor.fix(amule): preserve window geometry when exiting from a minimized state— Snapshot the frame's pos / size / Maximized into newm_lastShown*members on everyMove/Sizeevent while NOT iconized, and haveSaveGUIPrefsfall back to that cache when the live frame is iconized. IconizedGetPosition()returns sentinel values on Windows (-32000, -32000) which aren't safe to round-trip, so it's still excluded from the live path.Out of scope
#137 also lists Downloads / Shared column widths as not persisting; code-side the wiring looks complete (
SetTableName("Download")/SetTableName("Shared"), named columns, dtorSaveSettings(), splitter saves). Tested on a Windows VM against this branch and column widths + hidden columns + "Show clients for all files" all persist correctly. Leaving #137 open until the reporter can verify on a packaged build whether their experience changes.Test plan
Verified on Windows VM with the two-commit branch installed as portable:
macOS + monolithic build verified clean (
BUILD_MONOLITHIC=YES BUILD_REMOTEGUI=YES BUILD_DAEMON=YES).