From 268c9a9d94a11a9cf26484ee874fc1cb6adcd54a Mon Sep 17 00:00:00 2001 From: Olivier Medoc Date: Tue, 5 Mar 2013 11:29:49 +0100 Subject: [PATCH] mainui: implemented show/hide internal VMs --- mainwindow.ui | 3 +++ qubesmanager/main.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/mainwindow.ui b/mainwindow.ui index 1425c6c..3c1cd34 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -799,6 +799,9 @@ true + + false + :/show-all-running.png:/show-all-running.png diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 953dc20..9f808e8 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -1002,6 +1002,21 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): self.table.setRowHidden(row_no, True) row_no += 1 + def showhide_internal_vms(self, show_internal): + if show_internal: + row_no = 0 + while row_no < self.table.rowCount(): + self.table.setRowHidden(row_no, False) + row_no += 1 + else: + row_no = 0 + while row_no < self.table.rowCount(): + widget = self.table.cellWidget(row_no, self.columns_indices["State"]) + internal = widget.vm.internal + if internal: + self.table.setRowHidden(row_no, True) + row_no += 1 + def mark_table_for_update(self): self.reload_table = True