|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2011 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to list all files not tracked by Mercurial. |
|
8 """ |
|
9 |
|
10 from __future__ import unicode_literals |
|
11 |
|
12 from PyQt5.QtCore import Qt |
|
13 from PyQt5.QtWidgets import QDialog |
|
14 |
|
15 from .Ui_HgPurgeListDialog import Ui_HgPurgeListDialog |
|
16 |
|
17 |
|
18 class HgPurgeListDialog(QDialog, Ui_HgPurgeListDialog): |
|
19 """ |
|
20 Class implementing a dialog to list all files not tracked by Mercurial. |
|
21 """ |
|
22 def __init__(self, entries, parent=None): |
|
23 """ |
|
24 Constructor |
|
25 |
|
26 @param entries list of entries to be shown (list of strings) |
|
27 @param parent reference to the parent widget (QWidget) |
|
28 """ |
|
29 super(HgPurgeListDialog, self).__init__(parent) |
|
30 self.setupUi(self) |
|
31 self.setWindowFlags(Qt.Window) |
|
32 |
|
33 self.purgeList.addItems(sorted(entries)) |