fixed-icon-issue.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. diff -Nuar service-manager1/src/servicemanager/widgets.py service-manager2/src/servicemanager/widgets.py
  2. --- service-manager1/src/servicemanager/widgets.py 2018-01-05 16:35:19.604039000 +0300
  3. +++ src/servicemanager/widgets.py 2018-01-11 14:49:29.875104000 +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. @@ -104,7 +105,7 @@
  24. self.ui.buttonStop.setEnabled(self.running)
  25. self.ui.buttonReload.setEnabled(self.running)
  26. - self.ui.labelStatus.setPixmap(KIcon(icon).pixmap(32, 32))
  27. + self.ui.labelStatus.setPixmap(QIcon.fromTheme(icon).pixmap(32, 32))
  28. self.showStatus()
  29. self.runningAtStart = False
  30. if state in ('on', 'stopped'):
  31. @@ -182,7 +183,7 @@
  32. self.ui = Ui_InfoWidget()
  33. self.ui.setupUi(self)
  34. self.ui.buttonHide.clicked.connect(self.hideDescription)
  35. - self.ui.buttonHide.setIcon(KIcon("dialog-close"))
  36. + self.ui.buttonHide.setIcon(QIcon.fromTheme("dialog-close"))
  37. self._animation = 2
  38. self._duration = 500
  39. diff -Nuar service-manager1/src/service-manager.py service-manager2/src/service-manager.py
  40. --- service-manager1/src/service-manager.py 2018-01-05 16:35:19.604039000 +0300
  41. +++ src/service-manager.py 2018-01-11 13:06:16.000000000 +0300
  42. @@ -22,13 +22,9 @@
  43. import servicemanager.about as about
  44. # Qt Stuff
  45. +from PyQt5.QtWidgets import *
  46. from PyQt5.QtCore import pyqtSignal
  47. -
  48. -# Enable plugin if session is Kde4
  49. -if ctx.Pds.session == ctx.pds.Kde4:
  50. - def CreatePlugin(widget_parent, parent, component_data):
  51. - from servicemanager.kcmodule import ServiceManager
  52. - return ServiceManager(component_data, parent)
  53. +from PyQt5.QtGui import *
  54. if __name__ == '__main__':
  55. @@ -37,45 +33,20 @@
  56. from dbus.mainloop.pyqt5 import DBusQtMainLoop
  57. DBusQtMainLoop(set_as_default = True)
  58. - # Pds vs KDE
  59. - if ctx.Pds.session == ctx.pds.Kde4:
  60. -
  61. - # PyKDE4 Stuff
  62. - from PyKDE4.kdeui import *
  63. - from PyKDE4.kdecore import *
  64. -
  65. - # Application Stuff
  66. - from servicemanager.standalone import ServiceManager
  67. - from servicemanager.about import aboutData
  68. -
  69. - # Set Command-line arguments
  70. - KCmdLineArgs.init(sys.argv, aboutData)
  71. -
  72. - # Create a Kapplitcation instance
  73. - app = KApplication()
  74. -
  75. - # Create Main Widget
  76. - mainWindow = ServiceManager(None, aboutData.appName)
  77. - mainWindow.show()
  78. -
  79. - else:
  80. -
  81. - # Application Stuff
  82. - from servicemanager.base import MainManager
  83. + # Application Stuff
  84. + from servicemanager.base import MainManager
  85. # Pds Stuff
  86. - from pds.quniqueapp import QUniqueApplication
  87. - from servicemanager.context import KIcon, i18n
  88. -
  89. - # Create a QUniqueApllication instance
  90. - app = QUniqueApplication(sys.argv, catalog=about.appName)
  91. -
  92. + from pds.quniqueapp import QUniqueApplication
  93. + from servicemanager.context import i18n
  94. + # Create a QUniqueApllication instance
  95. + app = QUniqueApplication(sys.argv, catalog=about.appName)
  96. # Create Main Widget and make some settings
  97. - mainWindow = MainManager(None)
  98. - mainWindow.show()
  99. - mainWindow.resize(640, 480)
  100. - mainWindow.setWindowTitle(i18n(about.PACKAGE))
  101. - mainWindow.setWindowIcon(KIcon(about.icon))
  102. + mainWindow = MainManager(None)
  103. + mainWindow.resize(640, 480)
  104. + mainWindow.setWindowTitle(i18n(about.PACKAGE))
  105. + mainWindow.setWindowIcon(QIcon('/usr/share/pixmaps/flag-yellow'))
  106. + mainWindow.show()
  107. # Create connection for lastWindowClosed signal to quit app
  108. app.lastWindowClosed.connect(app.quit)