Changeset 10700


Ignore:
Timestamp:
May 29, 2010, 4:12:42 PM (12 years ago)
Author:
charles
Message:

(trunk gtk) #3239 "move .torrent files to trash" not working when .torrent added via dbus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r10638 r10700  
    572572        GSList * l;
    573573        gboolean delegated = FALSE;
    574 
    575         for( l = argfiles; l; l = l->next )
    576             delegated |= gtr_dbus_add_torrent( l->data );
     574        const gboolean trash_originals = pref_flag_get( TR_PREFS_KEY_TRASH_ORIGINAL );
     575
     576        for( l=argfiles; l!=NULL; l=l->next )
     577        {
     578            const char * filename = l->data;
     579            const gboolean added = gtr_dbus_add_torrent( filename );
     580
     581            if( added && trash_originals )
     582                gtr_file_trash_or_remove( filename );
     583
     584            delegated |= added;
     585        }
    577586
    578587        if( delegated ) {
Note: See TracChangeset for help on using the changeset viewer.