Merged with more changes from Tobias.

Sun, 16 Oct 2016 12:20:30 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 16 Oct 2016 12:20:30 +0200
changeset 5243
f6346f4b46c2
parent 5241
883e7084818d (diff)
parent 5242
26630d91f4cf (current diff)
child 5244
54a0f215a6f0

Merged with more changes from Tobias.

--- a/APIs/Python3/eric6.api	Sat Oct 15 22:50:03 2016 +0200
+++ b/APIs/Python3/eric6.api	Sun Oct 16 12:20:30 2016 +0200
@@ -1310,6 +1310,7 @@
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.filters?4()
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.firstPath?4(toNative=True)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.isPickerEnabled?4()
+eric6.E5Gui.E5PathPicker.E5PathPickerBase.isReadOnly?4()
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.lastPath?4(toNative=True)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.mode?4()
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.path?4(toNative=True)
@@ -1329,6 +1330,7 @@
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setPath?4(path, toNative=True)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setPathsList?4(pathsList)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setPickerEnabled?4(enable)
+eric6.E5Gui.E5PathPicker.E5PathPickerBase.setReadOnly?4(readOnly)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setSizeAdjustPolicy?4(policy)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setText?4(path, toNative=True)
 eric6.E5Gui.E5PathPicker.E5PathPickerBase.setWindowTitle?4(title)
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Help/source.qhp	Sat Oct 15 22:50:03 2016 +0200
+++ b/Documentation/Help/source.qhp	Sun Oct 16 12:20:30 2016 +0200
@@ -4577,6 +4577,7 @@
       <keyword name="E5PathPickerBase.filters" id="E5PathPickerBase.filters" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.filters" />
       <keyword name="E5PathPickerBase.firstPath" id="E5PathPickerBase.firstPath" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.firstPath" />
       <keyword name="E5PathPickerBase.isPickerEnabled" id="E5PathPickerBase.isPickerEnabled" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.isPickerEnabled" />
+      <keyword name="E5PathPickerBase.isReadOnly" id="E5PathPickerBase.isReadOnly" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.isReadOnly" />
       <keyword name="E5PathPickerBase.lastPath" id="E5PathPickerBase.lastPath" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.lastPath" />
       <keyword name="E5PathPickerBase.mode" id="E5PathPickerBase.mode" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.mode" />
       <keyword name="E5PathPickerBase.path" id="E5PathPickerBase.path" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.path" />
@@ -4594,6 +4595,7 @@
       <keyword name="E5PathPickerBase.setPath" id="E5PathPickerBase.setPath" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setPath" />
       <keyword name="E5PathPickerBase.setPathsList" id="E5PathPickerBase.setPathsList" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setPathsList" />
       <keyword name="E5PathPickerBase.setPickerEnabled" id="E5PathPickerBase.setPickerEnabled" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setPickerEnabled" />
+      <keyword name="E5PathPickerBase.setReadOnly" id="E5PathPickerBase.setReadOnly" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setReadOnly" />
       <keyword name="E5PathPickerBase.setSizeAdjustPolicy" id="E5PathPickerBase.setSizeAdjustPolicy" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setSizeAdjustPolicy" />
       <keyword name="E5PathPickerBase.setText" id="E5PathPickerBase.setText" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setText" />
       <keyword name="E5PathPickerBase.setWindowTitle" id="E5PathPickerBase.setWindowTitle" ref="eric6.E5Gui.E5PathPicker.html#E5PathPickerBase.setWindowTitle" />
--- a/Documentation/Source/eric6.E5Gui.E5PathPicker.html	Sat Oct 15 22:50:03 2016 +0200
+++ b/Documentation/Source/eric6.E5Gui.E5PathPicker.html	Sun Oct 16 12:20:30 2016 +0200
@@ -254,6 +254,9 @@
 <td><a href="#E5PathPickerBase.isPickerEnabled">isPickerEnabled</a></td>
 <td>Public method to get the file dialog button enabled state.</td>
 </tr><tr>
+<td><a href="#E5PathPickerBase.isReadOnly">isReadOnly</a></td>
+<td>Public method to check the path picker for read only mode.</td>
+</tr><tr>
 <td><a href="#E5PathPickerBase.lastPath">lastPath</a></td>
 <td>Public method to get the last path of a list of entered paths.</td>
 </tr><tr>
@@ -305,6 +308,9 @@
 <td><a href="#E5PathPickerBase.setPickerEnabled">setPickerEnabled</a></td>
 <td>Public method to set the enabled state of the file dialog button.</td>
 </tr><tr>
+<td><a href="#E5PathPickerBase.setReadOnly">setReadOnly</a></td>
+<td>Public method to set the path picker to read only mode.</td>
+</tr><tr>
 <td><a href="#E5PathPickerBase.setSizeAdjustPolicy">setSizeAdjustPolicy</a></td>
 <td>Public method to set the size adjust policy of the combo box.</td>
 </tr><tr>
@@ -540,6 +546,21 @@
 <dd>
 bool
 </dd>
