aboutsummaryrefslogtreecommitdiffstats
path: root/mageiaSync
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-03-30 22:03:08 +0200
committerPapoteur <papoteur@mageialinux-online.org>2015-03-30 22:03:08 +0200
commite0f5dc52c99b2f6ab40544c261f50bdd9113a53a (patch)
tree7a88f0bf7635cb3316ea947434705f901185e8fb /mageiaSync
parent842ccc7c6d710de856ccdb457e20d15b4ee488bd (diff)
downloadMageiaSync-e0f5dc52c99b2f6ab40544c261f50bdd9113a53a.tar
MageiaSync-e0f5dc52c99b2f6ab40544c261f50bdd9113a53a.tar.gz
MageiaSync-e0f5dc52c99b2f6ab40544c261f50bdd9113a53a.tar.bz2
MageiaSync-e0f5dc52c99b2f6ab40544c261f50bdd9113a53a.tar.xz
MageiaSync-e0f5dc52c99b2f6ab40544c261f50bdd9113a53a.zip
Add About and Help dialog
Diffstat (limited to 'mageiaSync')
-rw-r--r--mageiaSync/mageiaSyncAbout.py73
-rw-r--r--mageiaSync/mageiaSyncAbout.ui133
-rw-r--r--mageiaSync/mageiaSyncCredits.py43
-rw-r--r--mageiaSync/mageiaSyncCredits.ui62
-rw-r--r--mageiaSync/mageiaSyncDBprefs.py14
-rw-r--r--mageiaSync/mageiaSyncDBprefs.ui24
-rw-r--r--mageiaSync/mageiaSyncUI.py6
-rw-r--r--mageiaSync/mageiaSyncUI.ui6
-rw-r--r--mageiaSync/mageiasync.py46
9 files changed, 385 insertions, 22 deletions
diff --git a/mageiaSync/mageiaSyncAbout.py b/mageiaSync/mageiaSyncAbout.py
new file mode 100644
index 0000000..a824ad9
--- /dev/null
+++ b/mageiaSync/mageiaSyncAbout.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'mageiaSyncAbout.ui'
+#
+# Created: Sun Mar 29 14:46:46 2015
+# by: PyQt5 UI code generator 5.1.1
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+class Ui_aboutDialog(object):
+ def setupUi(self, aboutDialog):
+ aboutDialog.setObjectName("aboutDialog")
+ aboutDialog.resize(452, 348)
+ self.verticalLayout = QtWidgets.QVBoxLayout(aboutDialog)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.verticalLayout_3 = QtWidgets.QVBoxLayout()
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.label_4 = QtWidgets.QLabel(aboutDialog)
+ self.label_4.setMaximumSize(QtCore.QSize(200, 200))
+ self.label_4.setText("")
+ self.label_4.setPixmap(QtGui.QPixmap("../../../../usr/share/icons/hicolor/scalable/apps/mageiasync.svg"))
+ self.label_4.setScaledContents(True)
+ self.label_4.setAlignment(QtCore.Qt.AlignCenter)
+ self.label_4.setContentsMargins(30, 30, 30, 30)
+ self.label_4.setIndent(0)
+ self.label_4.setObjectName("label_4")
+ self.horizontalLayout.addWidget(self.label_4)
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
+ self.label = QtWidgets.QLabel(aboutDialog)
+ font = QtGui.QFont()
+ font.setPointSize(11)
+ self.label.setFont(font)
+ self.label.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
+ self.label.setAlignment(QtCore.Qt.AlignCenter)
+ self.label.setObjectName("label")
+ self.verticalLayout_3.addWidget(self.label)
+ self.label_2 = QtWidgets.QLabel(aboutDialog)
+ self.label_2.setAlignment(QtCore.Qt.AlignCenter)
+ self.label_2.setObjectName("label_2")
+ self.verticalLayout_3.addWidget(self.label_2)
+ self.label_3 = QtWidgets.QLabel(aboutDialog)
+ self.label_3.setAlignment(QtCore.Qt.AlignCenter)
+ self.label_3.setObjectName("label_3")
+ self.verticalLayout_3.addWidget(self.label_3)
+ self.verticalLayout.addLayout(self.verticalLayout_3)
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.creditsButton = QtWidgets.QPushButton(aboutDialog)
+ self.creditsButton.setObjectName("creditsButton")
+ self.horizontalLayout_2.addWidget(self.creditsButton)
+ self.buttonBox = QtWidgets.QDialogButtonBox(aboutDialog)
+ self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
+ self.buttonBox.setCenterButtons(True)
+ self.buttonBox.setObjectName("buttonBox")
+ self.horizontalLayout_2.addWidget(self.buttonBox)
+ self.verticalLayout.addLayout(self.horizontalLayout_2)
+
+ self.retranslateUi(aboutDialog)
+ self.buttonBox.accepted.connect(aboutDialog.close)
+ QtCore.QMetaObject.connectSlotsByName(aboutDialog)
+
+ def retranslateUi(self, aboutDialog):
+ _translate = QtCore.QCoreApplication.translate
+ aboutDialog.setWindowTitle(_translate("aboutDialog", "MageiaSync"))
+ self.label.setText(_translate("aboutDialog", "mageiaSync"))
+ self.label_2.setText(_translate("aboutDialog", "A tool for loading ISO images. It is a frontend to rsync."))
+ self.label_3.setText(_translate("aboutDialog", "License: GNU GPL v3"))
+ self.creditsButton.setText(_translate("aboutDialog", "Credits"))
+
diff --git a/mageiaSync/mageiaSyncAbout.ui b/mageiaSync/mageiaSyncAbout.ui
new file mode 100644
index 0000000..a1e3105
--- /dev/null
+++ b/mageiaSync/mageiaSyncAbout.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>aboutDialog</class>
+ <widget class="QWidget" name="aboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>452</width>
+ <height>348</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MageiaSync</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap>../../../../usr/share/icons/hicolor/scalable/apps/mageiasync.svg</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>30</number>
+ </property>
+ <property name="indent">
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="font">
+ <font>
+ <pointsize>11</pointsize>
+ </font>
+ </property>
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="text">
+ <string>mageiaSync</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>A tool for loading ISO images. It is a frontend to rsync.</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>License: GNU GPL v3</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="creditsButton">
+ <property name="text">
+ <string>Credits</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ <property name="centerButtons">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>aboutDialog</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>225</x>
+ <y>319</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>225</x>
+ <y>172</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/mageiaSync/mageiaSyncCredits.py b/mageiaSync/mageiaSyncCredits.py
new file mode 100644
index 0000000..3094aff
--- /dev/null
+++ b/mageiaSync/mageiaSyncCredits.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'mageiaSyncCredits.ui'
+#
+# Created: Sun Mar 29 14:32:39 2015
+# by: PyQt5 UI code generator 5.1.1
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+class Ui_creditsDialog(object):
+ def setupUi(self, creditsDialog):
+ creditsDialog.setObjectName("creditsDialog")
+ creditsDialog.resize(452, 346)
+ self.verticalLayout = QtWidgets.QVBoxLayout(creditsDialog)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.verticalLayout_3 = QtWidgets.QVBoxLayout()
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
+ self.Readme = QtWidgets.QTextBrowser(creditsDialog)
+ self.Readme.setObjectName("Readme")
+ self.verticalLayout_3.addWidget(self.Readme)
+ self.verticalLayout.addLayout(self.verticalLayout_3)
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.buttonBox = QtWidgets.QDialogButtonBox(creditsDialog)
+ self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
+ self.buttonBox.setCenterButtons(True)
+ self.buttonBox.setObjectName("buttonBox")
+ self.horizontalLayout_2.addWidget(self.buttonBox)
+ self.verticalLayout.addLayout(self.horizontalLayout_2)
+
+ self.retranslateUi(creditsDialog)
+ self.buttonBox.accepted.connect(creditsDialog.close)
+ QtCore.QMetaObject.connectSlotsByName(creditsDialog)
+
+ def retranslateUi(self, creditsDialog):
+ _translate = QtCore.QCoreApplication.translate
+ creditsDialog.setWindowTitle(_translate("creditsDialog", "MageiaSync"))
+
diff --git a/mageiaSync/mageiaSyncCredits.ui b/mageiaSync/mageiaSyncCredits.ui
new file mode 100644
index 0000000..8ec0d78
--- /dev/null
+++ b/mageiaSync/mageiaSyncCredits.ui
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>creditsDialog</class>
+ <widget class="QWidget" name="creditsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>452</width>
+ <height>346</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MageiaSync</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout"/>
+ </item>
+ <item>
+ <widget class="QTextBrowser" name="Readme"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ <property name="centerButtons">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>creditsDialog</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>225</x>
+ <y>319</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>225</x>
+ <y>172</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/mageiaSync/mageiaSyncDBprefs.py b/mageiaSync/mageiaSyncDBprefs.py
index 0959421..9fcc3ba 100644
--- a/mageiaSync/mageiaSyncDBprefs.py
+++ b/mageiaSync/mageiaSyncDBprefs.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file '/documents/mageiasync/mageiaSync/mageiaSyncDBprefs.ui'
+# Form implementation generated from reading ui file 'mageiaSyncDBprefs.ui'
#
-# Created: Sun Dec 7 13:24:26 2014
+# Created: Mon Mar 30 21:56:57 2015
# by: PyQt5 UI code generator 5.1.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,16 +12,16 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_prefsDialog(object):
def setupUi(self, prefsDialog):
prefsDialog.setObjectName("prefsDialog")
- prefsDialog.resize(520, 234)
+ prefsDialog.resize(544, 336)
self.buttonBox = QtWidgets.QDialogButtonBox(prefsDialog)
- self.buttonBox.setGeometry(QtCore.QRect(10, 200, 511, 32))
+ self.buttonBox.setGeometry(QtCore.QRect(0, 270, 521, 31))
self.buttonBox.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setCenterButtons(True)
self.buttonBox.setObjectName("buttonBox")
self.formLayoutWidget = QtWidgets.QWidget(prefsDialog)
- self.formLayoutWidget.setGeometry(QtCore.QRect(9, 9, 501, 185))
+ self.formLayoutWidget.setGeometry(QtCore.QRect(10, 30, 511, 241))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
@@ -64,6 +64,7 @@ class Ui_prefsDialog(object):
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.selectDest = QtWidgets.QPushButton(self.formLayoutWidget)
self.selectDest.setToolTip("")
+ self.selectDest.setText("PushButton")
self.selectDest.setObjectName("selectDest")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.selectDest)
self.label_6 = QtWidgets.QLabel(self.formLayoutWidget)
@@ -94,7 +95,7 @@ class Ui_prefsDialog(object):
prefsDialog.setWindowTitle(_translate("prefsDialog", "Preferences"))
self.label.setToolTip(_translate("prefsDialog", "Give the release name like \"mageia5-alpha2\""))
self.label.setText(_translate("prefsDialog", "Release:"))
- self.label_2.setToolTip(_translate("prefsDialog", "User name to access the repository. Only for testing repository."))
+ self.label_2.setToolTip(_translate("prefsDialog", "User name to acces the repository. Only for testing repository."))
self.label_2.setText(_translate("prefsDialog", "User:"))
self.label_3.setToolTip(_translate("prefsDialog", "Associated with user, if needed"))
self.label_3.setText(_translate("prefsDialog", "Password:"))
@@ -102,7 +103,6 @@ class Ui_prefsDialog(object):
self.label_4.setText(_translate("prefsDialog", "Source:"))
self.label_5.setToolTip(_translate("prefsDialog", "The local directory where you store ISOs. Will sync your existent ISOs already present."))
self.label_5.setText(_translate("prefsDialog", "Destination:"))
- self.selectDest.setText(_translate("prefsDialog", "PushButton"))
self.label_6.setToolTip(_translate("prefsDialog", "Set to zero if you don\'t want apply limit."))
self.label_6.setText(_translate("prefsDialog", "Bandwith limit (kB/s):"))
self.label_7.setText(_translate("prefsDialog", "Define parameters which are stored and used for rsync"))
diff --git a/mageiaSync/mageiaSyncDBprefs.ui b/mageiaSync/mageiaSyncDBprefs.ui
index 581025a..8fa556d 100644
--- a/mageiaSync/mageiaSyncDBprefs.ui
+++ b/mageiaSync/mageiaSyncDBprefs.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>520</width>
- <height>234</height>
+ <width>544</width>
+ <height>336</height>
</rect>
</property>
<property name="windowTitle">
@@ -16,10 +16,10 @@
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
- <x>10</x>
- <y>200</y>
- <width>511</width>
- <height>32</height>
+ <x>0</x>
+ <y>270</y>
+ <width>521</width>
+ <height>31</height>
</rect>
</property>
<property name="locale">
@@ -38,10 +38,10 @@
<widget class="QWidget" name="formLayoutWidget">
<property name="geometry">
<rect>
- <x>9</x>
- <y>9</y>
- <width>501</width>
- <height>185</height>
+ <x>10</x>
+ <y>30</y>
+ <width>511</width>
+ <height>241</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
@@ -61,7 +61,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="toolTip">
- <string>User name to access the repository. Only for testing repository.</string>
+ <string>User name to acces the repository. Only for testing repository.</string>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
@@ -149,7 +149,7 @@
<string/>
</property>
<property name="text">
- <string>PushButton</string>
+ <string notr="true">PushButton</string>
</property>
</widget>
</item>
diff --git a/mageiaSync/mageiaSyncUI.py b/mageiaSync/mageiaSyncUI.py
index 53c6f10..07461d3 100644
--- a/mageiaSync/mageiaSyncUI.py
+++ b/mageiaSync/mageiaSyncUI.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'mageiaSyncUI.ui'
#
-# Created: Mon Mar 23 22:38:56 2015
+# Created: Sun Mar 29 15:53:06 2015
# by: PyQt5 UI code generator 5.1.1
#
# WARNING! All changes made in this file will be lost!
@@ -143,11 +143,14 @@ class Ui_mainWindow(object):
self.actionCheck.setObjectName("actionCheck")
self.actionAbout = QtWidgets.QAction(mainWindow)
self.actionAbout.setObjectName("actionAbout")
+ self.actionOnline_help = QtWidgets.QAction(mainWindow)
+ self.actionOnline_help.setObjectName("actionOnline_help")
self.menuFile.addAction(self.actionUpdate)
self.menuFile.addAction(self.actionPreferences)
self.menuFile.addAction(self.actionQuit)
self.menuSync.addAction(self.actionRename)
self.menuSync.addAction(self.actionCheck)
+ self.menuA_bout.addAction(self.actionOnline_help)
self.menuA_bout.addAction(self.actionAbout)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuSync.menuAction())
@@ -180,4 +183,5 @@ class Ui_mainWindow(object):
self.actionCheck.setText(_translate("mainWindow", "&Check"))
self.actionCheck.setToolTip(_translate("mainWindow", "Check selected images"))
self.actionAbout.setText(_translate("mainWindow", "A&bout"))
+ self.actionOnline_help.setText(_translate("mainWindow", "Online &help"))
diff --git a/mageiaSync/mageiaSyncUI.ui b/mageiaSync/mageiaSyncUI.ui
index 6e530bf..ffa737e 100644
--- a/mageiaSync/mageiaSyncUI.ui
+++ b/mageiaSync/mageiaSyncUI.ui
@@ -308,6 +308,7 @@
<property name="title">
<string>&amp;Help</string>
</property>
+ <addaction name="actionOnline_help"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
@@ -348,6 +349,11 @@
<string>A&amp;bout</string>
</property>
</action>
+ <action name="actionOnline_help">
+ <property name="text">
+ <string>Online &amp;help</string>
+ </property>
+ </action>
</widget>
<tabstops>
<tabstop>syncGo</tabstop>
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py
index 8f77458..fb2b658 100644
--- a/mageiaSync/mageiasync.py
+++ b/mageiaSync/mageiasync.py
@@ -2,8 +2,8 @@
from PyQt5.QtWidgets import ( QProgressDialog, QMainWindow,
QDialog, QFileDialog, QApplication)
-from PyQt5.QtGui import ( QStandardItemModel,QStandardItem, )
-from PyQt5.QtCore import ( QLibraryInfo, )
+from PyQt5.QtGui import ( QStandardItemModel,QStandardItem, QDesktopServices, )
+from PyQt5.QtCore import ( QLibraryInfo, QUrl )
from PyQt5 import QtCore # , Qt, QThread, QObject, pyqtSignal)
import sys
import mageiaSyncUI
@@ -11,6 +11,9 @@ import mageiaSyncExt
import mageiaSyncDBprefs
import mageiaSyncDBprefs0
import mageiaSyncDBrename
+import mageiaSyncAbout
+import mageiaSyncCredits
+
class prefsDialog(QDialog,mageiaSyncDBprefs.Ui_prefsDialog ):
@@ -34,6 +37,28 @@ class renameDialog(QDialog,mageiaSyncDBrename.Ui_renameDialog ):
self.setupUi(self)
self.chooseDir.clicked.connect(isosSync.renameDir)
+class aboutDialog(QDialog,mageiaSyncAbout.Ui_aboutDialog ):
+
+ def __init__(self, parent=None):
+ QDialog.__init__(self,parent)
+ self.setupUi(self)
+ self.creditsButton.clicked.connect(isosSync.credits)
+
+class creditsDialog(QDialog,mageiaSyncCredits.Ui_creditsDialog ):
+
+ def __init__(self, parent=None):
+ QDialog.__init__(self,parent)
+ self.setupUi(self)
+ text=''
+ try:
+ with open('/usr/share/doc/mageiasync/README.md', 'r') as f:
+ block = f.readlines()
+ for line in block:
+ text+= line
+ except:
+ pass
+ self.Readme.setText(text)
+
class LogWindow(QProgressDialog):
# Display a box at start during the remote directory list loading
@@ -365,6 +390,8 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
self.actionPreferences.triggered.connect(self.prefs)
self.syncGo.clicked.connect(self.launchSync)
self.selectAll.clicked.connect(self.selectAllIsos)
+ self.actionAbout.triggered.connect(self.about)
+ self.actionOnline_help.triggered.connect(self.help)
def updateList(self):
# From the menu entry
@@ -435,6 +462,21 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
self.updateList()
self.pd.close()
+ def about(self):
+ ad = aboutDialog()
+ answer=ad.exec_()
+ if answer:
+ ad.close()
+
+ def credits(self):
+ ad = creditsDialog()
+ answer=ad.exec_()
+ if answer:
+ ad.close()
+
+ def help(self):
+ # Open page in browser
+ l = QDesktopServices.openUrl(QUrl('http://wiki.mageia.org/en/MageiaSync'))
def launchSync(self):
self.IprogressBar.setEnabled(True)