Changed logic of the Subversion options dialogs to disallow entering of the protocol in the URL field.

Sun, 03 Mar 2013 12:36:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 03 Mar 2013 12:36:51 +0100
changeset 2452
fd1cd8a279db
parent 2451
4d80de2f9122
child 2453
e0b775cb733b

Changed logic of the Subversion options dialogs to disallow entering of the protocol in the URL field.

Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.ui file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.ui file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.ui file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.ui file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py	Sun Mar 03 12:36:51 2013 +0100
@@ -10,7 +10,7 @@
 import os
 
 from PyQt4.QtCore import QDir, pyqtSlot
-from PyQt4.QtGui import QDialog
+from PyQt4.QtGui import QDialog, QDialogButtonBox
 
 from E5Gui.E5Completers import E5DirCompleter
 from E5Gui import E5FileDialog
@@ -124,6 +124,16 @@
                 self.vcsUrlEdit.setText(self.networkPath)
                 self.vcsUrlLabel.setText(self.trUtf8("&URL:"))
                 self.localProtocol = False
+    
+    @pyqtSlot(str)
+    def on_vcsUrlEdit_textChanged(self, txt):
+        """
+        Private slot to handle changes of the URL.
+        
+        @param txt current text of the line edit (string)
+        """
+        enable = "://" not in txt
+        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.ui	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.ui	Sun Mar 03 12:36:51 2013 +0100
@@ -65,7 +65,7 @@
      <item row="1" column="1">
       <widget class="QLineEdit" name="vcsUrlEdit">
        <property name="toolTip">
-        <string>Enter the url path of the module in the repository</string>
+        <string>Enter the url path of the module in the repository (without protocol part)</string>
        </property>
        <property name="whatsThis">
         <string>&lt;b&gt;URL&lt;/b&gt;&lt;p&gt;Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.&lt;/p&gt;</string>
--- a/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py	Sun Mar 03 12:36:51 2013 +0100
@@ -10,7 +10,7 @@
 import os
 
 from PyQt4.QtCore import QDir, pyqtSlot
-from PyQt4.QtGui import QDialog
+from PyQt4.QtGui import QDialog, QDialogButtonBox
 
 from E5Gui.E5Completers import E5DirCompleter
 from E5Gui import E5FileDialog
@@ -96,6 +96,16 @@
                 self.vcsUrlEdit.setText(self.networkPath)
                 self.vcsUrlLabel.setText(self.trUtf8("&URL:"))
                 self.localProtocol = False
+    
+    @pyqtSlot(str)
+    def on_vcsUrlEdit_textChanged(self, txt):
+        """
+        Private slot to handle changes of the URL.
+        
+        @param txt current text of the line edit (string)
+        """
+        enable = "://" not in txt
+        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.ui	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.ui	Sun Mar 03 12:36:51 2013 +0100
@@ -104,7 +104,7 @@
      <item row="1" column="1">
       <widget class="QLineEdit" name="vcsUrlEdit">
        <property name="toolTip">
-        <string>Enter the url path of the module in the repository</string>
+        <string>Enter the url path of the module in the repository (without protocol part)</string>
        </property>
        <property name="whatsThis">
         <string>&lt;b&gt;URL&lt;/b&gt;&lt;p&gt;Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.&lt;/p&gt;</string>
--- a/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py	Sun Mar 03 12:36:51 2013 +0100
@@ -10,7 +10,7 @@
 import os
 
 from PyQt4.QtCore import QDir, pyqtSlot
-from PyQt4.QtGui import QDialog
+from PyQt4.QtGui import QDialog, QDialogButtonBox
 
 from E5Gui.E5Completers import E5DirCompleter
 from E5Gui import E5FileDialog
@@ -124,6 +124,16 @@
                 self.vcsUrlEdit.setText(self.networkPath)
                 self.vcsUrlLabel.setText(self.trUtf8("&URL:"))
                 self.localProtocol = False
+    
+    @pyqtSlot(str)
+    def on_vcsUrlEdit_textChanged(self, txt):
+        """
+        Private slot to handle changes of the URL.
+        
+        @param txt current text of the line edit (string)
+        """
+        enable = "://" not in txt
+        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.ui	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.ui	Sun Mar 03 12:36:51 2013 +0100
@@ -62,7 +62,7 @@
      <item row="1" column="1">
       <widget class="QLineEdit" name="vcsUrlEdit">
        <property name="toolTip">
-        <string>Enter the url path of the module in the repository</string>
+        <string>Enter the url path of the module in the repository (without protocol part)</string>
        </property>
        <property name="whatsThis">
         <string>&lt;b&gt;URL&lt;/b&gt;&lt;p&gt;Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.&lt;/p&gt;</string>
--- a/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py	Sun Mar 03 12:36:51 2013 +0100
@@ -10,7 +10,7 @@
 import os
 
 from PyQt4.QtCore import QDir, pyqtSlot
-from PyQt4.QtGui import QDialog
+from PyQt4.QtGui import QDialog, QDialogButtonBox
 
 from E5Gui.E5Completers import E5DirCompleter
 from E5Gui import E5FileDialog
@@ -96,6 +96,16 @@
                 self.vcsUrlEdit.setText(self.networkPath)
                 self.vcsUrlLabel.setText(self.trUtf8("&URL:"))
                 self.localProtocol = False
+    
+    @pyqtSlot(str)
+    def on_vcsUrlEdit_textChanged(self, txt):
+        """
+        Private slot to handle changes of the URL.
+        
+        @param txt current text of the line edit (string)
+        """
+        enable = "://" not in txt
+        self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable)
         
     def getData(self):
         """
--- a/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.ui	Sun Mar 03 12:18:34 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.ui	Sun Mar 03 12:36:51 2013 +0100
@@ -104,7 +104,7 @@
      <item row="1" column="1">
       <widget class="QLineEdit" name="vcsUrlEdit">
        <property name="toolTip">
-        <string>Enter the url path of the module in the repository</string>
+        <string>Enter the url path of the module in the repository (without protocol part)</string>
        </property>
        <property name="whatsThis">
         <string>&lt;b&gt;URL&lt;/b&gt;&lt;p&gt;Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.&lt;/p&gt;</string>

eric ide

mercurial