mirror of
https://github.com/transmission/transmission
synced 2025-01-03 13:35:36 +00:00
(trunk qt) hide the network icon when the transmission session is being run inside the client. patch by stdisease
This commit is contained in:
parent
3a97ab888c
commit
2a44c23dca
2 changed files with 7 additions and 2 deletions
|
@ -667,6 +667,8 @@ TrMainWindow :: refreshStatusBar( )
|
||||||
foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
|
foreach( QWidget * w, myUpStatusWidgets ) w->setVisible( !up.isZero( ) );
|
||||||
foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
|
foreach( QWidget * w, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
|
||||||
|
|
||||||
|
myNetworkLabel->setVisible( !mySession.isServer( ) );
|
||||||
|
|
||||||
const QString mode( myPrefs.getString( Prefs::STATUSBAR_STATS ) );
|
const QString mode( myPrefs.getString( Prefs::STATUSBAR_STATS ) );
|
||||||
QString str;
|
QString str;
|
||||||
|
|
||||||
|
|
|
@ -62,10 +62,13 @@ class Session: public QObject
|
||||||
void portTest( );
|
void portTest( );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool isRemote( ) const { return !isLocal( ); }
|
|
||||||
bool isLocal( ) const;
|
/** returns true if the transmission session is being run inside this client */
|
||||||
bool isServer( ) const;
|
bool isServer( ) const;
|
||||||
|
|
||||||
|
/** returns true if isServer() is true or if the remote address is the localhost */
|
||||||
|
bool isLocal( ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateStats( struct tr_benc * args );
|
void updateStats( struct tr_benc * args );
|
||||||
void updateInfo( struct tr_benc * args );
|
void updateInfo( struct tr_benc * args );
|
||||||
|
|
Loading…
Reference in a new issue