+</dl><a NAME="E5PathPickerBase.isReadOnly" ID="E5PathPickerBase.isReadOnly"></a>
+<h4>E5PathPickerBase.isReadOnly</h4>
+<b>isReadOnly</b>(<i></i>)
+<p>
+        Public method to check the path picker for read only mode.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+flg indicating read only mode
+</dd>
+</dl><dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
 </dl><a NAME="E5PathPickerBase.lastPath" ID="E5PathPickerBase.lastPath"></a>
 <h4>E5PathPickerBase.lastPath</h4>
 <b>lastPath</b>(<i>toNative=True</i>)
@@ -758,6 +779,16 @@
 <dd>
 flag indicating the enabled state
 </dd>
+</dl><a NAME="E5PathPickerBase.setReadOnly" ID="E5PathPickerBase.setReadOnly"></a>
+<h4>E5PathPickerBase.setReadOnly</h4>
+<b>setReadOnly</b>(<i>readOnly</i>)
+<p>
+        Public method to set the path picker to read only mode.
+</p><dl>
+<dt><i>readOnly</i> (bool)</dt>
+<dd>
+flag indicating read only mode
+</dd>
 </dl><a NAME="E5PathPickerBase.setSizeAdjustPolicy" ID="E5PathPickerBase.setSizeAdjustPolicy"></a>
 <h4>E5PathPickerBase.setSizeAdjustPolicy</h4>
 <b>setSizeAdjustPolicy</b>(<i>policy</i>)
--- a/DocumentationTools/QtHelpGenerator.py	Sat Oct 15 22:50:03 2016 +0200
+++ b/DocumentationTools/QtHelpGenerator.py	Sun Oct 16 12:20:30 2016 +0200
@@ -274,7 +274,7 @@
         os.chdir(self.htmlDir)
         subprocess.call([
             os.path.join(getQtBinariesPath(), "qhelpgenerator"),
-            "source.qhp", "-o", os.path.join(self.outputDir, HelpHelpFile)])
+            HelpProjectFile, "-o", os.path.join(self.outputDir, HelpHelpFile)])
         os.remove(HelpProjectFile)
         
         if self.createCollection:
@@ -284,6 +284,6 @@
             os.chdir(self.outputDir)
             subprocess.call([
                 os.path.join(getQtBinariesPath(), "qcollectiongenerator"),
-                "source.qhcp", "-o", "collection.qhc"])
+                HelpCollectionProjectFile, "-o", HelpCollectionFile])
         
         os.chdir(cwd)
--- a/E5Gui/E5PathPicker.py	Sat Oct 15 22:50:03 2016 +0200
+++ b/E5Gui/E5PathPicker.py	Sun Oct 16 12:20:30 2016 +0200
@@ -586,6 +586,31 @@
             self._setEditorText(path)
             self.pathSelected.emit(path)
     
+    def setReadOnly(self, readOnly):
+        """
+        Public method to set the path picker to read only mode.
+        
+        @param readOnly flag indicating read only mode
+        @type bool
+        """
+        try:
+            self._editor.setReadOnly(readOnly)
+        except AttributeError:
+            self._editor.setEditable(not readOnly)
+        self.setPickerEnabled(not readOnly)
+    
+    def isReadOnly(self):
+        """
+        Public method to check the path picker for read only mode.
+        
+        @return flg indicating read only mode
+        @rtype bool
+        """
+        try:
+            return self._editor.isReadOnly()
+        except AttributeError:
+            return not self._editor.isEditable()
+    
     ##################################################################
     ## Methods below emulate some of the QComboBox API
     ##################################################################
--- a/PluginManager/PluginInstallDialog.py	Sat Oct 15 22:50:03 2016 +0200
+++ b/PluginManager/PluginInstallDialog.py	Sun Oct 16 12:20:30 2016 +0200
@@ -393,8 +393,14 @@
             # try to unload a plugin with the same name
             self.__pluginManager.unloadPlugin(installedPluginName)
         
-        # uninstall existing plugin first to get clean conditions
-        self.__uninstallPackage(destination, pluginFileName, packageName)
+        # uninstall existing plug-in first to get clean conditions
+        if packageName != "None" and \
+            not os.path.exists(
+                os.path.join(destination, packageName, "__init__.py")):
+            # package directory contains just data, don't delete it
+            self.__uninstallPackage(destination, pluginFileName, "")
+        else:
+            self.__uninstallPackage(destination, pluginFileName, packageName)
         
         # clean sys.modules
         reload_ = self.__pluginManager.removePluginFromSysModules(
--- a/PluginManager/PluginManager.py	Sat Oct 15 22:50:03 2016 +0200
+++ b/PluginManager/PluginManager.py	Sun Oct 16 12:20:30 2016 +0200
@@ -807,6 +807,9 @@
             module = self.__failedModules[name]
             autoactivate = False
             active = False
+        elif "_" in name:
+            # try stripping of a postfix
+            return self.getPluginDetails(name.rsplit("_", 1)[0])
         else:
             # should not happen
             return None
--- a/UI/CompareDialog.py	Sat Oct 15 22:50:03 2016 +0200
+++ b/UI/CompareDialog.py	Sun Oct 16 12:20:30 2016 +0200
@@ -268,8 +268,6 @@
         if name1 == "" or name2 == "":
             self.filesGroup.hide()
         else:
-            self.file1Button.hide()
-            self.file2Button.hide()
             self.file1Picker.setText(name1)
             self.file1Picker.setReadOnly(True)
             self.file2Picker.setText(name2)

eric ide

mercurial