UI/UserInterface.py

changeset 1939
eadb2328d7d4
parent 1926
474057fbefe0
child 2094
88620e11c67c
--- a/UI/UserInterface.py	Mon Jul 09 18:54:06 2012 +0200
+++ b/UI/UserInterface.py	Tue Jul 10 19:06:38 2012 +0200
@@ -5534,6 +5534,25 @@
                             """The configuration dialog will be started."""))
             self.showPreferences()
     
+    def checkProjectsWorkspace(self):
+        """
+        Public method to check, if a projects workspace has been configured. If
+        it has not, a dialog is shown.
+        """
+        if not Preferences.isConfigured():
+            # eric hasn't been configured at all
+            self.checkConfigurationStatus()
+        
+        workspace = Preferences.getMultiProject("Workspace")
+        if workspace == "":
+            default = Utilities.getHomeDir()
+            workspace = E5FileDialog.getExistingDirectory(
+                None,
+                self.trUtf8("Select Workspace Directory"),
+                default,
+                E5FileDialog.Options(E5FileDialog.Option(0)))
+            Preferences.setMultiProject("Workspace", workspace)
+    
     def versionIsNewer(self, required, snapshot=None):
         """
         Public method to check, if the eric5 version is good compared to

eric ide

mercurial