mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Choose address between localhost ,or all interfaces. Hide passwords
This commit is contained in:
@@ -208,6 +208,9 @@ class vmmAddHardware(gobject.GObject):
|
||||
graphics_box = self.window.get_widget("graphics-type")
|
||||
self.populate_graphics_model(graphics_box.get_model())
|
||||
graphics_box.set_active(0)
|
||||
self.window.get_widget("graphics-address").set_active(False)
|
||||
self.window.get_widget("graphics-port-auto").set_active(True)
|
||||
self.window.get_widget("graphics-password").set_text("")
|
||||
|
||||
|
||||
def forward(self, ignore=None):
|
||||
@@ -279,7 +282,9 @@ class vmmAddHardware(gobject.GObject):
|
||||
|
||||
def get_config_vnc_address(self):
|
||||
addr = self.window.get_widget("graphics-address")
|
||||
return addr.get_text()
|
||||
if addr.get_active():
|
||||
return "0.0.0.0"
|
||||
return "127.0.0.1"
|
||||
|
||||
def get_config_vnc_password(self):
|
||||
pw = self.window.get_widget("graphics-password")
|
||||
@@ -366,7 +371,10 @@ class vmmAddHardware(gobject.GObject):
|
||||
self.window.get_widget("summary-graphics-port").set_text(_("Automatically allocated"))
|
||||
else:
|
||||
self.window.get_widget("summary-graphics-port").set_text(str(self.get_config_vnc_port()))
|
||||
self.window.get_widget("summary-graphics-password").set_text(self.get_config_vnc_password())
|
||||
if self.get_config_vnc_password() is not None and self.get_config_vnc_password() != "":
|
||||
self.window.get_widget("summary-graphics-password").set_text(_("Yes"))
|
||||
else:
|
||||
self.window.get_widget("summary-graphics-password").set_text(_("Yes"))
|
||||
else:
|
||||
self.window.get_widget("summary-graphics-address").set_text(_("N/A"))
|
||||
self.window.get_widget("summary-graphics-port").set_text(_("N/A"))
|
||||
|
||||
@@ -2232,7 +2232,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
@@ -2248,27 +2248,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="graphics-address">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment160">
|
||||
<property name="visible">True</property>
|
||||
@@ -2411,6 +2390,28 @@
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="graphics-address">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Listen on all public network interfaces </property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user