13 |
13 |
14 class HgRevisionSelectionDialog(QDialog, Ui_HgRevisionSelectionDialog): |
14 class HgRevisionSelectionDialog(QDialog, Ui_HgRevisionSelectionDialog): |
15 """ |
15 """ |
16 Class implementing a dialog to select a revision. |
16 Class implementing a dialog to select a revision. |
17 """ |
17 """ |
18 def __init__(self, tagsList, branchesList, parent = None): |
18 def __init__(self, tagsList, branchesList, showNone = False, parent = None): |
19 """ |
19 """ |
20 Constructor |
20 Constructor |
21 |
21 |
22 @param tagsList list of tags (list of strings) |
22 @param tagsList list of tags (list of strings) |
23 @param branchesList list of branches (list of strings) |
23 @param branchesList list of branches (list of strings) |
|
24 @param showNone flag influencing the label of the 'None' selection (boolean) |
24 @param parent parent widget (QWidget) |
25 @param parent parent widget (QWidget) |
25 """ |
26 """ |
26 QDialog.__init__(self, parent) |
27 QDialog.__init__(self, parent) |
27 self.setupUi(self) |
28 self.setupUi(self) |
28 |
29 |
29 self.tagCombo.addItems(list(sorted(tagsList))) |
30 self.tagCombo.addItems(list(sorted(tagsList))) |
30 self.branchCombo.addItems(list(sorted(["default"] + branchesList))) |
31 self.branchCombo.addItems(list(sorted(["default"] + branchesList))) |
|
32 |
|
33 if showNone: |
|
34 self.tipButton.setText(self.trUtf8("No revision selected")) |
|
35 self.tipButton.setToolTip(self.trUtf8( |
|
36 "Select to not specify a specific revision")) |
31 |
37 |
32 def getRevision(self): |
38 def getRevision(self): |
33 """ |
39 """ |
34 Public method to retrieve the selected revision. |
40 Public method to retrieve the selected revision. |
35 |
41 |