MultiProject/MultiProject.py

changeset 6653
ac800d2700d2
parent 6652
dfc89403b426
child 6836
93b8c77502e0
diff -r dfc89403b426 -r ac800d2700d2 MultiProject/MultiProject.py
--- a/MultiProject/MultiProject.py	Sat Jan 12 18:25:04 2019 +0100
+++ b/MultiProject/MultiProject.py	Sat Jan 12 19:32:22 2019 +0100
@@ -304,11 +304,14 @@
         self.__projects[project['uid']] = project
     
     @pyqtSlot()
-    def addNewProject(self, startdir=None):
+    def addNewProject(self, startdir="", category=""):
         """
         Public slot used to add a new project to the multi-project.
         
-        @param startdir start directory for the selection dialog (string)
+        @param startdir start directory for the selection dialog
+        @type str
+        @param category category to be preset
+        @type str
         """
         from .AddProjectDialog import AddProjectDialog
         if not startdir:
@@ -316,7 +319,7 @@
         if not startdir:
             startdir = Preferences.getMultiProject("Workspace")
         dlg = AddProjectDialog(self.ui, startdir=startdir,
-                               categories=self.categories)
+                               categories=self.categories, category=category)
         if dlg.exec_() == QDialog.Accepted:
             name, filename, isMaster, description, category, uid = \
                 dlg.getData()

eric ide

mercurial