|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2011 - 2022 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 PyQt6.QtCore import Qt |
|
11 from PyQt6.QtWidgets import QDialog |
|
12 |
|
13 from .Ui_HgPurgeListDialog import Ui_HgPurgeListDialog |
|
14 |
|
15 |
|
16 class HgPurgeListDialog(QDialog, Ui_HgPurgeListDialog): |
|
17 """ |
|
18 Class implementing a dialog to list all files not tracked by Mercurial. |
|
19 """ |
|
20 def __init__(self, entries, parent=None): |
|
21 """ |
|
22 Constructor |
|
23 |
|
24 @param entries list of entries to be shown (list of strings) |
|
25 @param parent reference to the parent widget (QWidget) |
|
26 """ |
|
27 super().__init__(parent) |
|
28 self.setupUi(self) |
|
29 self.setWindowFlags(Qt.WindowType.Window) |
|
30 |
|
31 self.purgeList.addItems(sorted(entries)) |