1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +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->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();
@@ -237,6 +240,13 @@ SettingsDialog::~SettingsDialog()
delete ui;
}
void
SettingsDialog::serventReady()
{
m_sipSpinner->fadeOut();
ui->addSipButton->setEnabled( true );
ui->removeSipButton->setEnabled( true );
}
void
SettingsDialog::createIcons()

View File

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

View File

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

View File

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