Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37393355
en ru br
Репозитории ALT
S:0.403-alt2.qa3
5.1: 0.403-alt2.qa1
4.1: 0.403-alt2.qa1
www.altlinux.org/Changes

Группа :: Обучение
Пакет: kseg

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: kseg-setFilePath.patch
Скачать


diff -ur kseg/KSegWindow.cpp kseg.orig/KSegWindow.cpp
--- kseg/KSegWindow.cpp	2007-06-08 14:07:49 +0400
+++ kseg.orig/KSegWindow.cpp	2007-06-08 14:46:58 +0400
@@ -950,17 +950,16 @@
 void KSegWindow::help()
 {
   QString langChars = KSegProperties::getProperty("Language").mid(5, 2);
-  QString helpSource = KSegProperties::getProperty("LanguageDir") + "/kseg_help_";
-  helpSource = helpSource + langChars + ".html";
+  QString langDir = KSegProperties::getProperty("LanguageDir");
+  QString helpSource = "kseg_help_" + langChars + ".html";
   //the above assumes the language is kseg_??.qm and the helpfile is in the language directory
   
-  if(QFileInfo(helpSource).exists() == false)
-    helpSource = KSegProperties::getProperty("LanguageDir") + "/kseg_help_en.html";
+  if(QFileInfo(langDir + "/" + helpSource).exists() == false)
+    helpSource = "kseg_help_en.html";
 
-  if(QFileInfo(helpSource).exists() == false) {
+  if(QFileInfo(langDir + "/" + helpSource).exists() == false) {
     QMessageBox::warning(0, tr("File Not Found"),
-			 tr("Sorry, I am afraid that file %1 does not exist.").arg(helpSource),
-			 QMessageBox::Ok, 0);    
+			 tr("Sorry, I am afraid that file '%1' does not exist at '%2' directory.").arg(helpSource,langDir), QMessageBox::Ok, 0);    
 
     return;
   }
@@ -973,6 +972,7 @@
     charset = "text/html;charset=Windows-1254";
 
   QTextBrowser *b = new QTextBrowser();
+  b->mimeSourceFactory()->setFilePath(langDir);
   b->mimeSourceFactory()->setExtensionType("html", charset);
   b->setSource(helpSource);
   b->setCaption(b->documentTitle());
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin