Merged with default branch. conda

Wed, 06 Feb 2019 19:35:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 06 Feb 2019 19:35:51 +0100
branch
conda
changeset 6704
772563b2eb0a
parent 6701
af29cf6ca309 (current diff)
parent 6703
31b0306f0ecc (diff)
child 6705
8cf1c3851b5c

Merged with default branch.

--- a/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitNewProjectOptionsDialog.py	Wed Feb 06 19:35:51 2019 +0100
@@ -117,8 +117,17 @@
         @param txt current text of the combo box
         @type str
         """
-        url = QUrl.fromUserInput(txt)
-        enable = url.isValid() and url.scheme() in ConfigGitSchemes
+        enable = False
+        
+        if txt:
+            url = QUrl.fromUserInput(txt)
+            if url.isValid():
+                if url.scheme() in ConfigGitSchemes:
+                    enable = True
+            elif ':' in txt:
+                # assume scp like repository URL
+                enable = True
+        
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
         self.vcsUrlButton.setEnabled(url.scheme() == "file" or len(txt) == 0)
--- a/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/Plugins/VcsPlugins/vcsGit/GitSubmoduleAddDialog.py	Wed Feb 06 19:35:51 2019 +0100
@@ -77,8 +77,17 @@
         @param txt current text of the combo box
         @type str
         """
-        url = QUrl.fromUserInput(txt)
-        enable = url.isValid() and url.scheme() in ConfigGitSchemes
+        enable = False
+        
+        if txt:
+            url = QUrl.fromUserInput(txt)
+            if url.isValid():
+                if url.scheme() in ConfigGitSchemes:
+                    enable = True
+            elif ':' in txt:
+                # assume scp like repository URL
+                enable = True
+        
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
         self.submoduleUrlButton.setEnabled(url.scheme() == "file" or
--- a/Toolbox/Startup.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/Toolbox/Startup.py	Wed Feb 06 19:35:51 2019 +0100
@@ -24,6 +24,8 @@
 
 from eric6config import getConfig
 
+application = None
+
 
 def usage(appinfo, optlen=12):
     """
@@ -220,11 +222,14 @@
         handler dialog (boolean)
     @return exit result (integer)
     """
+    global application
+    
     handleArgs(argv, appinfo)
     if app is None:
         # set the library paths for plugins
         setLibraryPaths()
         app = E5Application(argv)
+        application = app
     app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
     
     # the following code depends upon a valid application object
--- a/eric6.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/eric6.py	Wed Feb 06 19:35:51 2019 +0100
@@ -74,6 +74,7 @@
 mainWindow = None
 splash = None
 inMainLoop = None
+app = None
 
 if "--debug" in sys.argv:
     del sys.argv[sys.argv.index("--debug")]
@@ -258,7 +259,7 @@
     from Globals import AppInfo
     import Globals
     
-    global args, mainWindow, splash, restartArgs, inMainLoop
+    global app, args, mainWindow, splash, restartArgs, inMainLoop
     
     sys.excepthook = excepthook
     
--- a/eric6_browser.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/eric6_browser.py	Wed Feb 06 19:35:51 2019 +0100
@@ -35,6 +35,8 @@
 
 from Globals import qVersionTuple
 
+app = None
+
 
 if qVersionTuple() < (5, 6, 0):
     if "--quiet" not in sys.argv:
@@ -158,6 +160,8 @@
     """
     Main entry point into the application.
     """
+    global app
+    
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
--- a/eric6_trpreviewer.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/eric6_trpreviewer.py	Wed Feb 06 19:35:51 2019 +0100
@@ -46,6 +46,8 @@
 
 from Toolbox import Startup
 
+app = None
+
 
 def createMainWidget(argv):
     """
@@ -69,6 +71,8 @@
     """
     Main entry point into the application.
     """
+    global app
+    
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),
--- a/eric6_webbrowser.py	Tue Feb 05 19:58:26 2019 +0100
+++ b/eric6_webbrowser.py	Wed Feb 06 19:35:51 2019 +0100
@@ -80,6 +80,8 @@
 
 from Helpviewer.HelpSingleApplication import HelpSingleApplicationClient
 
+app = None
+
 
 def createMainWidget(argv):
     """
@@ -134,6 +136,8 @@
     """
     Main entry point into the application.
     """
+    global app
+    
     options = [
         ("--config=configDir",
          "use the given directory as the one containing the config files"),

eric ide

mercurial