mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +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 <QtPlugin>
|
||||||
|
|
||||||
#include "ui_configwidget.h"
|
#include "ui_configwidget.h"
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
SipPlugin*
|
SipPlugin*
|
||||||
GoogleWrapperFactory::createPlugin( const QString& pluginId )
|
GoogleWrapperFactory::createPlugin( const QString& pluginId )
|
||||||
@@ -52,6 +53,19 @@ GoogleWrapper::icon() const
|
|||||||
return QIcon( ":/gmail-logo.png" );
|
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
|
#ifdef GOOGLE_WRAPPER
|
||||||
Q_EXPORT_PLUGIN2( sipfactory, GoogleWrapperFactory )
|
Q_EXPORT_PLUGIN2( sipfactory, GoogleWrapperFactory )
|
||||||
|
@@ -47,6 +47,8 @@ public:
|
|||||||
virtual const QString friendlyName() const { return "Google"; }
|
virtual const QString friendlyName() const { return "Google"; }
|
||||||
virtual QIcon icon() const;
|
virtual QIcon icon() const;
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void showAddFriendDialog();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GOOGLEWRAPPER_H
|
#endif // GOOGLEWRAPPER_H
|
||||||
|
@@ -94,12 +94,12 @@ public slots:
|
|||||||
void broadcastMsg( const QString &msg );
|
void broadcastMsg( const QString &msg );
|
||||||
void addContact( const QString &jid, const QString& msg = QString() );
|
void addContact( const QString &jid, const QString& msg = QString() );
|
||||||
void refreshProxy();
|
void refreshProxy();
|
||||||
|
void showAddFriendDialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Ui_JabberConfig* m_ui; // so the google wrapper can change the config dialog a bit
|
Ui_JabberConfig* m_ui; // so the google wrapper can change the config dialog a bit
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showAddFriendDialog();
|
|
||||||
void showXmlConsole();
|
void showXmlConsole();
|
||||||
void onConnect();
|
void onConnect();
|
||||||
void onDisconnect(Jreen::Client::DisconnectReason reason);
|
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