Introducing a new way to review your PRs.

Read the announcement

transmission-remote-gui / transgui

🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.

View on GitHub

19 documents · Updated Sep 25, 2026

docs / preferences-and-history

Preferences and history

Preferences and history give the desktop client a durable local memory. They control how the client looks and behaves, restore the user's working choices, and keep useful folder choices for each Transmission connection. This page complements Desktop interface and preferences, Torrent lists and columns, and Daemon connection configuration.

Configuration model

The client keeps two kinds of user configuration. Global options describe the local desktop experience, while connection-scoped options describe one named daemon and the local choices that belong with it. Remote daemon settings are different: the client reads and changes them through the daemon session rather than treating them as local preferences.

Global client options

Global client options shape the main window and the way the client starts work. The Application options dialog groups refresh timing, transfer display, tray behavior, add-torrent behavior, language, interface scale, and update checks into one local settings flow.

Option groupClient effect
Refresh and displayControls refresh timing and whether transfer rates use an average to reduce short changes.
Tray behaviorControls minimize-to-tray, close-to-tray, tray visibility, and notifications where the platform supports them.
Add-torrent behaviorControls the add-torrent prompt, removal of a source .torrent file after success, clipboard link intake, and the default start choice.
Language and directionSelects the translation and text direction used by the interface.
Interface scaleSets the client font and control scale.
Version checksEnables periodic checks and sets the check interval.

The main window reads these values when it starts and copies the choices into active UI state. When the user accepts the dialog, the client writes the local values and updates dependent runtime state such as clipboard intake and the tray icon. Language, text direction, and scale changes can require a restart before the full interface uses them.

References: options.pas• L110-179 options.pas• L248-354 options.lfm• L27-334 main.pas• L2281-2351

Connection-scoped options

A connection profile is the named context for one daemon. Its saved values include the endpoint and access rules described in Daemon connection configuration, plus local path mappings, speed menu values, folder-history limits, and add-torrent defaults that are useful only for that daemon.

The active profile selects the configuration namespace for folder and input history. This prevents a path used with one daemon from appearing as a choice for another daemon. Renaming a profile must move both its connection settings and its add-torrent settings so the local context stays together.

References: connoptions.pas• L369-416 connoptions.pas• L447-519 connoptions.pas• L535-592 connoptions.pas• L594-674 main.pas• L5611-5627

Folder and input history

Folder history helps the user reuse remote paths during add and move actions. The client presents the history in editable drop-down inputs, keeps a separate last-used value for each action, and stores the history under the active connection.

Folder history

The add-torrent dialog uses LastDownloadDir and the move-torrent dialog uses LastMoveDir. Both histories share the same per-connection list, so a path can be reused across the two workflows while the last value for each workflow remains distinct.

Each history entry carries more than a path. It can include a use count, the last-use date, and a file-name template used by the add-torrent flow. The client uses this usage data to remove less useful entries when the configured limit is reached. The limit is kept between 10 and 99 entries, with 50 as the normal default.

The history is saved after a successful add or move operation. A failed remote action does not make the attempted folder the durable last-used choice. Paths are normalized before they are compared or stored, so equivalent path forms do not create needless duplicate entries.

References: main.pas• L7908-7981 main.pas• L7983-8056 main.pas• L8058-8096 folderhistory.pas• L7-54 addtorrent.pas• L936-974 connoptions.pas• L587-588

Add-torrent input state

The add-torrent dialog treats the selected destination folder as a small input profile. When the user selects a known folder, the client restores that folder's saved file-name template. When the user enters a new folder, the template starts empty and becomes associated with the folder after a successful add.

The saved template can guide automatic file selection for later torrents. This makes the folder history more than navigation aid: it also restores a recurring input choice without changing the torrent data stored by the daemon.

The move-torrent dialog uses the same folder input history but does not use the add-torrent file template. Its choice is applied as a remote location request, and the history changes only after the request succeeds. See Torrent lists and columns for the list actions that open these workflows.

References: addtorrent.pas• L976-1027 addtorrent.pas• L1051-1087 addtorrent.pas• L1251-1304 main.pas• L2155-2224 main.pas• L2729-2797 main.pas• L2866-2982 movetorrent.pas• L48-96

Configuration lifecycle

Configuration moves through a simple local lifecycle. The client finds its settings location, reads saved values into the main window and dialogs, applies values to local behavior or the active remote session, and writes accepted changes back for the next run.

Configuration storage

The client stores local preferences in a UTF-8 INI file. It uses the -home path when supplied; otherwise it uses portable mode when an application-named INI file is beside the executable, or the platform application-config directory when no portable file exists.

The file holds global sections such as Interface and MainForm, the active profile list in Hosts, profile sections such as Connection.<name>, and per-profile add-torrent data such as AddTorrent.<name>. The client keeps updates in memory during normal work and writes the file at explicit save points and during application shutdown. Saved passwords are encoded before storage, but this is not a secure password vault.

References: main.pas• L1321-1335 utils.pas• L65-76 utils.pas• L341-384 connoptions.pas• L509-519 connoptions.pas• L606-673 main.pas• L1965-1968

Startup application

Startup turns saved values into active behavior in stages. The client loads translation and interface scale early, restores the main window and panes, loads list layouts, selects the last connection, and then starts the connection and refresh work. The same settings file can therefore affect both local presentation and which daemon-backed view appears first.

The active connection also controls which profile settings are loaded into connection menus and which folder-history section is read by add and move dialogs. Unsupported remote features remain governed by the connected daemon's RPC version rather than by local preference data.

The startup relationship is shown below.

flowchart LR
    A[Settings location] --> B[Local INI file]
    B --> C[Global client state]
    B --> D[Active connection profile]
    D --> E[Connection and history context]
    C --> F[Main window behavior]
    E --> G[RPC session and folder inputs]
    G --> H[Daemon-backed views]

References: main.pas• L1257-1278 main.pas• L1690-1807 main.pas• L2281-2307 main.pas• L8158-8192

Runtime updates

Some preferences take effect as soon as the user accepts them. Refresh intervals update the RPC refresh schedule, clipboard intake is enabled or cleared, tray state is rebuilt, and changes to the active profile can disconnect the old session before the new profile connects.

Other values are read at the next startup because they affect form creation or translation setup. The options dialog warns when a restart is needed. Folder history follows a separate rule: successful add and move actions update it during the current run and write the result to the INI file.

Daemon session options follow the remote state path instead. The client reads the daemon with session-get, sends accepted changes with session-set, and requests a session refresh. See Daemon connection configuration for that remote settings flow.

References: main.pas• L2281-2351 main.pas• L5611-5627 main.pas• L8100-8108 main.pas• L3497-3734 main.pas• L7983-8056

Change checklist

When these files or sections are changed, remember to consider these:

  • When a global option changes, keep its saved key, startup read, dialog value, and live runtime update in agreement.
  • When a profile name changes, move both Connection.<name> and AddTorrent.<name> data so endpoint settings and folder history do not split.
  • When folder history changes, keep FolderCount, indexed folder values, usage metadata, last-used keys, and cleanup behavior aligned.
  • When a folder input gains new saved metadata, preserve the distinction between global values such as StartTorrentOnAdd and profile values such as PeerLimit.
  • When a setting needs a restart, keep the saved value, restart notice, and next-start application path consistent.
  • When the settings path changes, preserve the portable-file and -home selection rules and the UTF-8 file behavior.
  • When a preference changes remote behavior, keep the boundary between local INI storage and daemon session-get or session-set state clear.

Important failure modes

TriggerConsequenceGuard
The configured folder-history limit is below 10 or above 99.The client can keep an invalid retention limit and produce unstable history behavior.Normalize the limit before use and write back the bounded value.
A history count is negative or larger than the supported indexed range.The loader can read invalid entries or scan more stale keys than the history format supports.Normalize the count and remove unused indexed keys when saving.
A profile is renamed without moving its add-torrent section.The renamed daemon loses its folder history and related add-torrent choices.Rename connection and add-torrent sections as one profile operation.
A folder is saved before the add or move request succeeds.A failed operation can make an unusable path the next default.Save folder history only after the remote operation succeeds.
A saved folder entry has no history metadata.The entry cannot take part in retention or template restore and can be skipped on write.Require a complete history entry before writing it back.
A local INI write fails.Accepted changes can disappear at the next restart even when the current UI still shows them.Keep explicit write failures visible and treat the INI file as the persistence boundary.
A restart-required option is changed while the process keeps running.Part of the new preference stays inactive until the next start.Show the restart notice and apply the value during startup.
A profile-specific history section is read for the wrong active connection.Add and move dialogs can suggest a path from another daemon.Build history keys from the current connection name.

Key files

FileWhy to read it
main.pasCoordinates settings startup, global option application, active profiles, folder history, and persistence during add, move, and shutdown flows.
options.pasDefines the global application options dialog and the save behavior for local client preferences.
options.lfmShows the user-facing groups for refresh, tray, add-torrent, language, scale, and update options.
connoptions.pasDefines profile storage, profile rename and delete behavior, path mappings, speed presets, and the folder-history limit.
folderhistory.pasDefines the valid history limits and the normalization of history counts and use data.
addtorrent.pasDefines how destination folders, file templates, start choice, and add-torrent input state use preferences and history.
movetorrent.pasDefines the remote data-location input that shares folder history with the add-torrent flow.
utils.pasDefines the UTF-8 INI file used as the local persistence layer.