mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-25 23:21:45 +03:00
Compat fixes for RHEL5 vintage gtk, python
This commit is contained in:
parent
2b31de9644
commit
d9402c9b61
@ -2241,7 +2241,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
is_vnc = (gtype == "vnc")
|
||||
is_sdl = (gtype == "sdl")
|
||||
is_spice = (gtype == "spice")
|
||||
is_other = not any([is_vnc, is_sdl, is_spice])
|
||||
is_other = not (True in [is_vnc, is_sdl, is_spice])
|
||||
|
||||
set_title(_("%(graphicstype)s Server") %
|
||||
{"graphicstype" : str(gtype).upper()})
|
||||
|
@ -1060,9 +1060,7 @@ class vmmManager(vmmGObjectUI):
|
||||
widgn = "menu_view_stats_network"
|
||||
widget = self.window.get_widget(widgn)
|
||||
|
||||
disabled_text = _(" (disabled)")
|
||||
tool_text = ""
|
||||
current_text = widget.get_label().strip(disabled_text)
|
||||
|
||||
if conf_entry and (conf_entry == True or
|
||||
conf_entry.get_value().get_bool()):
|
||||
@ -1072,9 +1070,15 @@ class vmmManager(vmmGObjectUI):
|
||||
widget.set_active(False)
|
||||
widget.set_sensitive(False)
|
||||
tool_text = _("Disabled in preferences dialog.")
|
||||
current_text = current_text + disabled_text
|
||||
|
||||
util.tooltip_wrapper(widget, tool_text)
|
||||
|
||||
# RHEL5 GTK doesn't support get_label for a checkmenuitem
|
||||
if hasattr(widget, "get_label"):
|
||||
disabled_text = _(" (disabled)")
|
||||
current_text = widget.get_label().strip(disabled_text)
|
||||
if tool_text:
|
||||
current_text = current_text + disabled_text
|
||||
widget.set_label(current_text)
|
||||
|
||||
def toggle_network_traffic_visible_widget(self, *ignore):
|
||||
|
Loading…
Reference in New Issue
Block a user