示例#1
0
void KviWindow::systemTextEncodingPopupActivated(QAction * pAction)
{
    if(!pAction || pAction == g_pMdiWindowSystemTextEncodingCurrentAction)
        return;
    if(pAction == g_pMdiWindowSystemTextEncodingDefaultAction)
    {
        setTextEncoding("");
    } else {
        QString szTmp = pAction->text();
        KviQString::cutFromFirst(szTmp," (");
        setTextEncoding(szTmp);
    }
}
示例#2
0
void KviWindow::loadProperties(KviConfigurationFile * pCfg)
{
	QString szCodec = pCfg->readEntry("TextEncoding", KviQString::Empty);
	if(szCodec.isEmpty())
	{
		// try to load kvirc 4.0's entry
		QString szKey = "TextEncoding_";
		szKey += m_szName;
		szCodec = pCfg->readEntry(szKey, KviQString::Empty);
	}

	setTextEncoding(szCodec.toUtf8().data());
	if(m_pInput)
	{
		m_pInput->setButtonsHidden(pCfg->readBoolEntry("inputToolButtonsHidden", KVI_OPTION_BOOL(KviOption_boolHideInputToolButtons)));
		m_pInput->setUserFriendly(pCfg->readBoolEntry("commandLineIsUserFriendly", KVI_OPTION_BOOL(KviOption_boolCommandlineInUserFriendlyModeByDefault)));
	}
	/*
	if(m_pIrcView && m_eType == KviWindow::Channel)
	{
		bool bEnableLogs = pCfg->readBoolEntry("LoggingEnabled",0);
		if(!m_pIrcView->isLogging() && bEnableLogs)
		{
			QString szTmp;
			getBaseLogFileName(szTmp);
			m_pIrcView->startLogging();
		}
	}
	*/
}