mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Don't try to reconnect if the jabber authentication failed.
* Added basic "About Tomahawk" dialog.
This commit is contained in:
@@ -248,7 +248,7 @@ Servent::readyRead()
|
|||||||
{
|
{
|
||||||
if( cc->id() == nodeid )
|
if( cc->id() == nodeid )
|
||||||
{
|
{
|
||||||
qDebug() << "Duplicate control connection detected, dropping:" << nodeid;
|
qDebug() << "Duplicate control connection detected, dropping:" << nodeid << conntype;
|
||||||
goto closeconnection;
|
goto closeconnection;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -489,10 +489,13 @@ TomahawkApp::jabberAuthError( int code, const QString& msg )
|
|||||||
.arg( "AUTH_ERROR" )
|
.arg( "AUTH_ERROR" )
|
||||||
.arg( (servent().externalPort() > 0) ? QString( "YES:%1" ).arg(servent().externalPort()) :"NO" ) );
|
.arg( (servent().externalPort() > 0) ? QString( "YES:%1" ).arg(servent().externalPort()) :"NO" ) );
|
||||||
|
|
||||||
QMessageBox::warning( m_mainwindow,
|
if ( code == gloox::ConnAuthenticationFailed )
|
||||||
"Jabber Auth Error",
|
{
|
||||||
QString("Error connecting to Jabber (%1) %2").arg(code).arg(msg),
|
QMessageBox::warning( m_mainwindow,
|
||||||
QMessageBox::Ok );
|
"Jabber Auth Error",
|
||||||
|
QString("Error connecting to Jabber (%1) %2").arg(code).arg(msg),
|
||||||
|
QMessageBox::Ok );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -621,13 +624,14 @@ TomahawkApp::jabberMessage( const QString& from, const QString& msg )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << "THey should be conecting to us...";
|
qDebug() << Q_FUNC_INFO << "They should be conecting to us...";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << "THey are not visible, doing nothing atm";
|
qDebug() << Q_FUNC_INFO << "They are not visible, doing nothing atm";
|
||||||
if( m_servent.visibleExternally() ) jabberPeerOnline( from ); // HACK FIXME
|
if ( m_servent.visibleExternally() )
|
||||||
|
jabberPeerOnline( from ); // HACK FIXME
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -148,14 +148,10 @@ TomahawkWindow::setupSignals()
|
|||||||
SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
||||||
|
|
||||||
// <Menu Items>
|
// <Menu Items>
|
||||||
connect( ui->actionPreferences, SIGNAL( triggered() ),
|
connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) );
|
||||||
SLOT( showSettingsDialog() ) );
|
connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
||||||
|
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( rescanCollectionManually() ) );
|
||||||
connect( ui->actionAddPeerManually, SIGNAL( triggered() ),
|
connect( ui->actionAbout_Tomahawk, SIGNAL( triggered() ), SLOT( showAboutTomahawk() ) );
|
||||||
SLOT( addPeerManually() ) );
|
|
||||||
|
|
||||||
connect( ui->actionRescanCollection, SIGNAL( triggered() ),
|
|
||||||
SLOT( rescanCollectionManually() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -309,3 +305,10 @@ TomahawkWindow::setWindowTitle( const QString& title )
|
|||||||
QMainWindow::setWindowTitle( s + " - " + title );
|
QMainWindow::setWindowTitle( s + " - " + title );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TomahawkWindow::showAboutTomahawk()
|
||||||
|
{
|
||||||
|
QMessageBox::about( this, "About Tomahawk", "Copyright 2010 Christian Muehlhaeuser <muesli@gmail.com>\nThanks to: Leo Franchi, Dominik Schmidt and Steve Robertson" );
|
||||||
|
}
|
||||||
|
@@ -52,6 +52,8 @@ private slots:
|
|||||||
|
|
||||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||||
|
|
||||||
|
void showAboutTomahawk();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>22</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuSettings">
|
<widget class="QMenu" name="menuSettings">
|
||||||
@@ -52,7 +52,6 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Music &Player</string>
|
<string>Music &Player</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionAddPeerManually"/>
|
|
||||||
<addaction name="actionRescanCollection"/>
|
<addaction name="actionRescanCollection"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionExit"/>
|
<addaction name="actionExit"/>
|
||||||
@@ -65,9 +64,23 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionLoadXSPF"/>
|
<addaction name="actionLoadXSPF"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuNetwork">
|
||||||
|
<property name="title">
|
||||||
|
<string>Network</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAddPeerManually"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menu_Help">
|
||||||
|
<property name="title">
|
||||||
|
<string>&Help</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAbout_Tomahawk"/>
|
||||||
|
</widget>
|
||||||
<addaction name="menuApp"/>
|
<addaction name="menuApp"/>
|
||||||
<addaction name="menuPlaylist"/>
|
<addaction name="menuPlaylist"/>
|
||||||
|
<addaction name="menuNetwork"/>
|
||||||
<addaction name="menuSettings"/>
|
<addaction name="menuSettings"/>
|
||||||
|
<addaction name="menu_Help"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<action name="actionExit">
|
<action name="actionExit">
|
||||||
@@ -109,6 +122,11 @@
|
|||||||
<string>Create &New Playlist...</string>
|
<string>Create &New Playlist...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionAbout_Tomahawk">
|
||||||
|
<property name="text">
|
||||||
|
<string>About &Tomahawk</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Reference in New Issue
Block a user