From 12b2dde9435ae9429b422d2d02de26e187b12940 Mon Sep 17 00:00:00 2001 From: Agnieszka Kostrzewa Date: Fri, 9 Mar 2012 08:43:42 +0100 Subject: [PATCH] Networking info displayed in settings basic tab (ticket #463). --- qubesmanager/settings.py | 10 +++++ settingsdlg.ui | 90 ++++++++++++++++++++++++++++++++++------ 2 files changed, 88 insertions(+), 12 deletions(-) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index f350019..214a8da 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -224,6 +224,16 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog): text = "Yes" if self.vm.installed_by_rpm == True else "No" self.rpm_label.setText(text) + #networking info + if self.vm.is_networked(): + self.networking_groupbox.setEnabled(True); + self.ip_label.setText(self.vm.ip if self.vm.ip is not None else "none") + self.netmask_label.setText(self.vm.netmask if self.vm.netmask is not None else "none") + self.gateway_label.setText(self.vm.gateway if self.vm.gateway is not None else "none") + else: + self.networking_groupbox.setEnabled(False); + + #maxmem self.priv_size.setValue(int(self.vm.maxmem)/1024) self.priv_size.setMinimum(0) diff --git a/settingsdlg.ui b/settingsdlg.ui index 2d1be52..4e60019 100644 --- a/settingsdlg.ui +++ b/settingsdlg.ui @@ -38,8 +38,8 @@ Basic - - + + Settings @@ -55,7 +55,7 @@ - myappvm + ---- @@ -102,18 +102,15 @@ - + true - Info + General - - QFormLayout::AllNonFixedFieldsGrow - @@ -130,7 +127,7 @@ - AppVM + --- @@ -150,14 +147,14 @@ - No + --- - + true @@ -199,7 +196,7 @@ - + Qt::Vertical @@ -212,6 +209,75 @@ + + + + Networking + + + + + + IP: + + + + + + + + 75 + true + + + + --- + + + + + + + Netmask: + + + + + + + + 75 + true + + + + --- + + + + + + + Gateway: + + + + + + + + 75 + true + + + + --- + + + + + +