mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
Made scrobble toggle consistent with other menu toggles.
This commit is contained in:
@@ -74,10 +74,9 @@ ActionCollection::initActions()
|
|||||||
m_actionCollection[ "realtimeFollowingAlong" ] = realtimeFollowingAlong;
|
m_actionCollection[ "realtimeFollowingAlong" ] = realtimeFollowingAlong;
|
||||||
|
|
||||||
bool isPublic = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::PublicListening;
|
bool isPublic = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::PublicListening;
|
||||||
QAction *privacyToggle = new QAction( ( isPublic ? tr( "&Listen Privately" ) : tr( "&Listen Publicly" ) ), this );
|
m_actionCollection[ "togglePrivacy" ] = new QAction( tr( "&Listen Privately" ) , this );
|
||||||
privacyToggle->setIcon( ImageRegistry::instance()->icon( RESPATH "images/private-listening.svg" ) );
|
m_actionCollection[ "togglePrivacy" ]->setCheckable( true );
|
||||||
privacyToggle->setIconVisibleInMenu( isPublic );
|
m_actionCollection[ "togglePrivacy" ]->setChecked( !isPublic );
|
||||||
m_actionCollection[ "togglePrivacy" ] = privacyToggle;
|
|
||||||
connect( m_actionCollection[ "togglePrivacy" ], SIGNAL( triggered() ), SLOT( togglePrivateListeningMode() ), Qt::UniqueConnection );
|
connect( m_actionCollection[ "togglePrivacy" ], SIGNAL( triggered() ), SLOT( togglePrivateListeningMode() ), Qt::UniqueConnection );
|
||||||
|
|
||||||
m_actionCollection[ "loadPlaylist" ] = new QAction( tr( "&Load Playlist" ), this );
|
m_actionCollection[ "loadPlaylist" ] = new QAction( tr( "&Load Playlist" ), this );
|
||||||
@@ -347,10 +346,8 @@ ActionCollection::togglePrivateListeningMode()
|
|||||||
else
|
else
|
||||||
TomahawkSettings::instance()->setPrivateListeningMode( TomahawkSettings::PublicListening );
|
TomahawkSettings::instance()->setPrivateListeningMode( TomahawkSettings::PublicListening );
|
||||||
|
|
||||||
QAction *privacyToggle = m_actionCollection[ "togglePrivacy" ];
|
|
||||||
bool isPublic = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::PublicListening;
|
bool isPublic = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::PublicListening;
|
||||||
privacyToggle->setText( ( isPublic ? tr( "&Listen Privately" ) : tr( "&Listen Publicly" ) ) );
|
m_actionCollection[ "togglePrivacy" ]->setChecked( !isPublic );
|
||||||
privacyToggle->setIconVisibleInMenu( isPublic );
|
|
||||||
|
|
||||||
emit privacyModeChanged();
|
emit privacyModeChanged();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user