Allow to set custom suffix to window title

This is to allow users to differentiate qbt instances when there are multiple running.
PR #20429.
Closes #17905.
This commit is contained in:
Chocobo1
2024-02-27 12:41:12 +08:00
committed by GitHub
parent 364bcf73ee
commit 46e8ee50c8
13 changed files with 98 additions and 27 deletions

View File

@@ -1043,6 +1043,14 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
<input type="checkbox" id="recheckTorrentsOnCompletion">
</td>
</tr>
<tr>
<td>
<label for="appInstanceName">QBT_TR(Customize application instance name:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="text" id="appInstanceName" style="width: 15em;" title="QBT_TR(It appends the text to the window title to help distinguish qBittorent instances)QBT_TR[CONTEXT=OptionsDialog]" />
</td>
</tr>
<tr>
<td>
<label for="refreshInterval">QBT_TR(Refresh interval:)QBT_TR[CONTEXT=OptionsDialog]</label>
@@ -2301,6 +2309,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
$('saveResumeDataInterval').setProperty('value', pref.save_resume_data_interval);
$('torrentFileSizeLimit').setProperty('value', (pref.torrent_file_size_limit / 1024 / 1024));
$('recheckTorrentsOnCompletion').setProperty('checked', pref.recheck_completed_torrents);
$('appInstanceName').setProperty('value', pref.app_instance_name);
$('refreshInterval').setProperty('value', pref.refresh_interval);
$('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries);
$('reannounceWhenAddressChanged').setProperty('checked', pref.reannounce_when_address_changed);
@@ -2746,6 +2755,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
settings['save_resume_data_interval'] = Number($('saveResumeDataInterval').getProperty('value'));
settings['torrent_file_size_limit'] = ($('torrentFileSizeLimit').getProperty('value') * 1024 * 1024);
settings['recheck_completed_torrents'] = $('recheckTorrentsOnCompletion').getProperty('checked');
settings['app_instance_name'] = $('appInstanceName').getProperty('value');
settings['refresh_interval'] = Number($('refreshInterval').getProperty('value'));
settings['resolve_peer_countries'] = $('resolvePeerCountries').getProperty('checked');
settings['reannounce_when_address_changed'] = $('reannounceWhenAddressChanged').getProperty('checked');