Changeset 11923


Ignore:
Timestamp:
Feb 18, 2011, 12:33:29 AM (11 years ago)
Author:
jordan
Message:

(trunk T) add preliminary enable/disable toggles in daemon, gtk, and qt clients. 'preliminary' because this may be widened to a tri-state of inabled, disabled, and incoming only

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/remote.c

    r11881 r11923  
    299299    { 'u', "uplimit",                "Set the max upload speed in "SPEED_K_STR" for the current torrent(s) or globally", "u", 1, "<speed>" },
    300300    { 'U', "no-uplimit",             "Disable max upload speed for the current torrent(s) or globally", "U", 0, NULL },
     301    { 830, "utp",                    "Enable uTP for peer connections", NULL, 0, NULL },
     302    { 831, "no-utp",                 "Disable uTP for peer connections", NULL, 0, NULL },
    301303    { 'v', "verify",                 "Verify the current torrent(s)", "v",  0, NULL },
    302304    { 'V', "version",                "Show version number and exit", "V", 0, NULL },
     
    381383        case 800: /* torrent-done-script */
    382384        case 801: /* no-torrent-done-script */
     385        case 830: /* utp */
     386        case 831: /* no-utp */
    383387        case 970: /* alt-speed */
    384388        case 971: /* no-alt-speed */
     
    19921996                case 'O': tr_bencDictAddBool( args, TR_PREFS_KEY_DHT_ENABLED, FALSE );
    19931997                          break;
     1998                case 830: tr_bencDictAddBool( args, TR_PREFS_KEY_UTP_ENABLED, TRUE );
     1999                          break;
     2000                case 831: tr_bencDictAddBool( args, TR_PREFS_KEY_UTP_ENABLED, FALSE );
     2001                          break;
    19942002                case 'p': tr_bencDictAddInt( args, TR_PREFS_KEY_PEER_PORT, numarg( optarg ) );
    19952003                          break;
  • trunk/daemon/transmission-remote.1

    r11809 r11923  
    5858.Op Fl HL
    5959.Op Fl u Ar number | Fl U
     60.Op Fl utp | no-utp
    6061.Op Fl v
    6162.Op Fl V
     
    268269.It Fl U Fl -no-uplimit
    269270Disable upload speed limits.
     271.It Fl -utp
     272Enable uTP for peer connections.
     273.It Fl -no-utp
     274Disable uTP for peer connections.
    270275If current torrent(s) are selected this operates on them. Otherwise, it changes the global setting.
    271276.It Fl v Fl -verify
  • trunk/gtk/main.c

    r11834 r11923  
    14521452        tr_sessionSetDHTEnabled( tr, gtr_pref_flag_get( key ) );
    14531453    }
     1454    else if( !strcmp( key, TR_PREFS_KEY_UTP_ENABLED ) )
     1455    {
     1456        tr_sessionSetUTPEnabled( tr, gtr_pref_flag_get( key ) );
     1457    }
    14541458    else if( !strcmp( key, TR_PREFS_KEY_LPD_ENABLED ) )
    14551459    {
  • trunk/gtk/tr-prefs.c

    r11738 r11923  
    12171217    hig_workarea_add_section_divider( t, &row );
    12181218    hig_workarea_add_section_title( t, &row, _( "Options" ) );
     1219
     1220    s = _( "Enable _uTP for peer communication" );
     1221    w = new_check_button( s, TR_PREFS_KEY_UTP_ENABLED, core );
     1222    s = _( "uTP is a tool for reducing network congestion." );
     1223    gtr_widget_set_tooltip_text( w, s );
     1224    hig_workarea_add_wide_control( t, &row, w );
    12191225
    12201226    w = gtk_button_new_with_mnemonic( _( "Edit GNOME Proxy Settings" ) );
  • trunk/qt/prefs-dialog.cc

    r11715 r11923  
    356356    hig->addRow( tr( "Maximum peers &overall:" ), spinBoxNew( Prefs::PEER_LIMIT_GLOBAL, 1, 3000, 5 ) );
    357357
     358    hig->addSectionDivider( );
     359    hig->addSectionTitle( tr( "Options" ) );
     360
     361    QWidget * w;
     362    hig->addWideControl( w = checkBoxNew( tr( "Enable &uTP for peer connections" ), Prefs::UTP_ENABLED ) );
     363    w->setToolTip( tr( "uTP is a tool for reducing network congestion." ) );
     364
    358365    hig->finish( );
    359366    return hig;
  • trunk/qt/prefs.cc

    r11379 r11923  
    101101    { PEX_ENABLED, TR_PREFS_KEY_PEX_ENABLED, QVariant::Bool },
    102102    { DHT_ENABLED, TR_PREFS_KEY_DHT_ENABLED, QVariant::Bool },
     103    { UTP_ENABLED, TR_PREFS_KEY_UTP_ENABLED, QVariant::Bool },
    103104    { LPD_ENABLED, TR_PREFS_KEY_LPD_ENABLED, QVariant::Bool },
    104105    { PORT_FORWARDING, TR_PREFS_KEY_PORT_FORWARDING, QVariant::Bool },
  • trunk/qt/prefs.h

    r11379 r11923  
    106106            PEX_ENABLED,
    107107            DHT_ENABLED,
     108            UTP_ENABLED,
    108109            LPD_ENABLED,
    109110            PORT_FORWARDING,
  • trunk/qt/qtr.pro

    r11920 r11923  
    1717
    1818TRANSMISSION_TOP = ..
     19INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH}
    1920INCLUDEPATH += $${TRANSMISSION_TOP}
    2021LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransmission.a
    21 LIBS += $${TRANSMISSION_TOP}/third-party/dht/libutp.a
     22LIBS += $${TRANSMISSION_TOP}/third-party/libutp/libutp.a
    2223LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
    2324LIBS += $${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a
  • trunk/qt/session.cc

    r11616 r11923  
    171171        case Prefs :: USPEED:
    172172        case Prefs :: USPEED_ENABLED:
     173        case Prefs :: UTP_ENABLED:
    173174            sessionSet( myPrefs.keyStr(key), myPrefs.variant(key) );
    174175            break;
Note: See TracChangeset for help on using the changeset viewer.