Mercurial > hg > easyhg-kdiff3
comparison kdiff3/src-QT4/kreplacements/kreplacements.cpp @ 92:4e6ebbbae925 0.9.95
KDiff3 0.9.95
author | joachim99 |
---|---|
date | Tue, 03 Mar 2009 23:50:12 +0000 |
parents | fcd146072e0c |
children | 6f42f5bd218e |
comparison
equal
deleted
inserted
replaced
91:fa1a49fc1ec1 | 92:4e6ebbbae925 |
---|---|
111 pBrowser->setSource(QUrl("file://usr/local/share/doc/kdiff3/en/index.html")); | 111 pBrowser->setSource(QUrl("file://usr/local/share/doc/kdiff3/en/index.html")); |
112 pBrowser->show(); | 112 pBrowser->show(); |
113 #endif | 113 #endif |
114 } | 114 } |
115 | 115 |
116 QString getTranslationDir() | 116 QString getTranslationDir(const QString& locale) |
117 { | 117 { |
118 #ifdef _WIN32 | 118 #ifdef _WIN32 |
119 wchar_t buf[200]; | 119 wchar_t buf[200]; |
120 int r= SearchPathW( 0, L".", 0, sizeof(buf)/sizeof(wchar_t), buf, 0 ); | 120 int r= SearchPathW( 0, L".", 0, sizeof(buf)/sizeof(wchar_t), buf, 0 ); |
121 | 121 |
123 QString exePath; | 123 QString exePath; |
124 if (r!=0) { exePath = QString::fromUtf16( (ushort*)&buf[0] ); } | 124 if (r!=0) { exePath = QString::fromUtf16( (ushort*)&buf[0] ); } |
125 else { exePath = "."; } | 125 else { exePath = "."; } |
126 return exePath+"/translations"; | 126 return exePath+"/translations"; |
127 #else | 127 #else |
128 return "."; | 128 return (QString)"/usr/share/locale/" + locale + "/LC_MESSAGES"; |
129 #endif | 129 #endif |
130 } | 130 } |
131 | 131 |
132 // static | 132 // static |
133 void KMessageBox::error( QWidget* parent, const QString& text, const QString& caption ) | 133 void KMessageBox::error( QWidget* parent, const QString& text, const QString& caption ) |