Changeset 8763 for trunk/gtk/tr-core.c


Ignore:
Timestamp:
Jun 30, 2009, 6:08:50 PM (13 years ago)
Author:
charles
Message:

(trunk, gtk/qt) use Monsoon's strings for encryption preferences and Deluge's system tray tooltip.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-core.c

    r8757 r8763  
    719719}
    720720
    721 static gboolean
    722 statsForeach( GtkTreeModel * model,
    723               GtkTreePath  * path UNUSED,
    724               GtkTreeIter  * iter,
    725               gpointer       gstats )
    726 {
    727     tr_torrent *        tor;
    728     struct core_stats * stats = gstats;
    729     int                 activity;
    730 
    731     gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 );
    732     activity = tr_torrentGetActivity( tor );
    733 
    734     if( activity == TR_STATUS_DOWNLOAD )
    735         ++stats->downloadCount;
    736     else if( activity == TR_STATUS_SEED )
    737         ++stats->seedingCount;
    738 
    739     return FALSE;
    740 }
    741 
    742 void
    743 tr_core_get_stats( const TrCore *      core,
    744                    struct core_stats * setme )
    745 {
    746     memset( setme, 0, sizeof( struct core_stats ) );
    747 
    748     if( !isDisposed( core ) )
    749     {
    750         tr_session * session = core->priv->session;
    751 
    752         setme->clientDownloadSpeed = tr_sessionGetPieceSpeed( session, TR_DOWN );
    753 
    754         setme->clientUploadSpeed = tr_sessionGetPieceSpeed( session, TR_UP );
    755 
    756         gtk_tree_model_foreach( core->priv->model, statsForeach, setme );
    757     }
    758 }
    759 
    760721static char*
    761722doCollate( const char * in )
Note: See TracChangeset for help on using the changeset viewer.