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:
@@ -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 )
|
||||
|
@@ -47,6 +47,8 @@ public:
|
||||
virtual const QString friendlyName() const { return "Google"; }
|
||||
virtual QIcon icon() const;
|
||||
|
||||
public slots:
|
||||
void showAddFriendDialog();
|
||||
};
|
||||
|
||||
#endif // GOOGLEWRAPPER_H
|
||||
|
@@ -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);
|
||||
|
2
thirdparty/jreen
vendored
2
thirdparty/jreen
vendored
Submodule thirdparty/jreen updated: 8f995f2466...a231a2b386
Reference in New Issue
Block a user