Sun, 16 Oct 2016 12:15:18 +0200
Fixed an issue with the path picker and its usage.
--- a/APIs/Python3/eric6.api Sun Oct 16 11:44:20 2016 +0200 +++ b/APIs/Python3/eric6.api Sun Oct 16 12:15:18 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)
--- a/Documentation/Help/source.qhp Sun Oct 16 11:44:20 2016 +0200 +++ b/Documentation/Help/source.qhp Sun Oct 16 12:15:18 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 Sun Oct 16 11:44:20 2016 +0200 +++ b/Documentation/Source/eric6.E5Gui.E5PathPicker.html Sun Oct 16 12:15:18 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/E5Gui/E5PathPicker.py Sun Oct 16 11:44:20 2016 +0200 +++ b/E5Gui/E5PathPicker.py Sun Oct 16 12:15:18 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/UI/CompareDialog.py Sun Oct 16 11:44:20 2016 +0200 +++ b/UI/CompareDialog.py Sun Oct 16 12:15:18 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)