Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37044641
en ru br
Репозитории ALT
S:2.0.0.11-alt2
5.1: 0.9.6-alt5.M51.1
4.1: 0.9.6-alt5.M41.1
4.0: 0.9.6-alt5.M40.1
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: basic256

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

Патч: basic256-0.9.6-alt-offline-help-system.patch
Скачать


--- trunk/DocumentationWin.cpp.orig	2010-06-30 22:21:59 +0400
+++ trunk/DocumentationWin.cpp	2010-11-04 13:32:35 +0300
@@ -25,25 +25,21 @@ using namespace std;
 DocumentationWin::DocumentationWin (QWidget * parent)
 		:QDialog(parent)
 {
-	//QString localecode = ((MainWindow *) parent)->localecode;
-	
+	QString localecode = ((MainWindow *) parent)->localecode;
+	QString helpfile;
+
 	resize(700,500);
-	
-	docs = new QWebView();
 
-	toolbar = new QToolBar(tr("Help Navigation"));
-    toolbar->addAction(docs->pageAction(QWebPage::Back));
-    toolbar->addAction(docs->pageAction(QWebPage::Forward));
-	//
-	layout = new QVBoxLayout;
-    layout->addWidget(toolbar);
-    layout->addWidget(docs);
-
-    this->setLayout(layout);
-    this->show();
-	
-	docs->load(QString("http://doc.basic256.org"));
-	docs->show();
-	
+	docs = new QTextBrowser( this );
+	helpfile = "index.html";
+
+	docs->setSearchPaths(QStringList() << "./help" << "/usr/share/basic256/help/"+localecode.left(2) << "/usr/share/basic256/help/en");
+	docs->setSource(QUrl(QString(helpfile)));
+}
+
+void DocumentationWin::resizeEvent(QResizeEvent *e) {
+	docs->resize(size());
 }
 
+
+
--- trunk/DocumentationWin.h.orig	2010-06-30 22:21:59 +0400
+++ trunk/DocumentationWin.h	2010-11-04 13:40:50 +0300
@@ -19,15 +19,7 @@
 
 #include <QWidget>
 #include <QDialog>
-#include <QFile>
-#include <QWebView>
-#include <QVBoxLayout>
-#include <QToolBar>
-#include <QLabel>
-#include <QLineEdit>
-#include <QAction>
-#include <QObject>
-#include <QIcon>
+#include <QTextBrowser>
 
 #ifndef DOCUMENTATIONWINH
 
@@ -36,16 +28,15 @@
 class DocumentationWin : public QDialog
 {
   Q_OBJECT;
- public:
-  DocumentationWin(QWidget * parent);
+  public:
+	DocumentationWin(QWidget * parent);
+	void resizeEvent(QResizeEvent *e);
 
-private slots:
-  
- private:
-  QVBoxLayout* layout;
-  QToolBar* toolbar;
-  QWebView* docs;
+  public slots:
 
+  private:
+	QTextBrowser* docs;
 };
 
 #endif
+
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin