123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- diff -Nuar service-manager2/src/servicemanager/widgets.py service-manager_1/src/servicemanager/widgets.py
- --- service-manager2/src/servicemanager/widgets.py 2018-01-05 16:35:19.604039000 +0300
- +++ service-manager_1/src/servicemanager/widgets.py 2018-01-10 14:26:25.363986480 +0300
- @@ -14,6 +14,7 @@
- # Qt Stuff
- from PyQt5 import QtWidgets
- from PyQt5.QtCore import *
- +from PyQt5.QtGui import *
-
- # Pds vs KDE
- import servicemanager.context as ctx
- @@ -64,10 +65,10 @@
-
- self.toggleButtons()
-
- - self.ui.buttonStart.setIcon(KIcon("media-playback-start"))
- - self.ui.buttonStop.setIcon(KIcon("media-playback-stop"))
- - self.ui.buttonReload.setIcon(KIcon("view-refresh"))
- - self.ui.buttonInfo.setIcon(KIcon("dialog-information"))
- + self.ui.buttonStart.setIcon(QIcon.fromTheme("media-playback-start"))
- + self.ui.buttonStop.setIcon(QIcon.fromTheme("media-playback-stop"))
- + self.ui.buttonReload.setIcon(QIcon.fromTheme("view-refresh"))
- + self.ui.buttonInfo.setIcon(QIcon.fromTheme("dialog-information"))
-
- self.toggled = False
- self.root = parent
- diff -Nuar service-manager2/src/service-manager.py service-manager_1/src/service-manager.py
- --- service-manager2/src/service-manager.py 2018-01-05 16:35:19.604039000 +0300
- +++ service-manager_1/src/service-manager.py 2018-01-10 15:22:42.377955703 +0300
- @@ -22,13 +22,9 @@
- import servicemanager.about as about
-
- # Qt Stuff
- +from PyQt5.QtWidgets import *
- from PyQt5.QtCore import pyqtSignal
- -
- -# Enable plugin if session is Kde4
- -if ctx.Pds.session == ctx.pds.Kde4:
- - def CreatePlugin(widget_parent, parent, component_data):
- - from servicemanager.kcmodule import ServiceManager
- - return ServiceManager(component_data, parent)
- +from PyQt5.QtGui import *
-
- if __name__ == '__main__':
-
- @@ -37,45 +33,20 @@
- from dbus.mainloop.pyqt5 import DBusQtMainLoop
- DBusQtMainLoop(set_as_default = True)
-
- - # Pds vs KDE
- - if ctx.Pds.session == ctx.pds.Kde4:
- -
- - # PyKDE4 Stuff
- - from PyKDE4.kdeui import *
- - from PyKDE4.kdecore import *
- -
- - # Application Stuff
- - from servicemanager.standalone import ServiceManager
- - from servicemanager.about import aboutData
- -
- - # Set Command-line arguments
- - KCmdLineArgs.init(sys.argv, aboutData)
- -
- - # Create a Kapplitcation instance
- - app = KApplication()
- -
- - # Create Main Widget
- - mainWindow = ServiceManager(None, aboutData.appName)
- - mainWindow.show()
- -
- - else:
- -
- - # Application Stuff
- - from servicemanager.base import MainManager
- + # Application Stuff
- + from servicemanager.base import MainManager
-
- # Pds Stuff
- - from pds.quniqueapp import QUniqueApplication
- - from servicemanager.context import KIcon, i18n
- -
- - # Create a QUniqueApllication instance
- - app = QUniqueApplication(sys.argv, catalog=about.appName)
- -
- + from pds.quniqueapp import QUniqueApplication
- + from servicemanager.context import i18n
- + # Create a QUniqueApllication instance
- + app = QUniqueApplication(sys.argv, catalog=about.appName)
- # Create Main Widget and make some settings
- - mainWindow = MainManager(None)
- - mainWindow.show()
- - mainWindow.resize(640, 480)
- - mainWindow.setWindowTitle(i18n(about.PACKAGE))
- - mainWindow.setWindowIcon(KIcon(about.icon))
- + mainWindow = MainManager(None)
- + mainWindow.resize(640, 480)
- + mainWindow.setWindowTitle(i18n(about.PACKAGE))
- + mainWindow.setWindowIcon(QIcon('/usr/share/pixmaps/flag-yellow'))
- + mainWindow.show()
-
- # Create connection for lastWindowClosed signal to quit app
- app.lastWindowClosed.connect(app.quit)
|