1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 16:14:40 +02:00

Show google-specific text in add contact popup, fixes TWK-217

This commit is contained in:
Leo Franchi
2011-06-04 21:09:29 -04:00
parent 73e5828d41
commit 4e2c5b23f7
4 changed files with 18 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
#include <QtPlugin>
#include "ui_configwidget.h"
#include <QInputDialog>
SipPlugin*
GoogleWrapperFactory::createPlugin( const QString& pluginId )
@@ -52,6 +53,19 @@ GoogleWrapper::icon() const
return QIcon( ":/gmail-logo.png" );
}
void
GoogleWrapper::showAddFriendDialog()
{
bool ok;
QString id = QInputDialog::getText( 0, tr( "Add Friend" ),
tr( "Enter Google Address:" ), QLineEdit::Normal,
"", &ok );
if ( !ok )
return;
qDebug() << "Attempting to add google contact to roster:" << id;
addContact( id );
}
#ifdef GOOGLE_WRAPPER
Q_EXPORT_PLUGIN2( sipfactory, GoogleWrapperFactory )

View File

@@ -47,6 +47,8 @@ public:
virtual const QString friendlyName() const { return "Google"; }
virtual QIcon icon() const;
public slots:
void showAddFriendDialog();
};
#endif // GOOGLEWRAPPER_H

View File

@@ -94,12 +94,12 @@ public slots:
void broadcastMsg( const QString &msg );
void addContact( const QString &jid, const QString& msg = QString() );
void refreshProxy();
void showAddFriendDialog();
protected:
Ui_JabberConfig* m_ui; // so the google wrapper can change the config dialog a bit
private slots:
void showAddFriendDialog();
void showXmlConsole();
void onConnect();
void onDisconnect(Jreen::Client::DisconnectReason reason);