Ignore:
Timestamp:
Apr 9, 2009, 10:42:55 PM (13 years ago)
Author:
charles
Message:

(trunk qt,gtk) include torrents-being-verified in the "active torrents" filter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/prefs-dialog.cc

    r8188 r8192  
    445445    connect( w, SIGNAL(clicked(bool)), this, SLOT(onUpdateBlocklistClicked()));
    446446    myBlockWidgets << w;
    447     QWidget * l = checkBoxNew( tr( "Enable &blocklist (contains %Ln rule(s))", 0, session.blocklistSize( ) ), Prefs::BLOCKLIST_ENABLED );
     447    QWidget * l = checkBoxNew( "", Prefs::BLOCKLIST_ENABLED );
    448448    h->addWidget( l );
    449449    h->addStretch( 1 );
     
    472472
    473473    hig->finish( );
    474     myUnsupportedWhenRemote << myBlockWidgets;
     474    updateBlocklistCheckBox( );
    475475    return hig;
    476476}
     
    619619PrefsDialog :: sessionUpdated( )
    620620{
     621    updateBlocklistCheckBox( );
     622}
     623
     624void
     625PrefsDialog :: updateBlocklistCheckBox( )
     626{
    621627    QCheckBox * box = qobject_cast<QCheckBox*>( myWidgets[Prefs::BLOCKLIST_ENABLED] );
    622     box->setText( tr( "Enable &blocklist (%Ln rules)", 0, mySession.blocklistSize( ) ) );
     628    const int n = mySession.blocklistSize( );
     629    if( n < 0 ) // unknown
     630        box->setText( tr( "Enable &blocklist" ) );
     631    else
     632        box->setText( tr( "Enable &blocklist (%Ln rules)", 0, n ) );
    623633}
    624634
     
    657667        case Prefs :: BLOCKLIST_ENABLED: {
    658668            const bool enabled = myPrefs.getBool( key );
     669            std::cerr << " setting " << myBlockWidgets.size() << " block widgets to " << enabled << std::endl;
    659670            foreach( QWidget * w, myBlockWidgets ) w->setEnabled( enabled );
    660671            break;
Note: See TracChangeset for help on using the changeset viewer.