1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

Allow to show the setting dialog always, and disable +/- buttons till loaded

This commit is contained in:
Leo Franchi
2011-08-16 19:06:34 -04:00
parent ee8da33e06
commit 713243cc5d
4 changed files with 12 additions and 14 deletions

View File

@@ -113,7 +113,10 @@ SettingsDialog::SettingsDialog( QWidget *parent )
{ {
m_sipSpinner = new LoadingSpinner( ui->accountsView ); m_sipSpinner = new LoadingSpinner( ui->accountsView );
m_sipSpinner->fadeIn(); m_sipSpinner->fadeIn();
connect( Servent::instance(), SIGNAL( ready() ),m_sipSpinner, SLOT( fadeOut() ) );
ui->addSipButton->setEnabled( false );
ui->removeSipButton->setEnabled( false );
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( serventReady() ) );
} }
setupSipButtons(); setupSipButtons();
@@ -237,6 +240,13 @@ SettingsDialog::~SettingsDialog()
delete ui; delete ui;
} }
void
SettingsDialog::serventReady()
{
m_sipSpinner->fadeOut();
ui->addSipButton->setEnabled( true );
ui->removeSipButton->setEnabled( true );
}
void void
SettingsDialog::createIcons() SettingsDialog::createIcons()

View File

@@ -101,6 +101,7 @@ private slots:
void sipCreateConfigClosed( int value ); void sipCreateConfigClosed( int value );
void changePage( QListWidgetItem*, QListWidgetItem* ); void changePage( QListWidgetItem*, QListWidgetItem* );
void serventReady();
private: private:
void createIcons(); void createIcons();

View File

@@ -347,12 +347,6 @@ TomahawkWindow::setupSignals()
ui->menuWindow->menuAction()->setVisible( false ); ui->menuWindow->menuAction()->setVisible( false );
#endif #endif
if ( !Servent::instance()->isReady() )
{
ui->actionPreferences->setEnabled( false );
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( enablePreferences() ) );
}
// <SipHandler> // <SipHandler>
connect( SipHandler::instance(), SIGNAL( connected( SipPlugin* ) ), SLOT( onSipConnected() ) ); connect( SipHandler::instance(), SIGNAL( connected( SipPlugin* ) ), SLOT( onSipConnected() ) );
connect( SipHandler::instance(), SIGNAL( disconnected( SipPlugin* ) ), SLOT( onSipDisconnected() ) ); connect( SipHandler::instance(), SIGNAL( disconnected( SipPlugin* ) ), SLOT( onSipDisconnected() ) );
@@ -711,12 +705,6 @@ TomahawkWindow::checkForUpdates()
#endif #endif
} }
void
TomahawkWindow::enablePreferences()
{
ui->actionPreferences->setEnabled( true );
}
void void
TomahawkWindow::onSearch( const QString& search ) TomahawkWindow::onSearch( const QString& search )

View File

@@ -89,7 +89,6 @@ private slots:
void showAboutTomahawk(); void showAboutTomahawk();
void checkForUpdates(); void checkForUpdates();
void enablePreferences();
void onSipPluginAdded( SipPlugin* p ); void onSipPluginAdded( SipPlugin* p );
void onSipPluginRemoved( SipPlugin* p ); void onSipPluginRemoved( SipPlugin* p );