mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
Move Go Online / Go Offline action from main menu to accounts widget.
This commit is contained in:
@@ -136,7 +136,6 @@ ActionCollection::createMenuBar( QWidget *parent )
|
|||||||
controlsMenu->addSeparator();
|
controlsMenu->addSeparator();
|
||||||
controlsMenu->addAction( m_actionCollection[ "togglePrivacy" ] );
|
controlsMenu->addAction( m_actionCollection[ "togglePrivacy" ] );
|
||||||
controlsMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
|
controlsMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
|
||||||
controlsMenu->addAction( m_actionCollection[ "toggleOnline" ] );
|
|
||||||
controlsMenu->addSeparator();
|
controlsMenu->addSeparator();
|
||||||
controlsMenu->addAction( m_actionCollection[ "loadXSPF" ] );
|
controlsMenu->addAction( m_actionCollection[ "loadXSPF" ] );
|
||||||
controlsMenu->addAction( m_actionCollection[ "updateCollection" ] );
|
controlsMenu->addAction( m_actionCollection[ "updateCollection" ] );
|
||||||
@@ -196,7 +195,6 @@ ActionCollection::createCompactMenu( QWidget *parent )
|
|||||||
compactMenu->addSeparator();
|
compactMenu->addSeparator();
|
||||||
compactMenu->addAction( m_actionCollection[ "togglePrivacy" ] );
|
compactMenu->addAction( m_actionCollection[ "togglePrivacy" ] );
|
||||||
compactMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
|
compactMenu->addAction( m_actionCollection[ "showOfflineSources" ] );
|
||||||
compactMenu->addAction( m_actionCollection[ "toggleOnline" ] );
|
|
||||||
compactMenu->addSeparator();
|
compactMenu->addSeparator();
|
||||||
compactMenu->addAction( m_actionCollection[ "loadXSPF" ] );
|
compactMenu->addAction( m_actionCollection[ "loadXSPF" ] );
|
||||||
compactMenu->addAction( m_actionCollection[ "updateCollection" ] );
|
compactMenu->addAction( m_actionCollection[ "updateCollection" ] );
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "AccountListWidget.h"
|
#include "AccountListWidget.h"
|
||||||
#include "utils/TomahawkUtilsGui.h"
|
#include "utils/TomahawkUtilsGui.h"
|
||||||
|
#include "ActionCollection.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QListView>
|
#include <QListView>
|
||||||
@@ -49,6 +50,11 @@ AccountsToolButton::AccountsToolButton( QWidget* parent )
|
|||||||
w->setLayout( wMainLayout );
|
w->setLayout( wMainLayout );
|
||||||
QLabel *connectionsLabel = new QLabel( tr( "Connections" ), w );
|
QLabel *connectionsLabel = new QLabel( tr( "Connections" ), w );
|
||||||
|
|
||||||
|
QToolButton *toggleOnlineButton = new QToolButton( w );
|
||||||
|
toggleOnlineButton->setIcon( QIcon( RESPATH "images/view-toggle-icon-cloud-active.png" ) ); //TODO: real icon
|
||||||
|
toggleOnlineButton->setText( tr( "Toggle Online" ) );
|
||||||
|
toggleOnlineButton->setDefaultAction( ActionCollection::instance()->getAction( "toggleOnline" ) );
|
||||||
|
|
||||||
QFont clFont = connectionsLabel->font();
|
QFont clFont = connectionsLabel->font();
|
||||||
clFont.setBold( true );
|
clFont.setBold( true );
|
||||||
clFont.setPointSize( TomahawkUtils::defaultFontSize() + 3 );
|
clFont.setPointSize( TomahawkUtils::defaultFontSize() + 3 );
|
||||||
@@ -63,6 +69,7 @@ AccountsToolButton::AccountsToolButton( QWidget* parent )
|
|||||||
|
|
||||||
QHBoxLayout *headerLayout = new QHBoxLayout( w );
|
QHBoxLayout *headerLayout = new QHBoxLayout( w );
|
||||||
headerLayout->addWidget( connectionsLabel );
|
headerLayout->addWidget( connectionsLabel );
|
||||||
|
headerLayout->addWidget( toggleOnlineButton );
|
||||||
headerLayout->addSpacing( 30 );
|
headerLayout->addSpacing( 30 );
|
||||||
headerLayout->addWidget( settingsButton );
|
headerLayout->addWidget( settingsButton );
|
||||||
wMainLayout->addLayout( headerLayout );
|
wMainLayout->addLayout( headerLayout );
|
||||||
|
Reference in New Issue
Block a user