(trunk qt) hide the network icon when the transmission session is being run inside the client. patch by stdisease

This commit is contained in:
Charles Kerr 2009-05-06 13:46:10 +00:00
parent 3a97ab888c
commit 2a44c23dca
2 changed files with 7 additions and 2 deletions

View File

@ -667,6 +667,8 @@ TrMainWindow :: refreshStatusBar( )
foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
myNetworkLabel->setVisible( !mySession.isServer( ) );
const QString mode( myPrefs.getString( Prefs::STATUSBAR_STATS ) );
QString str;

View File

@ -62,10 +62,13 @@ class Session: public QObject
void portTest( );
public:
bool isRemote( ) const { return !isLocal( ); }
bool isLocal( ) const;
/** returns true if the transmission session is being run inside this client */
bool isServer( ) const;
/** returns true if isServer() is true or if the remote address is the localhost */
bool isLocal( ) const;
private:
void updateStats( struct tr_benc * args );
void updateInfo( struct tr_benc * args );