mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +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, myDownStatusWidgets ) w->setVisible( !down.isZero( ) );
|
||||
|
||||
myNetworkLabel->setVisible( !mySession.isServer( ) );
|
||||
|
||||
const QString mode( myPrefs.getString( Prefs::STATUSBAR_STATS ) );
|
||||
QString str;
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue