From: <hep...@us...> - 2008-12-19 00:47:54
|
Revision: 593 http://qterm.svn.sourceforge.net/qterm/?rev=593&view=rev Author: hephooey Date: 2008-12-19 00:47:48 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Remove unused variables Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2008-12-19 00:47:31 UTC (rev 592) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2008-12-19 00:47:48 UTC (rev 593) @@ -34,9 +34,6 @@ { Global * Global::m_Instance = 0; -static const QString dbusServiceName = "org.kde.VisualNotifications"; -static const QString dbusInterfaceName = "org.kde.VisualNotifications"; -static const QString dbusPath = "/VisualNotifications"; Global * Global::instance() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-02-23 17:56:55
|
Revision: 626 http://qterm.svn.sourceforge.net/qterm/?rev=626&view=rev Author: hephooey Date: 2009-02-23 17:56:50 +0000 (Mon, 23 Feb 2009) Log Message: ----------- Simplify the code a little bit Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-02-23 17:56:44 UTC (rev 625) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-02-23 17:56:50 UTC (rev 626) @@ -685,13 +685,7 @@ setEscapeString(""); strTmp = m_config->getItemValue("global", "clipcodec").toString(); - if (strTmp == "0") { - setClipConversion(Global::No_Conversion); - } else if (strTmp == "1") { - setClipConversion(Global::Simplified_To_Traditional); - } else if (strTmp == "2") { - setClipConversion(Global::Traditional_To_Simplified); - } + setClipConversion((Global::Conversion)strTmp.toInt()); strTmp = m_config->getItemValue("global", "vscrollpos").toString(); if (strTmp == "0") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-04-30 02:35:16
|
Revision: 721 http://qterm.svn.sourceforge.net/qterm/?rev=721&view=rev Author: hephooey Date: 2009-04-30 02:35:09 +0000 (Thu, 30 Apr 2009) Log Message: ----------- Do not try to close KWallet when the service is not available Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-04-27 00:15:11 UTC (rev 720) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-04-30 02:35:09 UTC (rev 721) @@ -840,7 +840,8 @@ void Global::cleanup() { #ifdef KWALLET_ENABLED - m_wallet->close(); + if (m_wallet != NULL) + m_wallet->close(); #endif // KWALLET_ENABLED if (m_pref.bClearPool) { clearDir(m_pref.strZmPath); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-05 17:56:43
|
Revision: 858 http://qterm.svn.sourceforge.net/qterm/?rev=858&view=rev Author: hephooey Date: 2009-06-05 17:56:35 +0000 (Fri, 05 Jun 2009) Log Message: ----------- Use desktop service when the http browser is not specified Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-05 17:56:19 UTC (rev 857) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-05 17:56:35 UTC (rev 858) @@ -23,6 +23,7 @@ #include <QtCore/QTranslator> #include <QtCore/QVariant> #include <QtGui/QApplication> +#include <QtGui/QDesktopServices> #include <QtGui/QFileDialog> #include <QtGui/QMessageBox> @@ -850,23 +851,32 @@ } } -void Global::openUrl(const QString & url) +void Global::openUrl(const QString & urlStr) { QString command = m_pref.strHttp; + if (command.isEmpty()) { + QUrl url(urlStr,QUrl::TolerantMode); + if (!QDesktopServices::openUrl(url)) { + qDebug("Failed to open the url with QDesktopServices"); + } + return; + } + +#if !defined(_OS_WIN32_) && !defined(Q_OS_WIN32) if(command.indexOf("%L")==-1) // no replace //QApplication::clipboard()->setText(strUrl); - command += " \"" + url +"\""; + command += " \"" + urlStr +"\""; else - command.replace("%L", "\"" + url + "\""); + command.replace("%L", "\"" + urlStr + "\""); //cstrCmd.replace("%L", strUrl.toLocal8Bit()); - //qDebug()<<"run command " << strCmd; - //QProcess::startDetached(strCmd); - //TODO: How to do this in Windows? -#if !defined(_OS_WIN32_) && !defined(Q_OS_WIN32) command += " &"; + system(command.toUtf8().data()); +#else + // TODO: arguments? also get rid of "%L" + QProcess::startDetached(m_pref.strHttp, urlStr); #endif - system(command.toUtf8().data()); + } QString Global::convert(const QString & source, Global::Conversion flag) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-07 04:49:49
|
Revision: 878 http://qterm.svn.sourceforge.net/qterm/?rev=878&view=rev Author: hephooey Date: 2009-06-07 04:49:41 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Do not try to load the system script if there is none Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:49:35 UTC (rev 877) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:49:41 UTC (rev 878) @@ -236,6 +236,9 @@ strTmp = m_address->getItemValue(strSection, "loadscript").toString(); param.m_bLoadScript = (strTmp != "0"); param.m_strScriptFile = m_address->getItemValue(strSection, "scriptfile").toString(); + if (param.m_strScriptFile.isEmpty()) { + param.m_bLoadScript = false; + } strTmp = m_address->getItemValue(strSection, "menutype").toString(); param.m_nMenuType = strTmp.toInt(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-12-25 08:05:01
|
Revision: 1065 http://qterm.svn.sourceforge.net/qterm/?rev=1065&view=rev Author: hephooey Date: 2009-12-25 08:04:55 +0000 (Fri, 25 Dec 2009) Log Message: ----------- Different path structure when qterm.cfg and qterm are in the same directory. Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-25 08:04:51 UTC (rev 1064) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-25 08:04:55 UTC (rev 1065) @@ -489,6 +489,15 @@ m_pathLib = fi.path() + '/'; #else QString prefix = QCoreApplication::applicationDirPath(); + + QFileInfo conf(prefix+"/qterm.cfg"); + if (conf.exists()) { + QString path= QCoreApplication::applicationDirPath()+"/"; + m_pathLib = path; + m_pathPic = path; + m_pathCfg = path; + } + prefix.chop(3); // "bin" m_pathCfg = QDir::homePath() + "/.qterm/"; if (!isPathExist(m_pathCfg)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-12-26 16:22:52
|
Revision: 1084 http://qterm.svn.sourceforge.net/qterm/?rev=1084&view=rev Author: hephooey Date: 2009-12-26 16:22:43 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Use pointSize to set fontSize Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-25 23:53:05 UTC (rev 1083) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-26 16:22:43 UTC (rev 1084) @@ -576,13 +576,10 @@ //set font QString family = m_config->getItemValue("global", "font").toString(); QString pointsize = m_config->getItemValue("global", "pointsize").toString(); - QString pixelsize = m_config->getItemValue("global", "pixelsize").toString(); if (!family.isEmpty()) { QFont font(family); if (pointsize.toInt() > 0) font.setPointSize(pointsize.toInt()); - if (pixelsize.toInt() > 0) - font.setPixelSize(pixelsize.toInt()); QString bAA = m_config->getItemValue("global", "antialias").toString(); if (bAA != "0") font.setStyleStrategy(QFont::PreferAntialias); @@ -811,8 +808,6 @@ m_config->setItemValue("global", "font", qApp->font().family()); strTmp.setNum(QFontInfo(qApp->font()).pointSize()); m_config->setItemValue("global", "pointsize", strTmp); - strTmp.setNum(QFontInfo(qApp->font()).pixelSize()); - m_config->setItemValue("global", "pixelsize", strTmp); if (isFullScreen()) m_config->setItemValue("global", "fullscreen", "1"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2010-01-25 00:42:13
|
Revision: 1161 http://qterm.svn.sourceforge.net/qterm/?rev=1161&view=rev Author: hephooey Date: 2010-01-25 00:32:26 +0000 (Mon, 25 Jan 2010) Log Message: ----------- Rearrange the order of qm files Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-01-24 04:06:54 UTC (rev 1160) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-01-25 00:32:26 UTC (rev 1161) @@ -566,23 +566,23 @@ m_language = Global::English; } if (lang != "eng" && !lang.isEmpty()) { - // look in $HOME/.qterm/po/ first - QString qterm_qm = QDir::homePath() + "/.qterm/po/qterm_" + lang + ".qm"; - if (!QFile::exists(qterm_qm)) - qterm_qm = m_pathLib + "po/qterm_" + lang + ".qm"; - static QTranslator * translator = new QTranslator(0); - translator->load(qterm_qm); - qApp->installTranslator(translator); - QString qt_qm; if (lang == "chs") qt_qm = QLibraryInfo::location(QLibraryInfo::TranslationsPath)+"/qt_zh_CN.qm"; else qt_qm = QLibraryInfo::location(QLibraryInfo::TranslationsPath)+"/qt_zh_TW.qm"; - translator = new QTranslator(0); + static QTranslator * translator = new QTranslator(0); translator->load(qt_qm); qApp->installTranslator(translator); + + // look in $HOME/.qterm/po/ first + QString qterm_qm = QDir::homePath() + "/.qterm/po/qterm_" + lang + ".qm"; + if (!QFile::exists(qterm_qm)) + qterm_qm = m_pathLib + "po/qterm_" + lang + ".qm"; + translator = new QTranslator(0); + translator->load(qterm_qm); + qApp->installTranslator(translator); } //set font QString family = m_config->getItemValue("global", "font").toString(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-07-30 09:06:00
|
Revision: 1216 http://qterm.svn.sourceforge.net/qterm/?rev=1216&view=rev Author: sidos Date: 2010-07-30 09:05:54 +0000 (Fri, 30 Jul 2010) Log Message: ----------- create new xml doc if pathLib address.xml does not exist Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-07-30 06:46:35 UTC (rev 1215) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-07-30 09:05:54 UTC (rev 1216) @@ -315,32 +315,28 @@ if (!dir.exists(m_addrCfg)) return createLocalFile(m_addrXml, m_pathLib + "address.xml"); } - // import xml address book + // try import xml address book QDomDocument doc; + QDomElement addresses; QFile file(m_addrXml); - if (!file.open(QIODevice::ReadOnly)) - return false; - if (!doc.setContent(&file)) { - file.close(); - return false; - } - file.close(); + if (file.open(QIODevice::ReadOnly) && doc.setContent(&file)) { + addresses = doc.documentElement(); + } else { + QDomProcessingInstruction instr = + doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); + doc.appendChild(instr); + addresses = doc.createElement("addresses"); + doc.appendChild(addresses); + } // Combine cfg address book m_address = new Config(m_addrCfg); int num = m_address->getItemValue("bbs list", "num").toInt(); - //QDomProcessingInstruction instr = - // doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); - //doc.appendChild(instr); - //QDomElement addresses = doc.createElement("addresses"); - //doc.appendChild(addresses); - - QDomElement addresses = doc.documentElement(); - QDomElement imported = doc.createElement("folder"); imported.setAttribute("name", tr("imported sites")); + addresses.insertBefore(imported, QDomNode()); for (int i = -1; i < num; i++) { Param param; @@ -361,14 +357,14 @@ addresses.appendChild(site); } - QFile ofile(m_addrXml); - if (!ofile.open(QIODevice::WriteOnly)) - return false; - QByteArray xml = doc.toByteArray(); - QTextStream stream(&ofile); - stream << xml; - ofile.close(); - +// QFile ofile(m_addrXml); +// if (!ofile.open(QIODevice::WriteOnly)) +// return false; +// QByteArray xml = doc.toByteArray(); +// QTextStream stream(&ofile); +// stream << xml; +// ofile.close(); + saveAddressXml(doc); delete m_address; return true; } @@ -559,12 +555,13 @@ m_fileCfg = m_pathCfg + "qterm.cfg"; if (!createLocalFile(m_fileCfg, m_pathLib + "qterm.cfg")) return false; - //m_addrCfg = m_pathCfg + "address.cfg"; + m_addrCfg = m_pathCfg + "address.cfg"; //if (!createLocalFile(m_addrCfg, m_pathLib + "address.cfg")) // return false; m_addrXml = m_pathCfg + "address.xml"; //if (!createLocalFile(m_addrXml, m_pathLib + "address.xml")) // return false; + if (!convertAddressBook2XML()) return false; return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2011-10-15 21:08:51
|
Revision: 1294 http://qterm.svn.sourceforge.net/qterm/?rev=1294&view=rev Author: sidos Date: 2011-10-15 21:08:45 +0000 (Sat, 15 Oct 2011) Log Message: ----------- pathLib is relative to mac app bundle Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2011-10-11 03:49:43 UTC (rev 1293) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2011-10-15 21:08:45 UTC (rev 1294) @@ -433,6 +433,7 @@ { QDir dir; QFileInfo fi; + QString prefix = QCoreApplication::applicationDirPath(); #ifdef Q_OS_MACX // $HOME/Library/QTerm/ QString pathHome = QDir::homePath(); @@ -441,10 +442,8 @@ return false; // get executive file path - fi.setFile(param); - m_pathLib = fi.path() + '/'; + m_pathLib = prefix + "/../Resources"; #else - QString prefix = QCoreApplication::applicationDirPath(); QFileInfo conf(prefix+"/qterm.cfg"); if (conf.exists()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-07 04:50:14
|
Revision: 877 http://qterm.svn.sourceforge.net/qterm/?rev=877&view=rev Author: hephooey Date: 2009-06-07 04:49:35 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Compile with MSVC Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:49:30 UTC (rev 876) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:49:35 UTC (rev 877) @@ -22,6 +22,8 @@ #include <QtCore/QFileInfo> #include <QtCore/QTranslator> #include <QtCore/QVariant> +#include <QtCore/QUrl> +#include <QtCore/QProcess> #include <QtGui/QApplication> #include <QtGui/QDesktopServices> #include <QtGui/QFileDialog> @@ -884,7 +886,7 @@ system(command.toUtf8().data()); #else // TODO: arguments? also get rid of "%L" - QProcess::startDetached(m_pref.strHttp, urlStr); + QProcess::startDetached(m_pref.strHttp, QStringList() << urlStr); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-07 04:51:01
|
Revision: 885 http://qterm.svn.sourceforge.net/qterm/?rev=885&view=rev Author: hephooey Date: 2009-06-07 04:50:30 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Connect to the first site if it exists Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:50:19 UTC (rev 884) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-07 04:50:30 UTC (rev 885) @@ -145,10 +145,13 @@ bool Global::loadAddress(int n, Param& param) { QString strTmp, strSection; - if (n < 0) + strTmp = m_address->getItemValue("bbs list", "num").toString(); + if (n < 0 && strTmp.toInt() <= 0) strSection = "default"; - else + else { + n = n < 0 ? 0 : n; strSection.sprintf("bbs %d", n); + } // check if larger than existence strTmp = m_address->getItemValue("bbs list", "num").toString(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-10 15:13:30
|
Revision: 912 http://qterm.svn.sourceforge.net/qterm/?rev=912&view=rev Author: hephooey Date: 2009-06-09 14:57:44 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Translate Yes and No Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-09 14:57:39 UTC (rev 911) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-09 14:57:44 UTC (rev 912) @@ -426,7 +426,7 @@ while (fi.exists()) { int yn = QMessageBox::warning(widget, "QTerm", - tr("File exists. Overwrite?"), "Yes", "No"); + tr("File exists. Overwrite?"), tr("Yes"), tr("No")); if (yn == 0) break; strSave = QFileDialog::getSaveFileName(widget, tr("Choose a file to save under"), path + "/" + filename, "*"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-06-20 19:38:39
|
Revision: 953 http://qterm.svn.sourceforge.net/qterm/?rev=953&view=rev Author: hephooey Date: 2009-06-20 19:38:38 +0000 (Sat, 20 Jun 2009) Log Message: ----------- Debug--, compile++ Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-20 18:55:44 UTC (rev 952) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-06-20 19:38:38 UTC (rev 953) @@ -492,7 +492,6 @@ #else QString prefix = QCoreApplication::applicationDirPath(); prefix.chop(3); // "bin" - qDebug() << prefix; m_pathCfg = QDir::homePath() + "/.qterm/"; if (!isPathExist(m_pathCfg)) return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-10-19 18:58:11
|
Revision: 988 http://qterm.svn.sourceforge.net/qterm/?rev=988&view=rev Author: hephooey Date: 2009-10-19 18:58:00 +0000 (Mon, 19 Oct 2009) Log Message: ----------- Save the keyboard profile Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-10-19 18:16:46 UTC (rev 987) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-10-19 18:58:00 UTC (rev 988) @@ -191,6 +191,7 @@ strTmp = m_address->getItemValue(strSection, "fontsize").toString(); param.m_nFontSize = strTmp.toInt(); param.m_strSchemeFile = m_address->getItemValue(strSection, "schemefile").toString(); + param.m_strKeyboardProfile = m_address->getItemValue(strSection, "keyboardprofile").toString(); param.m_strTerm = m_address->getItemValue(strSection, "termtype").toString(); strTmp = m_address->getItemValue(strSection, "keytype").toString(); @@ -288,6 +289,7 @@ strTmp.setNum(param.m_nFontSize); m_address->setItemValue(strSection, "fontsize", strTmp); m_address->setItemValue(strSection, "schemefile", param.m_strSchemeFile); + m_address->setItemValue(strSection, "keyboardprofile", param.m_strKeyboardProfile); m_address->setItemValue(strSection, "termtype", param.m_strTerm); strTmp.setNum(param.m_nKey); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-12-13 02:09:39
|
Revision: 1015 http://qterm.svn.sourceforge.net/qterm/?rev=1015&view=rev Author: hephooey Date: 2009-12-13 02:09:28 +0000 (Sun, 13 Dec 2009) Log Message: ----------- The condition is always true now Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-13 02:09:12 UTC (rev 1014) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-13 02:09:28 UTC (rev 1015) @@ -573,11 +573,9 @@ font.setPointSize(pointsize.toInt()); if (pixelsize.toInt() > 0) font.setPixelSize(pixelsize.toInt()); -#if (QT_VERSION>=300) QString bAA = m_config->getItemValue("global", "antialias").toString(); if (bAA != "0") font.setStyleStrategy(QFont::PreferAntialias); -#endif qApp->setFont(font); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2009-12-25 20:18:04
|
Revision: 1076 http://qterm.svn.sourceforge.net/qterm/?rev=1076&view=rev Author: hephooey Date: 2009-12-25 20:17:56 +0000 (Fri, 25 Dec 2009) Log Message: ----------- Return after we get the path Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-25 20:17:52 UTC (rev 1075) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2009-12-25 20:17:56 UTC (rev 1076) @@ -496,6 +496,7 @@ m_pathLib = path; m_pathPic = path; m_pathCfg = path; + return true; } prefix.chop(3); // "bin" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2010-01-24 04:07:01
|
Revision: 1160 http://qterm.svn.sourceforge.net/qterm/?rev=1160&view=rev Author: hephooey Date: 2010-01-24 04:06:54 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Load the qt translation Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-01-24 04:06:49 UTC (rev 1159) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-01-24 04:06:54 UTC (rev 1160) @@ -24,6 +24,7 @@ #include <QtCore/QVariant> #include <QtCore/QUrl> #include <QtCore/QProcess> +#include <QtCore/QLibraryInfo> #include <QtGui/QApplication> #include <QtGui/QDesktopServices> #include <QtGui/QFileDialog> @@ -566,12 +567,22 @@ } if (lang != "eng" && !lang.isEmpty()) { // look in $HOME/.qterm/po/ first - QString qm = QDir::homePath() + "/.qterm/po/qterm_" + lang + ".qm"; - if (!QFile::exists(qm)) - qm = m_pathLib + "po/qterm_" + lang + ".qm"; + QString qterm_qm = QDir::homePath() + "/.qterm/po/qterm_" + lang + ".qm"; + if (!QFile::exists(qterm_qm)) + qterm_qm = m_pathLib + "po/qterm_" + lang + ".qm"; static QTranslator * translator = new QTranslator(0); - translator->load(qm); + translator->load(qterm_qm); qApp->installTranslator(translator); + + QString qt_qm; + if (lang == "chs") + qt_qm = QLibraryInfo::location(QLibraryInfo::TranslationsPath)+"/qt_zh_CN.qm"; + else + qt_qm = QLibraryInfo::location(QLibraryInfo::TranslationsPath)+"/qt_zh_TW.qm"; + + translator = new QTranslator(0); + translator->load(qt_qm); + qApp->installTranslator(translator); } //set font QString family = m_config->getItemValue("global", "font").toString(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2010-07-30 01:15:05
|
Revision: 1213 http://qterm.svn.sourceforge.net/qterm/?rev=1213&view=rev Author: hephooey Date: 2010-07-30 01:14:58 +0000 (Fri, 30 Jul 2010) Log Message: ----------- Convert to string explicitly Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-07-30 01:09:27 UTC (rev 1212) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-07-30 01:14:58 UTC (rev 1213) @@ -209,8 +209,8 @@ if (key == "password" && m_wallet != NULL) { m_wallet->open(); param.m_mapParam["password"] = m_wallet->readPassword( - param.m_mapParam["name"], - param.m_mapParam["user"]); + param.m_mapParam["name"].toString(), + param.m_mapParam["user"].toString()); } else #endif // KWALLET_ENABLED param.m_mapParam[key] = m_address->getItemValue(strSection,key); @@ -232,9 +232,9 @@ if (key == "password" && m_wallet != NULL) { m_wallet->open(); m_wallet->writePassword( - param.m_mapParam["name"], - param.m_mapParam["user"], - param.m_mapParam["password"]); + param.m_mapParam["name"].toString(), + param.m_mapParam["user"].toString(), + param.m_mapParam["password"].toString()); } else #endif m_address->setItemValue(strSection, key, param.m_mapParam[key]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-08-02 06:51:11
|
Revision: 1219 http://qterm.svn.sourceforge.net/qterm/?rev=1219&view=rev Author: sidos Date: 2010-08-02 06:51:05 +0000 (Mon, 02 Aug 2010) Log Message: ----------- xml encoding auto detection Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-07-30 14:13:00 UTC (rev 1218) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-08-02 06:51:05 UTC (rev 1219) @@ -114,10 +114,7 @@ QDomDocument doc; QFile file(m_addrXml); if (file.open(QIODevice::ReadOnly)) { - QTextStream in; - in.setCodec("UTF-8"); - in.setDevice(&file); - doc.setContent(in.readAll()); + doc.setContent(&file); file.close(); } return doc; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2010-08-06 00:16:05
|
Revision: 1231 http://qterm.svn.sourceforge.net/qterm/?rev=1231&view=rev Author: hephooey Date: 2010-08-06 00:16:00 +0000 (Fri, 06 Aug 2010) Log Message: ----------- Initialize the wallet before using it, crash-- Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-08-06 00:15:54 UTC (rev 1230) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-08-06 00:16:00 UTC (rev 1231) @@ -67,6 +67,14 @@ m_windowState(), m_status(INIT_OK), m_style(), m_fullScreen(false), m_language(Global::English) { +#ifdef KWALLET_ENABLED + if (Wallet::isWalletAvailable()) { + qDebug() << "KWallet service found"; + m_wallet = new Wallet(this); + } else { + m_wallet = NULL; + } +#endif // KWALLET_ENABLED if (!iniWorkingDir(qApp->arguments()[0])) { m_status = INIT_ERROR; return; @@ -77,14 +85,6 @@ m_config = new Config(m_fileCfg); m_address = new Config(m_addrCfg); m_converter = new Convert(); -#ifdef KWALLET_ENABLED - if (Wallet::isWalletAvailable()) { - qDebug() << "KWallet service found"; - m_wallet = new Wallet(this); - } else { - m_wallet = NULL; - } -#endif // KWALLET_ENABLED if (!iniSettings()) { m_status = INIT_ERROR; return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2010-08-13 13:43:02
|
Revision: 1244 http://qterm.svn.sourceforge.net/qterm/?rev=1244&view=rev Author: sidos Date: 2010-08-13 13:42:56 +0000 (Fri, 13 Aug 2010) Log Message: ----------- fix a bug that system address.xml is never merged Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-08-13 13:25:43 UTC (rev 1243) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-08-13 13:42:56 UTC (rev 1244) @@ -306,26 +306,26 @@ bool Global::convertAddressBook2XML() { QDir dir; - if (dir.exists(m_addrXml)) + if (dir.exists(m_addrXml))// do nothing if address.xml existed return true; else { - if (!dir.exists(m_addrCfg)) + if (!dir.exists(m_addrCfg)) // simply copy from system if even address.cfg not existed return createLocalFile(m_addrXml, m_pathLib + "address.xml"); } - // try import xml address book + // import system address.xml or create new one QDomDocument doc; QDomElement addresses; - QFile file(m_addrXml); - if (file.open(QIODevice::ReadOnly) && doc.setContent(&file)) { - addresses = doc.documentElement(); - } else { - QDomProcessingInstruction instr = + QFile file(m_pathLib + "address.xml"); + if (file.open(QIODevice::ReadOnly) && doc.setContent(&file)) { + addresses = doc.documentElement(); + } else { + QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\""); - doc.appendChild(instr); + doc.appendChild(instr); - addresses = doc.createElement("addresses"); - doc.appendChild(addresses); - } + addresses = doc.createElement("addresses"); + doc.appendChild(addresses); + } // Combine cfg address book m_address = new Config(m_addrCfg); int num = m_address->getItemValue("bbs list", "num").toInt(); @@ -354,13 +354,6 @@ addresses.appendChild(site); } -// QFile ofile(m_addrXml); -// if (!ofile.open(QIODevice::WriteOnly)) -// return false; -// QByteArray xml = doc.toByteArray(); -// QTextStream stream(&ofile); -// stream << xml; -// ofile.close(); saveAddressXml(doc); delete m_address; return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2010-12-20 04:37:39
|
Revision: 1260 http://qterm.svn.sourceforge.net/qterm/?rev=1260&view=rev Author: hephooey Date: 2010-12-20 04:37:33 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Fix KWallet Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2010-11-04 14:24:02 UTC (rev 1259) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2010-12-20 04:37:33 UTC (rev 1260) @@ -158,8 +158,16 @@ for (int i=0; i<nodeList.count(); i++) { QDomElement node = nodeList.at(i).toElement(); if (uuid == node.attribute("uuid")) - foreach (QString key, param.m_mapParam.keys()) + foreach (QString key, param.m_mapParam.keys()) { + #ifdef KWALLET_ENABLED + if (key == "password" && m_wallet != NULL) { + m_wallet->open(); + param.m_mapParam["password"] = m_wallet->readPassword( + node.attribute("name"), node.attribute("user")); + } else + #endif // KWALLET_ENABLED param.m_mapParam[key] = node.attribute(key); + } } return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hep...@us...> - 2011-03-05 05:25:07
|
Revision: 1276 http://qterm.svn.sourceforge.net/qterm/?rev=1276&view=rev Author: hephooey Date: 2011-03-05 05:25:01 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Add new options when we convert to xml format Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2011-03-05 05:24:56 UTC (rev 1275) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2011-03-05 05:25:01 UTC (rev 1276) @@ -295,6 +295,8 @@ foreach(QString key,param.m_mapParam.keys()) site.setAttribute(key, param.m_mapParam[key].toString()); + site.setAttribute("opacity","100"); + site.setAttribute("blinkcursor","true"); addresses.appendChild(site); } saveAddressXml(doc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <si...@us...> - 2011-11-14 11:37:25
|
Revision: 1305 http://qterm.svn.sourceforge.net/qterm/?rev=1305&view=rev Author: sidos Date: 2011-11-14 11:37:19 +0000 (Mon, 14 Nov 2011) Log Message: ----------- ending "/" IS important Modified Paths: -------------- trunk/qterm-qt4/src/qtermglobal.cpp Modified: trunk/qterm-qt4/src/qtermglobal.cpp =================================================================== --- trunk/qterm-qt4/src/qtermglobal.cpp 2011-11-14 10:44:15 UTC (rev 1304) +++ trunk/qterm-qt4/src/qtermglobal.cpp 2011-11-14 11:37:19 UTC (rev 1305) @@ -442,7 +442,7 @@ return false; // get executive file path - m_pathLib = prefix + "/../Resources"; + m_pathLib = prefix + "/../Resources/"; #else QFileInfo conf(prefix+"/qterm.cfg"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |