mirror of
https://github.com/transmission/transmission
synced 2025-02-02 12:32:54 +00:00
(gtk) #749: libnotify tweaks
This commit is contained in:
parent
f71665e166
commit
3f2bda886e
1 changed files with 2 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
||||||
* This exemption does not extend to derived works not owned by
|
* This exemption does not extend to derived works not owned by
|
||||||
* the Transmission project.
|
* the Transmission project.
|
||||||
*
|
*
|
||||||
* $Id:$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "notify.h"
|
#include "notify.h"
|
||||||
|
@ -55,8 +55,7 @@ void
|
||||||
tr_notify_send(TrTorrent *tor)
|
tr_notify_send(TrTorrent *tor)
|
||||||
{
|
{
|
||||||
const tr_info * info = tr_torrent_info( tor );
|
const tr_info * info = tr_torrent_info( tor );
|
||||||
char * buf = g_strdup_printf( "%s was downloaded", info->name );
|
NotifyNotification * n = notify_notification_new( "Torrent Complete", info->name, "transmission", NULL );
|
||||||
NotifyNotification * n = notify_notification_new( "Torrent Complete", buf, "transmission", NULL );
|
|
||||||
|
|
||||||
if (info->fileCount == 1)
|
if (info->fileCount == 1)
|
||||||
notify_notification_add_action( n, "file", "Open File",
|
notify_notification_add_action( n, "file", "Open File",
|
||||||
|
@ -64,8 +63,6 @@ tr_notify_send(TrTorrent *tor)
|
||||||
notify_notification_add_action( n, "folder", "Open Containing Folder",
|
notify_notification_add_action( n, "folder", "Open Containing Folder",
|
||||||
NOTIFY_ACTION_CALLBACK(notifyCallback), tor, NULL );
|
NOTIFY_ACTION_CALLBACK(notifyCallback), tor, NULL );
|
||||||
notify_notification_show( n, NULL );
|
notify_notification_show( n, NULL );
|
||||||
|
|
||||||
g_free( buf );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue