From 8e97d10fde0caeeac703ad8c7ea620d4cc1644be Mon Sep 17 00:00:00 2001 From: Filippo Bedendo Bordon Date: Fri, 1 Jul 2011 17:57:47 +0200 Subject: [PATCH] Add System Info --- src/mambatray | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/mambatray b/src/mambatray index 5a82995..130bbc8 100755 --- a/src/mambatray +++ b/src/mambatray @@ -5,6 +5,7 @@ # Distributed under the terms of the GPL version 3 FLOSS License # import sys +import os import gettext from PyQt4.QtCore import SIGNAL from PyQt4 import QtGui @@ -15,7 +16,7 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon): def __init__(self, icon, parent=None): global w, menu, contatore, srpm, lista, NetsrpmsArg, nOre nOre = 2 - srpm = ["skype", "flashplugin", "win32codecs"] + srpm = ["skype", "flashplugin", "win32codecs", "msttcorefonts", "b43-firmware"] NetsrpmsArg = "-c" lista = [] contatore = 0 @@ -90,10 +91,31 @@ class SystemTrayIcon(QtGui.QSystemTrayIcon): menu.popup(self.geometry().center()) def about(self): + global version + path = '/etc/openmamba-release' + if os.path.exists(path): + v = open(path, 'r') + version = v.read() + a = self.FormattaInfo() + version = "" + v.close() + else: + version = "Error: Unable to find /etc/openmamba-release" QtGui.QMessageBox.about(menu, _("About"), "
"+_("openmamba control center")+"" "

Copyright(c) 2011 by Silvan Calarco" - "

http://www.openmamba.org
") + "
Copyright(c) 2011 by michiamophil" + "

"+_("System info:")+"" + ""+_(version)+"
http://www.openmamba.org
") + + def FormattaInfo(self): + result = [] + v = version + #result[0]=versione + result.append(v[ v.find("openmamba ")+10 : v.find(" for") ] + " " + v[ v.find("(") : v.find(")")+1 ]) + #result[1] = piattaforma + result.append(v[ v.find("for")+4 : v.find("(") ]) + return result def softwareManager(self): softwareManagerProcess.execute("/opt/kde/bin/kpackagekit")