Changeset 9989
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/actions.c
r9930 r9989 145 145 static const BuiltinIconInfo my_fallback_icons[] = 146 146 { 147 { tr_icon_logo, "transmission" }, 147 { tr_icon_logo, WINDOW_ICON }, 148 { tr_icon_logo, TRAY_ICON }, 149 { tr_icon_logo, NOTIFICATION_ICON }, 148 150 { tr_icon_lock, "transmission-lock" }, 149 151 { options_icon, "options" }, -
trunk/gtk/actions.h
r9868 r9989 16 16 #include <gtk/gtk.h> 17 17 #include "tr-core.h" 18 19 #define WINDOW_ICON "transmission-main-window-icon" 20 #define TRAY_ICON "transmission-tray-icon" 21 #define NOTIFICATION_ICON "transmission-notification-icon" 22 18 23 19 24 void actions_init( GtkUIManager * ui_manager, -
trunk/gtk/notify.c
r9868 r9989 22 22 23 23 #include <glib/gi18n.h> 24 #include "actions.h" /* NOTIFICATION_ICON */ 24 25 #include "conf.h" 25 26 #include "notify.h" … … 90 91 } 91 92 93 static void 94 addIcon( NotifyNotification * notify ) 95 { 96 int size = 32; 97 GtkIconTheme * theme; 98 GdkPixbuf * icon; 99 100 gtk_icon_size_lookup( GTK_ICON_SIZE_DIALOG, &size, &size ); 101 theme = gtk_icon_theme_get_default( ); 102 icon = gtk_icon_theme_load_icon( theme, NOTIFICATION_ICON, size, 0, NULL ); 103 104 if( icon != NULL ) 105 { 106 notify_notification_set_icon_from_pixbuf( notify, icon ); 107 g_object_unref( icon ); 108 } 109 } 110 92 111 void 93 112 tr_notify_send( TrTorrent *tor ) … … 112 131 n = notify_notification_new( _( "Torrent Complete" ), 113 132 info->name, 114 "transmission", NULL ); 133 NULL, NULL ); 134 addIcon( n ); 115 135 116 136 if( can_support_actions( ) ) … … 137 157 { 138 158 NotifyNotification * n = notify_notification_new( 139 _( "Torrent Added" ), name, "transmission", NULL ); 159 _( "Torrent Added" ), name, NULL, NULL ); 160 addIcon( n ); 140 161 notify_notification_set_timeout( n, NOTIFY_EXPIRES_DEFAULT ); 141 162 notify_notification_show( n, NULL ); -
trunk/gtk/tr-icon.c
r9868 r9989 112 112 tr_icon_new( TrCore * core ) 113 113 { 114 GtkStatusIcon * icon = gtk_status_icon_new_from_icon_name(115 "transmission");114 const char * icon_name = TRAY_ICON; 115 GtkStatusIcon * icon = gtk_status_icon_new_from_icon_name( icon_name ); 116 116 117 117 g_signal_connect( icon, "activate", G_CALLBACK( activated ), NULL );
Note: See TracChangeset
for help on using the changeset viewer.