service-manager-icons.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. diff -Nuar service-manager2/src/servicemanager/widgets.py service-manager_1/src/servicemanager/widgets.py
  2. --- service-manager2/src/servicemanager/widgets.py 2018-01-05 16:35:19.604039000 +0300
  3. +++ service-manager_1/src/servicemanager/widgets.py 2018-01-10 14:26:25.363986480 +0300
  4. @@ -14,6 +14,7 @@
  5. # Qt Stuff
  6. from PyQt5 import QtWidgets
  7. from PyQt5.QtCore import *
  8. +from PyQt5.QtGui import *
  9. # Pds vs KDE
  10. import servicemanager.context as ctx
  11. @@ -64,10 +65,10 @@
  12. self.toggleButtons()
  13. - self.ui.buttonStart.setIcon(KIcon("media-playback-start"))
  14. - self.ui.buttonStop.setIcon(KIcon("media-playback-stop"))
  15. - self.ui.buttonReload.setIcon(KIcon("view-refresh"))
  16. - self.ui.buttonInfo.setIcon(KIcon("dialog-information"))
  17. + self.ui.buttonStart.setIcon(QIcon.fromTheme("media-playback-start"))
  18. + self.ui.buttonStop.setIcon(QIcon.fromTheme("media-playback-stop"))
  19. + self.ui.buttonReload.setIcon(QIcon.fromTheme("view-refresh"))
  20. + self.ui.buttonInfo.setIcon(QIcon.fromTheme("dialog-information"))
  21. self.toggled = False
  22. self.root = parent
  23. diff -Nuar service-manager2/src/service-manager.py service-manager_1/src/service-manager.py
  24. --- service-manager2/src/service-manager.py 2018-01-05 16:35:19.604039000 +0300
  25. +++ service-manager_1/src/service-manager.py 2018-01-10 15:22:42.377955703 +0300
  26. @@ -22,13 +22,9 @@
  27. import servicemanager.about as about
  28. # Qt Stuff
  29. +from PyQt5.QtWidgets import *
  30. from PyQt5.QtCore import pyqtSignal
  31. -
  32. -# Enable plugin if session is Kde4
  33. -if ctx.Pds.session == ctx.pds.Kde4:
  34. - def CreatePlugin(widget_parent, parent, component_data):
  35. - from servicemanager.kcmodule import ServiceManager
  36. - return ServiceManager(component_data, parent)
  37. +from PyQt5.QtGui import *
  38. if __name__ == '__main__':
  39. @@ -37,45 +33,20 @@
  40. from dbus.mainloop.pyqt5 import DBusQtMainLoop
  41. DBusQtMainLoop(set_as_default = True)
  42. - # Pds vs KDE
  43. - if ctx.Pds.session == ctx.pds.Kde4:
  44. -
  45. - # PyKDE4 Stuff
  46. - from PyKDE4.kdeui import *
  47. - from PyKDE4.kdecore import *
  48. -
  49. - # Application Stuff
  50. - from servicemanager.standalone import ServiceManager
  51. - from servicemanager.about import aboutData
  52. -
  53. - # Set Command-line arguments
  54. - KCmdLineArgs.init(sys.argv, aboutData)
  55. -
  56. - # Create a Kapplitcation instance
  57. - app = KApplication()
  58. -
  59. - # Create Main Widget
  60. - mainWindow = ServiceManager(None, aboutData.appName)
  61. - mainWindow.show()
  62. -
  63. - else:
  64. -
  65. - # Application Stuff
  66. - from servicemanager.base import MainManager
  67. + # Application Stuff
  68. + from servicemanager.base import MainManager
  69. # Pds Stuff
  70. - from pds.quniqueapp import QUniqueApplication
  71. - from servicemanager.context import KIcon, i18n
  72. -
  73. - # Create a QUniqueApllication instance
  74. - app = QUniqueApplication(sys.argv, catalog=about.appName)
  75. -
  76. + from pds.quniqueapp import QUniqueApplication
  77. + from servicemanager.context import i18n
  78. + # Create a QUniqueApllication instance
  79. + app = QUniqueApplication(sys.argv, catalog=about.appName)
  80. # Create Main Widget and make some settings
  81. - mainWindow = MainManager(None)
  82. - mainWindow.show()
  83. - mainWindow.resize(640, 480)
  84. - mainWindow.setWindowTitle(i18n(about.PACKAGE))
  85. - mainWindow.setWindowIcon(KIcon(about.icon))
  86. + mainWindow = MainManager(None)
  87. + mainWindow.resize(640, 480)
  88. + mainWindow.setWindowTitle(i18n(about.PACKAGE))
  89. + mainWindow.setWindowIcon(QIcon('/usr/share/pixmaps/flag-yellow'))
  90. + mainWindow.show()
  91. # Create connection for lastWindowClosed signal to quit app
  92. app.lastWindowClosed.connect(app.quit)