15 |
15 |
16 class HgMergeDialog(QDialog, Ui_HgMergeDialog): |
16 class HgMergeDialog(QDialog, Ui_HgMergeDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to enter the data for a merge operation. |
18 Class implementing a dialog to enter the data for a merge operation. |
19 """ |
19 """ |
20 def __init__(self, force, tagsList, branchesList, bookmarksList=None, |
20 def __init__(self, tagsList, branchesList, bookmarksList=None, |
21 parent=None): |
21 parent=None): |
22 """ |
22 """ |
23 Constructor |
23 Constructor |
24 |
24 |
25 @param force flag indicating a forced merge (boolean) |
|
26 @param tagsList list of tags (list of strings) |
25 @param tagsList list of tags (list of strings) |
27 @param branchesList list of branches (list of strings) |
26 @param branchesList list of branches (list of strings) |
28 @param bookmarksList list of bookmarks (list of strings) |
27 @param bookmarksList list of bookmarks (list of strings) |
29 @param parent parent widget (QWidget) |
28 @param parent parent widget (QWidget) |
30 """ |
29 """ |
31 super().__init__(parent) |
30 super().__init__(parent) |
32 self.setupUi(self) |
31 self.setupUi(self) |
33 |
32 |
34 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
33 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
35 |
34 |
36 self.forceCheckBox.setChecked(force) |
|
37 self.tagCombo.addItems(sorted(tagsList)) |
35 self.tagCombo.addItems(sorted(tagsList)) |
38 self.branchCombo.addItems(["default"] + sorted(branchesList)) |
36 self.branchCombo.addItems(["default"] + sorted(branchesList)) |
39 if bookmarksList is not None: |
37 if bookmarksList is not None: |
40 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
38 self.bookmarkCombo.addItems(sorted(bookmarksList)) |
41 else: |
39 else: |