Changeset 6972


Ignore:
Timestamp:
Oct 27, 2008, 8:12:53 PM (12 years ago)
Author:
charles
Message:

(gtk) minor hack: when adding a duplicate torrent, don't pop up a warning dialog iff the duplicate was in the watch directory. otherwise if users don't clean out their watch directory we'd be nagging them every time they restart Transmission. :/

File:
1 edited

Legend:

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

    r6936 r6972  
    6060    guint           monitor_idle_tag;
    6161#endif
     62    gboolean        adding_from_watch_dir;
    6263    gboolean        inhibit_allowed;
    6364    gboolean        have_inhibit_cookie;
     
    474475    TrCore * core = TR_CORE( gcore );
    475476
     477    core->priv->adding_from_watch_dir = TRUE;
    476478    tr_core_add_list_defaults( core, core->priv->monitor_files );
     479    core->priv->adding_from_watch_dir = FALSE;
    477480
    478481    /* cleanup */
     
    868871        else if( ( err = tr_torrentParse( handle, ctor, NULL ) ) )
    869872        {
    870             tr_core_errsig( core, err, filename );
     873            /* don't complain about .torrent files in the watch directory
     874               that have already been added... that gets annoying, and we
     875               don't want to nag about cleaning up the watch dir */
     876            const gboolean quiet = ( err == TR_EDUPLICATE )
     877                                && ( core->priv->adding_from_watch_dir );
     878            if( !quiet )
     879                tr_core_errsig( core, err, filename );
     880
    871881            tr_ctorFree( ctor );
    872882        }
Note: See TracChangeset for help on using the changeset viewer.