mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
(trunk, qt) #5060 'start minimized to tray option' -- added.
This commit is contained in:
parent
a79563858e
commit
84c5be5a77
6 changed files with 13 additions and 0 deletions
|
@ -330,6 +330,7 @@ static const struct tr_key_struct my_static[] =
|
|||
{ "speed-limit-up-enabled", 22 },
|
||||
{ "speed-units", 11 },
|
||||
{ "start-added-torrents", 20 },
|
||||
{ "start-minimized", 15 },
|
||||
{ "startDate", 9 },
|
||||
{ "status", 6 },
|
||||
{ "statusbar-stats", 15 },
|
||||
|
|
|
@ -340,6 +340,7 @@ enum
|
|||
TR_KEY_speed_limit_up_enabled,
|
||||
TR_KEY_speed_units,
|
||||
TR_KEY_start_added_torrents,
|
||||
TR_KEY_start_minimized,
|
||||
TR_KEY_startDate,
|
||||
TR_KEY_status,
|
||||
TR_KEY_statusbar_stats,
|
||||
|
|
|
@ -158,6 +158,12 @@ MyApp :: MyApp( int& argc, char ** argv ):
|
|||
myPrefs->set( Prefs::SESSION_REMOTE_PASSWORD, password );
|
||||
if( ( host != 0 ) || ( port != 0 ) || ( username != 0 ) || ( password != 0 ) )
|
||||
myPrefs->set( Prefs::SESSION_IS_REMOTE, true );
|
||||
if ( myPrefs->getBool( Prefs::START_MINIMIZED) )
|
||||
minimized = true;
|
||||
|
||||
// start as minimized only if the system tray present
|
||||
if ( !myPrefs->getBool( Prefs::SHOW_TRAY_ICON ) )
|
||||
minimized = false;
|
||||
|
||||
mySession = new Session( configDir, *myPrefs );
|
||||
myModel = new TorrentModel( *myPrefs );
|
||||
|
|
|
@ -300,6 +300,7 @@ PrefsDialog :: createDesktopTab( )
|
|||
hig->addSectionTitle( tr( "Desktop" ) );
|
||||
|
||||
hig->addWideControl( checkBoxNew( tr( "Show Transmission icon in the ¬ification area" ), Prefs::SHOW_TRAY_ICON ) );
|
||||
hig->addWideControl( checkBoxNew( tr( "Start &minimized in notification area" ), Prefs::START_MINIMIZED ) );
|
||||
hig->addWideControl( checkBoxNew( tr( "Show &popup notifications" ), Prefs::SHOW_DESKTOP_NOTIFICATION ) );
|
||||
|
||||
hig->finish( );
|
||||
|
|
|
@ -37,6 +37,7 @@ Prefs::PrefItem Prefs::myItems[] =
|
|||
{ DIR_WATCH, TR_KEY_watch_dir, QVariant::String },
|
||||
{ DIR_WATCH_ENABLED, TR_KEY_watch_dir_enabled, QVariant::Bool },
|
||||
{ SHOW_TRAY_ICON, TR_KEY_show_notification_area_icon, QVariant::Bool },
|
||||
{ START_MINIMIZED, TR_KEY_start_minimized, QVariant::Bool },
|
||||
{ SHOW_DESKTOP_NOTIFICATION, TR_KEY_show_desktop_notification, QVariant::Bool },
|
||||
{ ASKQUIT, TR_KEY_prompt_before_exit, QVariant::Bool },
|
||||
{ SORT_MODE, TR_KEY_sort_mode, TrTypes::SortModeType },
|
||||
|
@ -274,6 +275,7 @@ Prefs :: ~Prefs ()
|
|||
void
|
||||
Prefs :: initDefaults (tr_variant * d)
|
||||
{
|
||||
tr_variantDictReserve (d, 35);
|
||||
tr_variantDictAddBool (d, TR_KEY_blocklist_updates_enabled, true);
|
||||
tr_variantDictAddBool (d, TR_KEY_compact_view, false);
|
||||
tr_variantDictAddBool (d, TR_KEY_inhibit_desktop_hibernation, false);
|
||||
|
@ -285,6 +287,7 @@ Prefs :: initDefaults (tr_variant * d)
|
|||
tr_variantDictAddBool (d, TR_KEY_show_extra_peer_details, false),
|
||||
tr_variantDictAddBool (d, TR_KEY_show_filterbar, true);
|
||||
tr_variantDictAddBool (d, TR_KEY_show_notification_area_icon, false);
|
||||
tr_variantDictAddBool (d, TR_KEY_start_minimized, false);
|
||||
tr_variantDictAddBool (d, TR_KEY_show_options_window, true);
|
||||
tr_variantDictAddBool (d, TR_KEY_show_statusbar, true);
|
||||
tr_variantDictAddBool (d, TR_KEY_show_toolbar, true);
|
||||
|
|
|
@ -43,6 +43,7 @@ class Prefs: public QObject
|
|||
DIR_WATCH,
|
||||
DIR_WATCH_ENABLED,
|
||||
SHOW_TRAY_ICON,
|
||||
START_MINIMIZED,
|
||||
SHOW_DESKTOP_NOTIFICATION,
|
||||
ASKQUIT,
|
||||
SORT_MODE,
|
||||
|
|
Loading…
Reference in a new issue