8 this file is part of the project scolasync
10 Copyright (C) 2010 Georges Khaznadar <georgesk@ofset.org>
12 This program is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version3 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 from globaldef
import _dir
30 from xml.dom.minidom
import parse
38 QDialog.__init__(self, parent)
39 from Ui_help
import Ui_Aide
42 self.ui.labelVersion.setText(QApplication.translate(
"Main",
"Version numéro %1.%2",
None, QApplication.UnicodeUTF8).arg(version.major(), version.minor()))
44 QObject.connect(self.ui.closeButton, SIGNAL(
"clicked()"), self.close)
54 self.ui.usageBrowser.setHtml(QUrl(
"file://"+dir+
"/usage_"+locale+
".html"))
55 self.ui.authorsBrowser.setHtml(QUrl(
"file://"+dir+
"/authors_"+locale+
".html"))
56 self.ui.licenseBrowser.setHtml(QUrl(
"file://"+dir+
"/license_"+locale+
".html"))
57 self.ui.languagesBrowser.setHtml(QUrl(
"file://"+dir+
"/languages_"+locale+
".html"))
60 manuals=parse(dir+
"/manual_"+locale+
".html")
61 dl=manuals.documentElement.getElementsByTagName(
"dl")[0]
62 dd=dl.getElementsByTagName(
"dd")[1]
63 a=dd.getElementsByTagName(
"a")[0]
64 a.setAttribute(
"href", self.parent().manFileLocation)
66 self.ui.manualBrowser.setText(manuals.toxml())