about.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/usr/bin/python2
  2. # coding=utf-8
  3. #
  4. # The Qubes OS Project, http://www.qubes-os.org
  5. #
  6. # Copyright (C) 2015 Marek Marczykowski-Górecki
  7. # <marmarek@invisiblethingslab.com>
  8. #
  9. # This program is free software; you can redistribute it and/or
  10. # modify it under the terms of the GNU General Public License
  11. # as published by the Free Software Foundation; either version 2
  12. # of the License, or (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. #
  23. #
  24. from PyQt4.QtCore import SIGNAL, SLOT
  25. from PyQt4.QtGui import QDialog, QIcon
  26. from qubesmanager.releasenotes import ReleaseNotesDialog
  27. from qubesmanager.informationnotes import InformationNotesDialog
  28. from qubesmanager.networknotes import NetworkNotesDialog
  29. from ui_about import *
  30. class AboutDialog(Ui_AboutDialog, QDialog):
  31. def __init__(self):
  32. super(AboutDialog, self).__init__()
  33. self.setupUi(self)
  34. self.icon.setPixmap(QIcon().fromTheme("qubes-manager").pixmap(96))
  35. with open('/etc/qubes-release', 'r') as release_file:
  36. self.release.setText(release_file.read())
  37. self.connect(self.ok, SIGNAL("clicked()"), SLOT("accept()"))
  38. self.connect(self.releaseNotes, SIGNAL("clicked()"),
  39. self.on_release_notes_clicked)
  40. self.connect(self.informationNotes, SIGNAL("clicked()"),
  41. self.on_information_notes_clicked)
  42. self.connect(self.networkNotes, SIGNAL("clicked()"),
  43. self.on_network_notes_clicked)
  44. def on_release_notes_clicked(self):
  45. release_notes_dialog = ReleaseNotesDialog()
  46. release_notes_dialog.exec_()
  47. self.accept()
  48. def on_information_notes_clicked(self):
  49. information_notes_dialog = InformationNotesDialog()
  50. information_notes_dialog.exec_()
  51. self.accept()
  52. def on_network_notes_clicked(self):
  53. network_notes_dialog = NetworkNotesDialog()
  54. network_notes_dialog.exec_()
  55. self.accept()