Changeset 9379 for branches


Ignore:
Timestamp:
Oct 22, 2009, 4:43:52 AM (13 years ago)
Author:
charles
Message:

(1.7x) backports for 1.76: r9175 #2418 cannot open a torrent with the Qt client in KDE4 by right-clicking

Location:
branches/1.7x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7x/NEWS

    r9378 r9379  
    2323  * Fix crash when removing expired torrents from the display
    2424  * Fix client from closing, rather than closing to the system tray, when clicking X
     25  * Cannot open a torrent in KDE4 with right-clicking
    2526
    2627=== Transmission 1.75 (2009/09/13) ===
  • branches/1.7x/qt/app.cc

    r8570 r9379  
    4949    getUsage( void )
    5050    {
    51         return "Transmission " LONG_VERSION_STRING "\n"
    52                "http://www.transmissionbt.com/\n"
    53                "A fast and easy BitTorrent client";
     51        return "Usage:\n"
     52               "  transmission [OPTIONS...] [torrent files]";
    5453    }
    5554
     
    9998    const char * optarg;
    10099    const char * configDir = 0;
     100    QStringList filenames;
    101101    while( ( c = tr_getopt( getUsage( ), argc, (const char**)argv, opts, &optarg ) ) ) {
    102102        switch( c ) {
     
    105105            case 'v':        Utils::toStderr( QObject::tr( "transmission %1" ).arg( LONG_VERSION_STRING ) ); exit( 0 ); break;
    106106            case TR_OPT_ERR: Utils::toStderr( QObject::tr( "Invalid option" ) ); showUsage( ); break;
    107             default:         Utils::toStderr( QObject::tr( "Got opt %1" ).arg((int)c) ); showUsage( ); break;
     107            default:         filenames.append( optarg ); break;
    108108        }
    109109    }
     
    168168        d->show( );
    169169    }
     170
     171    for( QStringList::const_iterator it=filenames.begin(), end=filenames.end(); it!=end; ++it )
     172        mySession->addTorrent( *it );
    170173}
    171174
Note: See TracChangeset for help on using the changeset viewer.