Changeset 7685
- Timestamp:
- Jan 12, 2009, 6:48:20 PM (12 years ago)
- Location:
- trunk/gtk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/notify.c
r7658 r7685 61 61 tr_notify_send( TrTorrent *tor ) 62 62 { 63 const tr_info * info = tr_torrent_info( tor ); 64 NotifyNotification * n = notify_notification_new( _( 65 "Torrent Complete" ), 66 info->name, 67 "transmission", NULL ); 63 if( pref_flag_get( PREF_KEY_SHOW_DESKTOP_NOTIFICATION ) ) 64 { 65 const tr_info * info = tr_torrent_info( tor ); 66 NotifyNotification * n; 68 67 69 if( info->fileCount == 1 ) 70 notify_notification_add_action( n, "file", _( "Open File" ), 71 NOTIFY_ACTION_CALLBACK( 72 notifyCallback ), tor, NULL ); 73 notify_notification_add_action( n, "folder", _( "Open Folder" ), 74 NOTIFY_ACTION_CALLBACK( 75 notifyCallback ), tor, NULL ); 76 notify_notification_show( n, NULL ); 68 n = notify_notification_new( _( "Torrent Complete" ), 69 info->name, 70 "transmission", NULL ); 71 72 if( info->fileCount == 1 ) 73 notify_notification_add_action( 74 n, "file", _( "Open File" ), 75 NOTIFY_ACTION_CALLBACK( notifyCallback ), tor, 76 NULL ); 77 78 notify_notification_add_action( 79 n, "folder", _( "Open Folder" ), 80 NOTIFY_ACTION_CALLBACK( notifyCallback ), tor, NULL ); 81 82 notify_notification_show( n, NULL ); 83 } 77 84 } 78 85 -
trunk/gtk/tr-prefs.c
r7658 r7685 40 40 cf_check_older_configs( ); 41 41 42 #if HAVE_GIO42 #ifdef HAVE_GIO 43 43 str = NULL; 44 44 if( !str ) str = g_get_user_special_dir( G_USER_DIRECTORY_DESKTOP ); … … 57 57 pref_flag_set_default ( PREF_KEY_STATUSBAR, TRUE ); 58 58 pref_flag_set_default ( PREF_KEY_SHOW_TRAY_ICON, FALSE ); 59 pref_flag_set_default ( PREF_KEY_SHOW_DESKTOP_NOTIFICATION, TRUE ); 59 60 pref_string_set_default ( PREF_KEY_STATUSBAR_STATS, "total-ratio" ); 60 61 … … 349 350 s = _( "Show _icon in the desktop Notification Area" ); 350 351 w = new_check_button( s, PREF_KEY_SHOW_TRAY_ICON, core ); 352 hig_workarea_add_wide_control( t, &row, w ); 353 354 s = _( "Show desktop _notifications" ); 355 w = new_check_button( s, PREF_KEY_SHOW_DESKTOP_NOTIFICATION, core ); 351 356 hig_workarea_add_wide_control( t, &row, w ); 352 357 -
trunk/gtk/tr-prefs.h
r7658 r7685 33 33 #define PREF_KEY_DIR_WATCH_ENABLED "watch-dir-enabled" 34 34 #define PREF_KEY_SHOW_TRAY_ICON "show-notification-area-icon" 35 #define PREF_KEY_SHOW_DESKTOP_NOTIFICATION "show-desktop-notification" 35 36 #define PREF_KEY_START "start-added-torrents" 36 37 #define PREF_KEY_TRASH_ORIGINAL "trash-original-torrent-files"
Note: See TracChangeset
for help on using the changeset viewer.