def on_menuitem_help_about_activated(self, menuitem):
dlg = Gtk.AboutDialog()
dlg.set_program_name(_("PIA Manager"))
dlg.set_icon_name("pia-manager")
dlg.set_transient_for(self.window)
dlg.set_logo_icon_name("pia-manager")
dlg.set_website("http://www.github.com/linuxmint/pia-manager")
try:
for path in ["/usr/share/common-licenses/GPL-3"]:
if os.path.exists(path):
h = open(path, 'r')
s = h.readlines()
gpl = ""
for line in s:
gpl += line
h.close()
dlg.set_license(gpl)
except Exception as e:
print (e)
print(sys.exc_info()[0])
if os.path.exists("/usr/lib/linuxmint/common/version.py"):
version = subprocess.getoutput("/usr/lib/linuxmint/common/version.py pia-manager")
dlg.set_version(version)
def close(w, res):
if res == Gtk.ResponseType.CANCEL or res == Gtk.ResponseType.DELETE_EVENT:
w.hide()
dlg.connect("response", close)
dlg.show()
评论列表
文章目录