Ignore:
Timestamp:
Feb 19, 2007, 10:09:05 PM (16 years ago)
Author:
joshe
Message:

Merge gtkmisc branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr_backend.c

    r1190 r1504  
    22 * $Id$
    33 *
    4  * Copyright (c) 2006 Transmission authors and contributors
     4 * Copyright (c) 2006-2007 Transmission authors and contributors
    55 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a
     
    221221
    222222GList *
    223 tr_backend_load_state(TrBackend *back, benc_val_t *state, GList **errors) {
     223tr_backend_load_state( TrBackend * back, benc_val_t * state,
     224                       guint flags, GList ** errors )
     225{
    224226  GList *ret = NULL;
    225227  int ii;
     
    234236  for(ii = 0; ii < state->val.l.count; ii++) {
    235237    errstr = NULL;
    236     tor = tr_torrent_new_with_state(G_OBJECT(back), state->val.l.vals + ii,
    237                                     &errstr);
     238    tor = tr_torrent_new_with_state( G_OBJECT( back ), state->val.l.vals + ii,
     239                                     flags, &errstr );
    238240    if(NULL != errstr)
    239241      *errors = g_list_append(*errors, errstr);
     
    274276
    275277gboolean
    276 tr_backend_torrents_stopped(TrBackend *back) {
    277   GList *ii, *list;
    278   tr_stat_t *st;
    279   gboolean ret = TRUE;
    280 
    281   TR_IS_BACKEND(back);
    282 
    283   list = g_list_copy(back->torrents);
    284   for(ii = list; NULL != ii; ii = ii->next) {
    285     st = tr_torrent_stat_polite(ii->data);
    286     if(NULL == st || !(TR_STATUS_PAUSE & st->status))
    287       ret = FALSE;
    288   }
    289   g_list_free(list);
    290 
    291   return ret;
    292 }
     278tr_backend_torrents_stopped( TrBackend * back, gboolean timeout )
     279{
     280    GList     * ii, * list;
     281    tr_stat_t * st;
     282    gboolean  ret;
     283
     284    TR_IS_BACKEND( back );
     285
     286    ret  = TRUE;
     287    list = g_list_copy( back->torrents );
     288    for( ii = list; NULL != ii; ii = ii->next )
     289    {
     290        st = tr_torrent_stat_polite( ii->data, timeout );
     291        if( NULL == st || !( TR_STATUS_PAUSE & st->status ) )
     292        {
     293            ret = FALSE;
     294        }
     295    }
     296    g_list_free( list );
     297
     298    return ret;
     299}
Note: See TracChangeset for help on using the changeset viewer.