Esempio n. 1
0
tpanelglobal::tpanelglobal() : arrow_dim(0) {
	GetInfoIcon(&infoicon, &infoicon_img);
	GetReplyIcon(&replyicon, &replyicon_img);
	GetFavIcon(&favicon, &favicon_img);
	GetFavOnIcon(&favonicon, &favonicon_img);
	GetRetweetIcon(&retweeticon, &retweeticon_img);
	GetRetweetOnIcon(&retweetonicon, &retweetonicon_img);
	GetDMreplyIcon(&dmreplyicon, &dmreplyicon_img);
	GetLockIcon(&proticon, &proticon_img);
	GetUnlockIcon(&unlockicon, &unlockicon_img);
	GetVerifiedIcon(&verifiedicon, &verifiedicon_img);
	GetCloseIcon(&closeicon, 0);
	GetMultiUnreadIcon(&multiunreadicon, 0);
	GetPhotoIcon(&photoicon, &photoicon_img);
	GetPlayIcon(&playicon, 0);
}
Esempio n. 2
0
void TSLogging::Error(QString message, uint64 serverConnectionHandlerID, unsigned int error, bool isSoundSilent)
{

    if (error != NULL)
    {
        char* errorMsg;
        if(ts3Functions.getErrorMessage(error, &errorMsg) == ERROR_ok)
        {
            QTextStream(&message) << ": " << errorMsg;
            ts3Functions.freeMemory(errorMsg);
        }
    }

    Log(message,serverConnectionHandlerID,LogLevel_ERROR);
    if (!isSoundSilent)
        PlayErrorSound(serverConnectionHandlerID);

    // Format and print the error message
    if ((serverConnectionHandlerID == NULL) || (serverConnectionHandlerID == 0))
        serverConnectionHandlerID = ts3Functions.getCurrentServerConnectionHandlerID();
    if ((serverConnectionHandlerID == NULL) || (serverConnectionHandlerID == 0))
        return;

    // Use a transparent underscore because a double space will be collapsed
    QString styledQstr;

    QString infoIcon;
    if (!(GetInfoIcon(infoIcon)))
    {
        //Get Error
        QString msg = "TSLogging::Error:GetInfoIcon:" + TSSettings::instance()->GetLastError().text();
        ts3Functions.logMessage(msg.toLocal8Bit().constData(), LogLevel_ERROR, ts3plugin_name(), 0);
    }
    else
        QTextStream(&styledQstr) << "[img]" << infoIcon << "[/img]";

    QTime time = QTime::currentTime ();
    QString time_qstr = time.toString(Qt::TextDate);

    QTextStream(&styledQstr) << "[color=red]" << time_qstr << "[/color][color=transparent]_[/color]" << ": "  << ts3plugin_name() << ": " << message;
    ts3Functions.printMessage(serverConnectionHandlerID, styledQstr.toLocal8Bit().constData(), PLUGIN_MESSAGE_TARGET_SERVER);
}