Sun, 15 May 2011 19:20:41 +0200
Fixed an issue in the new MQ list patches dialog.
--- a/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesListDialog.html Sun May 15 19:14:38 2011 +0200 +++ b/Documentation/Source/eric5.Plugins.VcsPlugins.vcsMercurial.QueuesExtension.HgQueuesListDialog.html Sun May 15 19:20:41 2011 +0200 @@ -132,7 +132,7 @@ Private slot called when the process finished or the user pressed the button. </p><a NAME="HgQueuesListDialog.__generateItem" ID="HgQueuesListDialog.__generateItem"></a> <h4>HgQueuesListDialog.__generateItem</h4> -<b>__generateItem</b>(<i>name, summary</i>) +<b>__generateItem</b>(<i>name, summary, error=False</i>) <p> Private method to generate a patch item in the list of patches. </p><dl> @@ -142,6 +142,9 @@ </dd><dt><i>summary</i></dt> <dd> first line of the patch header (string) +</dd><dt><i>error</i></dt> +<dd> +flag indicating an error entry (boolean) </dd> </dl><a NAME="HgQueuesListDialog.__getApplied" ID="HgQueuesListDialog.__getApplied"></a> <h4>HgQueuesListDialog.__getApplied</h4>
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListDialog.py Sun May 15 19:14:38 2011 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListDialog.py Sun May 15 19:20:41 2011 +0200 @@ -189,7 +189,7 @@ if self.patchesList.topLevelItemCount() == 0: # no bookmarks defined - self.__generateItem(self.trUtf8("no patches found"), "") + self.__generateItem(self.trUtf8("no patches found"), "", True) self.patchesList.doItemsLayout() self.__resizeColumns() self.__resort() @@ -233,22 +233,31 @@ self.patchesList.header().resizeSections(QHeaderView.ResizeToContents) self.patchesList.header().setStretchLastSection(True) - def __generateItem(self, name, summary): + def __generateItem(self, name, summary, error=False): """ Private method to generate a patch item in the list of patches. @param name name of the patch (string) - @param summary first line of the patch header (string) + @param summary first line of the patch header (string) + @param error flag indicating an error entry (boolean) """ - self.__patchesCount += 1 - itm = QTreeWidgetItem(self.patchesList, [ - "{0:>7}".format(self.__patchesCount), - name, - self.__mode == "qapplied" and \ - self.trUtf8("applied") or \ - self.trUtf8("not applied"), - summary - ]) + if error: + itm = QTreeWidgetItem(self.patchesList, [ + "", + name, + "", + summary + ]) + else: + self.__patchesCount += 1 + itm = QTreeWidgetItem(self.patchesList, [ + "{0:>7}".format(self.__patchesCount), + name, + self.__mode == "qapplied" and \ + self.trUtf8("applied") or \ + self.trUtf8("not applied"), + summary + ]) itm.setTextAlignment(0, Qt.AlignRight) itm.setTextAlignment(2, Qt.AlignHCenter)