Changeset 13813
- Timestamp:
- Jan 20, 2013, 11:57:09 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/quark.c
r13791 r13813 310 310 { "sessionCount", 12 }, 311 311 { "show-backup-trackers", 20 }, 312 { "show-desktop-notification", 25 },313 312 { "show-extra-peer-details", 23 }, 314 313 { "show-filterbar", 14 }, -
trunk/libtransmission/quark.h
r13791 r13813 320 320 TR_KEY_sessionCount, 321 321 TR_KEY_show_backup_trackers, 322 TR_KEY_show_desktop_notification,323 322 TR_KEY_show_extra_peer_details, 324 323 TR_KEY_show_filterbar, -
trunk/qt/app.cc
r13795 r13813 23 23 #include <QLabel> 24 24 #include <QLibraryInfo> 25 #include <QProcess> 25 26 #include <QRect> 26 27 … … 260 261 MyApp :: onTorrentsAdded( QSet<int> torrents ) 261 262 { 262 if( !myPrefs->getBool( Prefs::SHOW_ DESKTOP_NOTIFICATION) )263 if( !myPrefs->getBool( Prefs::SHOW_NOTIFICATION_ON_ADD ) ) 263 264 return; 264 265 … … 280 281 MyApp :: onTorrentCompleted( int id ) 281 282 { 282 Torrent * tor = myModel->getTorrentFromId( id ); 283 284 if( tor && !tor->name().isEmpty() ) 285 { 286 notify( tr( "Torrent Completed" ), tor->name( ) ); 287 288 disconnect( tor, SIGNAL(torrentCompleted(int)), this, SLOT(onTorrentCompleted(int)) ); 283 Torrent * tor = myModel->getTorrentFromId (id); 284 285 if (tor) 286 { 287 if (myPrefs->getBool (Prefs::SHOW_NOTIFICATION_ON_COMPLETE)) 288 notify (tr("Torrent Completed"), tor->name()); 289 290 if (myPrefs->getBool (Prefs::COMPLETE_SOUND_ENABLED)) 291 QProcess::execute (myPrefs->getString(Prefs::COMPLETE_SOUND_COMMAND)); 292 293 disconnect( tor, SIGNAL(torrentCompleted(int)), this, SLOT(onTorrentCompleted(int)) ); 289 294 } 290 295 } -
trunk/qt/prefs-dialog.cc
r13796 r13813 300 300 hig->addSectionTitle( tr( "Desktop" ) ); 301 301 302 hig->addWideControl( checkBoxNew( tr( "Show Transmission icon in the ¬ification area" ), Prefs::SHOW_TRAY_ICON ) ); 303 hig->addWideControl( checkBoxNew( tr( "Start &minimized in notification area" ), Prefs::START_MINIMIZED ) ); 304 hig->addWideControl( checkBoxNew( tr( "Show &popup notifications" ), Prefs::SHOW_DESKTOP_NOTIFICATION ) ); 302 hig->addWideControl( checkBoxNew( tr( "Show Transmission icon in the ¬ification area" ), Prefs::SHOW_TRAY_ICON ) ); 303 hig->addWideControl( checkBoxNew( tr( "Start &minimized in notification area" ), Prefs::START_MINIMIZED ) ); 304 305 hig->addSectionDivider( ); 306 hig->addSectionTitle( tr ("Notification") ); 307 308 hig->addWideControl( checkBoxNew( tr( "Show a notification when torrents are a&dded" ), Prefs::SHOW_NOTIFICATION_ON_ADD ) ); 309 hig->addWideControl( checkBoxNew( tr( "Show a notification when torrents &finish" ), Prefs::SHOW_NOTIFICATION_ON_COMPLETE ) ); 310 hig->addWideControl( checkBoxNew( tr( "Play a &sound when torrents finish" ), Prefs::COMPLETE_SOUND_ENABLED ) ); 305 311 306 312 hig->finish( ); -
trunk/qt/prefs.cc
r13724 r13813 39 39 { SHOW_TRAY_ICON, TR_KEY_show_notification_area_icon, QVariant::Bool }, 40 40 { START_MINIMIZED, TR_KEY_start_minimized, QVariant::Bool }, 41 { SHOW_DESKTOP_NOTIFICATION, TR_KEY_show_desktop_notification, QVariant::Bool }, 41 { SHOW_NOTIFICATION_ON_ADD, TR_KEY_torrent_added_notification_enabled, QVariant::Bool }, 42 { SHOW_NOTIFICATION_ON_COMPLETE, TR_KEY_torrent_complete_notification_enabled, QVariant::Bool }, 42 43 { ASKQUIT, TR_KEY_prompt_before_exit, QVariant::Bool }, 43 44 { SORT_MODE, TR_KEY_sort_mode, TrTypes::SortModeType }, … … 66 67 { SESSION_REMOTE_USERNAME, TR_KEY_remote_session_username, QVariant::String }, 67 68 { SESSION_REMOTE_PASSWORD, TR_KEY_remote_session_password, QVariant::String }, 69 { COMPLETE_SOUND_COMMAND, TR_KEY_torrent_complete_sound_command, QVariant::String }, 70 { COMPLETE_SOUND_ENABLED, TR_KEY_torrent_complete_sound_enabled, QVariant::Bool }, 68 71 { USER_HAS_GIVEN_INFORMED_CONSENT, TR_KEY_user_has_given_informed_consent, QVariant::Bool }, 69 72 … … 276 279 Prefs :: initDefaults (tr_variant * d) 277 280 { 278 tr_variantDictReserve (d, 3 5);281 tr_variantDictReserve (d, 38); 279 282 tr_variantDictAddBool (d, TR_KEY_blocklist_updates_enabled, true); 280 283 tr_variantDictAddBool (d, TR_KEY_compact_view, false); … … 284 287 tr_variantDictAddBool (d, TR_KEY_remote_session_requres_authentication, false); 285 288 tr_variantDictAddBool (d, TR_KEY_show_backup_trackers, false); 286 tr_variantDictAddBool (d, TR_KEY_show_desktop_notification, true);287 289 tr_variantDictAddBool (d, TR_KEY_show_extra_peer_details, false), 288 290 tr_variantDictAddBool (d, TR_KEY_show_filterbar, true); … … 294 296 tr_variantDictAddBool (d, TR_KEY_show_tracker_scrapes, false); 295 297 tr_variantDictAddBool (d, TR_KEY_sort_reversed, false); 298 tr_variantDictAddBool (d, TR_KEY_torrent_added_notification_enabled, true); 299 tr_variantDictAddBool (d, TR_KEY_torrent_complete_notification_enabled, true); 300 tr_variantDictAddStr (d, TR_KEY_torrent_complete_sound_command, "canberra-gtk-play -i complete-download -d 'transmission torrent downloaded'"); 301 tr_variantDictAddBool (d, TR_KEY_torrent_complete_sound_enabled, true); 296 302 tr_variantDictAddBool (d, TR_KEY_user_has_given_informed_consent, false); 297 303 tr_variantDictAddBool (d, TR_KEY_watch_dir_enabled, false); -
trunk/qt/prefs.h
r13724 r13813 45 45 SHOW_TRAY_ICON, 46 46 START_MINIMIZED, 47 SHOW_DESKTOP_NOTIFICATION, 47 SHOW_NOTIFICATION_ON_ADD, 48 SHOW_NOTIFICATION_ON_COMPLETE, 48 49 ASKQUIT, 49 50 SORT_MODE, … … 72 73 SESSION_REMOTE_USERNAME, 73 74 SESSION_REMOTE_PASSWORD, 75 COMPLETE_SOUND_COMMAND, 76 COMPLETE_SOUND_ENABLED, 74 77 USER_HAS_GIVEN_INFORMED_CONSENT, 75 78
Note: See TracChangeset
for help on using the changeset viewer.