--- a/ProjectDjango/Project.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/Project.py Wed Apr 08 19:58:27 2020 +0200 @@ -99,17 +99,23 @@ RecentApplicationsKey = "Django/RecentApplications" RecentDatabaseNamesKey = "Django/RecentDatabaseNames" - def __init__(self, plugin, parent=None): + def __init__(self, plugin, iconSuffix, parent=None): """ Constructor @param plugin reference to the plugin object - @param parent parent (QObject) + @type ProjectDjangoPlugin + @param iconSuffix suffix for the icons + @type str + @param parent parent + @type QObject """ super(Project, self).__init__(parent) self.__plugin = plugin + self.__iconSuffix = iconSuffix self.__ui = parent + self.__e5project = e5App().getObject("Project") try: self.__virtualEnvManager = e5App().getObject("VirtualEnvManager") @@ -1594,7 +1600,8 @@ modal=True, buttons=E5MessageBox.Ok) msgBox.setIconPixmap(UI.PixmapCache.getPixmap( - os.path.join("ProjectDjango", "icons", "django64.png"))) + os.path.join("ProjectDjango", "icons", + "django64-{0}".format(self.__iconSuffix)))) msgBox.exec_() def getDjangoVersionString(self): @@ -2561,7 +2568,8 @@ from .DjangoMigrationSelectionDialog import \ DjangoMigrationSelectionDialog dlg = DjangoMigrationSelectionDialog(migrations, - migrationRequired=True) + migrationRequired=True, + suffix=self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, migration = dlg.getData() @@ -2640,7 +2648,8 @@ from .DjangoMigrationSelectionDialog import \ DjangoMigrationSelectionDialog - dlg = DjangoMigrationSelectionDialog(migrations) + dlg = DjangoMigrationSelectionDialog(migrations, + suffix=self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, migration = dlg.getData() self.applyMigrations(app=app, migration=migration) @@ -2818,7 +2827,7 @@ from .DjangoSquashMigrationSelectionDialog import \ DjangoSquashMigrationSelectionDialog dlg = DjangoSquashMigrationSelectionDialog( - migrations, self) + migrations, self, self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, start, end, noOptimize, name = dlg.getData()