diff --git a/gtk/actions.c b/gtk/actions.c index b0f68dfb6..9992cc2c1 100644 --- a/gtk/actions.c +++ b/gtk/actions.c @@ -106,6 +106,7 @@ static GtkActionEntry entries[] = { "add-torrent-menu", GTK_STOCK_ADD, N_( "_Add..." ), "D", N_( "Add a torrent" ), G_CALLBACK( action_cb ) }, { "start-torrent", GTK_STOCK_MEDIA_PLAY, N_( "_Start" ), "S", N_( "Start torrent" ), G_CALLBACK( action_cb ) }, { "show-stats", NULL, N_( "_Statistics" ), NULL, NULL, G_CALLBACK( action_cb ) }, + { "donate", NULL, N_( "_Donate" ), NULL, NULL, G_CALLBACK( action_cb ) }, { "verify-torrent", NULL, N_( "_Verify Local Data" ), NULL, NULL, G_CALLBACK( action_cb ) }, { "pause-torrent", GTK_STOCK_MEDIA_PAUSE, N_( "_Pause" ), "P", N_( "Pause torrent" ), G_CALLBACK( action_cb ) }, { "pause-all-torrents", GTK_STOCK_MEDIA_PAUSE, N_( "_Pause All" ), NULL, N_( "Pause all torrents" ), G_CALLBACK( action_cb ) }, diff --git a/gtk/main.c b/gtk/main.c index 459dbb968..65d3cd56b 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1329,6 +1329,10 @@ doAction( const char * action_name, gpointer user_data ) GtkWidget * dialog = stats_dialog_create( data->wind, data->core ); gtk_widget_show( dialog ); } + else if( !strcmp( action_name, "donate" ) ) + { + gtr_open_file( "http://www.transmissionbt.com/donate.php" ); + } else if( !strcmp( action_name, "start-torrent" ) ) { GtkTreeSelection * s = tr_window_get_selection( data->wind ); diff --git a/gtk/ui.h b/gtk/ui.h index 9d7392222..009ff07b0 100644 --- a/gtk/ui.h +++ b/gtk/ui.h @@ -50,6 +50,8 @@ static const char * fallback_ui_file = " \n" " \n" " \n" + " \n" + " \n" " \n" " \n" " \n" diff --git a/gtk/util.c b/gtk/util.c index 52f17c6d8..7a85672ed 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -504,8 +504,13 @@ gtr_open_file( const char * path ) if( !opened ) { char * argv[] = { (char*)"xdg-open", (char*)path, NULL }; - g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, NULL ); + opened = g_spawn_async( NULL, argv, NULL, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL ); + } + + if( !opened ) + { + g_message( "Unable to open \"%s\"", path ); } } }