2014-10-29 18:03:15 +01:00
|
|
|
Index: virt-manager-1.1.0/virtManager/engine.py
|
2014-08-11 23:36:23 +02:00
|
|
|
===================================================================
|
2014-10-29 18:03:15 +01:00
|
|
|
--- virt-manager-1.1.0.orig/virtManager/engine.py
|
|
|
|
+++ virt-manager-1.1.0/virtManager/engine.py
|
|
|
|
@@ -27,6 +27,7 @@ import re
|
2014-08-11 23:36:23 +02:00
|
|
|
import Queue
|
|
|
|
import threading
|
|
|
|
import traceback
|
|
|
|
+import platform
|
2014-10-29 18:03:15 +01:00
|
|
|
import os
|
2014-08-11 23:36:23 +02:00
|
|
|
from subprocess import *
|
|
|
|
|
2015-01-05 19:16:33 +01:00
|
|
|
@@ -795,7 +796,7 @@ class vmmEngine(vmmGObject):
|
2014-08-11 23:36:23 +02:00
|
|
|
obj.connect("action-clone-domain", self._do_show_clone)
|
|
|
|
obj.connect("action-show-domain", self._do_show_vm)
|
|
|
|
obj.connect("action-show-preferences", self._do_show_preferences)
|
|
|
|
- obj.connect("action-show-create", self._do_show_create)
|
|
|
|
+ obj.connect("action-show-create", self._do_show_create_virtinstall)
|
|
|
|
obj.connect("action-show-create-vminstall", self._do_show_create_vminstall)
|
|
|
|
obj.connect("action-show-about", self._do_show_about)
|
|
|
|
obj.connect("action-show-host", self._do_show_host)
|
2015-01-05 19:16:33 +01:00
|
|
|
@@ -843,7 +844,20 @@ class vmmEngine(vmmGObject):
|
2014-08-11 23:36:23 +02:00
|
|
|
self.windowCreate = None
|
|
|
|
|
|
|
|
def _do_show_create_vminstall(self, src, uri):
|
|
|
|
- self._do_show_create(src, uri, True)
|
|
|
|
+ # When pop-down menu is selected
|
|
|
|
+ if platform.machine() == "s390x":
|
|
|
|
+ # For s390, the pop-down is virt-install
|
|
|
|
+ self._do_show_create(src, uri, False)
|
|
|
|
+ else:
|
|
|
|
+ self._do_show_create(src, uri, True)
|
|
|
|
+
|
|
|
|
+ def _do_show_create_virtinstall(self, src, uri):
|
|
|
|
+ # When 'Create a new virtual machine' button is selected
|
|
|
|
+ if platform.machine() == "s390x":
|
|
|
|
+ # For s390, the button is vm-install
|
|
|
|
+ self._do_show_create(src, uri, True)
|
|
|
|
+ else:
|
|
|
|
+ self._do_show_create(src, uri, False)
|
|
|
|
|
|
|
|
def _do_show_create(self, src, uri, use_vminstall=False):
|
|
|
|
if uri is None:
|
2015-01-05 19:16:33 +01:00
|
|
|
@@ -927,7 +941,10 @@ class vmmEngine(vmmGObject):
|
2014-08-11 23:36:23 +02:00
|
|
|
|
|
|
|
def show_domain_creator(self, uri):
|
|
|
|
self.show_manager()
|
|
|
|
- self._do_show_create(self.get_manager(), uri)
|
|
|
|
+ if platform.machine() == "s390x":
|
|
|
|
+ self._do_show_create(self.get_manager(), uri, True)
|
|
|
|
+ else:
|
|
|
|
+ self._do_show_create(self.get_manager(), uri, False)
|
|
|
|
|
2014-10-29 18:03:15 +01:00
|
|
|
|
|
|
|
def _find_vm_by_cli_str(self, uri, clistr):
|
|
|
|
Index: virt-manager-1.1.0/virtManager/vmmenu.py
|
2014-08-11 23:36:23 +02:00
|
|
|
===================================================================
|
2014-10-29 18:03:15 +01:00
|
|
|
--- virt-manager-1.1.0.orig/virtManager/vmmenu.py
|
|
|
|
+++ virt-manager-1.1.0/virtManager/vmmenu.py
|
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
from gi.repository import Gtk
|
2014-08-11 23:36:23 +02:00
|
|
|
from virtManager import config
|
|
|
|
|
|
|
|
+import platform
|
|
|
|
|
|
|
|
####################################################################
|
2014-10-29 18:03:15 +01:00
|
|
|
# Build toolbar new button menu (manager and details toolbar) #
|
|
|
|
@@ -33,8 +34,10 @@ def build_new_button_menu(widget, vminst
|
2014-08-11 23:36:23 +02:00
|
|
|
widget.set_menu(menu)
|
|
|
|
|
|
|
|
vminstallimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
|
|
|
|
-
|
|
|
|
- vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Vm-install"))
|
|
|
|
+ if platform.machine() == "s390x":
|
|
|
|
+ vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Virt-install"))
|
|
|
|
+ else:
|
|
|
|
+ vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Vm-install"))
|
|
|
|
vminstall.set_image(vminstallimg)
|
|
|
|
vminstall.show()
|
|
|
|
vminstall.connect("activate", vminstall_cb)
|