1
0
mirror of https://src.fedoraproject.org/rpms/virt-manager.git synced 2025-07-15 16:53:32 +00:00

Fix some german translation issues (bz 571200, bz 571231) Allow --sync CLI

option Fix using a manual 'default' pool (bz 557020) Fix crash if
    libvirtd is restarted (bz 555063) Don't force grab focus when app is
    run (bz 548430)
This commit is contained in:
Cole Robinson
2010-03-22 01:46:44 +00:00
parent 399412ab7c
commit 31875e5b42
6 changed files with 359 additions and 1 deletions

View File

@ -0,0 +1,28 @@
# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1269219273 14400
# Node ID ba45868ba3d7928268d2cdc5cae0538337fd069c
# Parent c2cbba74520f8fdfe761ff3f839cb5fefe023d30
Fix some german translations (Peter Bieringer)
diff -r c2cbba74520f -r ba45868ba3d7 po/de.po
--- a/po/de.po Sun Mar 21 17:55:40 2010 -0400
+++ b/po/de.po Sun Mar 21 20:54:33 2010 -0400
@@ -912,7 +912,7 @@
#: ../src/virtManager/console.py:570
msgid "Graphical console is not yet active for guest"
-msgstr "Grafische Konsole nocht nicht aktiv für Gastjetzt"
+msgstr "Grafische Konsole für Gast jetzt noch nicht aktiv"
#: ../src/virtManager/console.py:574
msgid "Connecting to graphical console for guest"
@@ -1700,7 +1700,7 @@
#: ../src/virtManager/domain.py:1180
msgid "Shutoff"
-msgstr "Ausschalten"
+msgstr "Ausgeschaltet"
#: ../src/virtManager/domain.py:1182
msgid "Crashed"

View File

@ -0,0 +1,33 @@
# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1265648061 18000
# Node ID 876f708ad69b61507e09fb2ec0438d477bd6e25a
# Parent 295646fddf4376f1425afde34df71a8095f125c7
Abide gtk cmdline options
By parsing opts later, GTK seems to auto parse and abide options like
--sync.
diff -r 295646fddf43 -r 876f708ad69b src/virt-manager.py.in
--- a/src/virt-manager.py.in Mon Feb 08 11:44:04 2010 -0500
+++ b/src/virt-manager.py.in Mon Feb 08 11:54:21 2010 -0500
@@ -284,9 +284,6 @@
setup_i18n()
setup_pypath()
- (options, ignore) = parse_commandline()
- setup_logging(options.debug)
-
# Urgh, pygtk merely logs a warning when failing to open
# the X11 display connection, and lets everything carry
# on as if all were fine. Ultimately bad stuff happens,
@@ -308,6 +305,9 @@
raise RuntimeError(_("Unable to initialize GTK: %s") % str(e))
warnings.resetwarnings()
+ (options, ignore) = parse_commandline()
+ setup_logging(options.debug)
+
# Make sure we have a sufficiently new virtinst version, since we are
# very closely tied to the lib
msg = ("virt-manager requires the python-virtinst library version " +

View File

@ -0,0 +1,33 @@
# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1264526673 18000
# Node ID 3fc51aee7be3c5d539ad9ed1f90afdcd43de8896
# Parent 0ade95843eba86c51247645be001cc336fd99966
engine: Make sure a libvirtd restart doesn't lock the app
We were trying to close the connection without thread locking (and closing
can emit a signal which updates the UI).
diff -r 0ade95843eba -r 3fc51aee7be3 src/virtManager/engine.py
--- a/src/virtManager/engine.py Mon Jan 25 10:04:31 2010 -0500
+++ b/src/virtManager/engine.py Tue Jan 26 12:24:33 2010 -0500
@@ -211,8 +211,9 @@
def _tick(self):
for uri in self.connections.keys():
+ conn = self.connections[uri]["connection"]
try:
- self.connections[uri]["connection"].tick()
+ conn.tick()
except KeyboardInterrupt:
raise
except libvirt.libvirtError, e:
@@ -220,7 +221,7 @@
logging.exception("Could not refresh connection %s." % uri)
logging.debug("Closing connection since libvirtd "
"appears to have stopped.")
- self.connections[uri]["connection"].close()
+ gobject.idle_add(conn.close)
else:
raise
return 1

View File

@ -0,0 +1,52 @@
# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1266002236 18000
# Node ID 831fa7210e0467ddd9039cc9f372f11b2b22c5b5
# Parent 9fb5880026535f6e373d3487ab31069eeae51489
create: Allow using a manually created 'default' pool
diff -r 9fb588002653 -r 831fa7210e04 src/virtManager/create.py
--- a/src/virtManager/create.py Fri Feb 12 14:01:59 2010 -0500
+++ b/src/virtManager/create.py Fri Feb 12 14:17:16 2010 -0500
@@ -454,7 +454,6 @@
self.usepool = False
try:
if is_storage_capable:
- # FIXME: Emit 'pool-added' or something?
util.build_default_pool(self.conn.vmm)
self.usepool = True
except Exception, e:
@@ -845,7 +844,6 @@
return self.failed_guest.disks[0].path
if not self.usepool:
-
# Use old generating method
d = self.config.get_default_image_dir(self.conn)
origf = os.path.join(d, name + ".img")
@@ -860,12 +858,22 @@
f = origf
path = f
+
else:
- pool = self.conn.vmm.storagePoolLookupByName(util.DEFAULT_POOL_NAME)
+ pool = None
+ for uuid in self.conn.list_pool_uuids():
+ p = self.conn.get_pool(uuid)
+ if p.get_name() == util.DEFAULT_POOL_NAME:
+ pool = p
+
+ if not pool:
+ raise RuntimeError(_("Did not find pool '%s'") %
+ util.DEFAULT_POOL_NAME)
+
path = virtinst.Storage.StorageVolume.find_free_name(name,
- pool_object=pool, suffix=".img")
+ pool_object=pool.pool, suffix=".img")
- path = os.path.join(util.DEFAULT_POOL_PATH, path)
+ path = os.path.join(pool.get_target_path(), path)
return path

View File

@ -0,0 +1,190 @@
# HG changeset patch
# User Cole Robinson <crobinso@redhat.com>
# Date 1266952692 18000
# Node ID 962e52a4b4c0441eb5e9e8aeb1bb17597282579c
# Parent 4e4e674d4921264cfe376ed48dcab10c8d3a3b69
Drop redundant calls to window.show()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/about.py
--- a/src/virtManager/about.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/about.py Tue Feb 23 14:18:12 2010 -0500
@@ -48,7 +48,6 @@
def show(self):
dialog = self.window.get_widget("vmm-about")
dialog.set_version(self.config.get_appversion())
- dialog.show_all()
dialog.present()
def close(self,ignore1=None,ignore2=None):
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/addhardware.py
--- a/src/virtManager/addhardware.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/addhardware.py Tue Feb 23 14:18:12 2010 -0500
@@ -166,7 +166,6 @@
def show(self):
self.reset_state()
- self.topwin.show()
self.topwin.present()
def close(self, ignore1=None,ignore2=None):
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/clone.py
--- a/src/virtManager/clone.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/clone.py Tue Feb 23 14:18:12 2010 -0500
@@ -140,7 +140,6 @@
def show(self):
self.reset_state()
- self.topwin.show()
self.topwin.present()
def close(self, ignore1=None, ignore2=None):
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/connect.py
--- a/src/virtManager/connect.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/connect.py Tue Feb 23 14:18:12 2010 -0500
@@ -108,7 +108,6 @@
def show(self):
win = self.window.get_widget("vmm-open-connection")
- win.show_all()
win.present()
self.reset_state()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createnet.py
--- a/src/virtManager/createnet.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/createnet.py Tue Feb 23 14:18:12 2010 -0500
@@ -82,7 +82,6 @@
self.set_initial_state()
def show(self):
- self.topwin.show()
self.reset_state()
self.topwin.present()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createpool.py
--- a/src/virtManager/createpool.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/createpool.py Tue Feb 23 14:18:12 2010 -0500
@@ -115,7 +115,6 @@
self.set_initial_state()
def show(self):
- self.topwin.show()
self.reset_state()
self.topwin.present()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createvol.py
--- a/src/virtManager/createvol.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/createvol.py Tue Feb 23 14:18:12 2010 -0500
@@ -89,7 +89,6 @@
def show(self):
self.reset_state()
- self.topwin.show()
self.topwin.present()
def close(self, ignore1=None, ignore2=None):
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/delete.py
--- a/src/virtManager/delete.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/delete.py Tue Feb 23 14:18:12 2010 -0500
@@ -85,7 +85,6 @@
def show(self):
self.reset_state()
- self.topwin.show()
self.topwin.present()
def close(self, ignore1=None, ignore2=None):
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/details.py
--- a/src/virtManager/details.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/details.py Tue Feb 23 14:18:12 2010 -0500
@@ -302,7 +302,6 @@
if self.is_visible():
self.topwin.present()
return
- self.topwin.show()
self.topwin.present()
self.engine.increment_window_counter()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/host.py
--- a/src/virtManager/host.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/host.py Tue Feb 23 14:18:12 2010 -0500
@@ -294,8 +294,10 @@
def show(self):
- dialog = self.window.get_widget("vmm-host")
- dialog.present()
+ if self.is_visible():
+ self.topwin.present()
+ return
+ self.topwin.present()
self.engine.increment_window_counter()
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/manager.py
--- a/src/virtManager/manager.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/manager.py Tue Feb 23 14:18:12 2010 -0500
@@ -124,6 +124,8 @@
0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
_("Unexpected Error"),
_("An unexpected error occurred"))
+ self.topwin = self.window.get_widget("vmm-manager")
+
self.config = config
self.engine = engine
@@ -136,8 +138,7 @@
self.rows = {}
w, h = self.config.get_manager_window_size()
- self.window.get_widget("vmm-manager").set_default_size(w or 550,
- h or 550)
+ self.topwin.set_default_size(w or 550, h or 550)
self.init_vmlist()
self.init_stats()
@@ -221,12 +222,11 @@
##################
def show(self):
- win = self.window.get_widget("vmm-manager")
if self.is_visible():
- win.present()
+ self.topwin.present()
return
- win.show()
- win.present()
+ self.topwin.present()
+
self.engine.increment_window_counter()
if self.startup_error:
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/preferences.py
--- a/src/virtManager/preferences.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/preferences.py Tue Feb 23 14:18:12 2010 -0500
@@ -37,7 +37,6 @@
self.config = config
self.topwin = self.window.get_widget("vmm-preferences")
- self.topwin.hide()
self.config.on_view_system_tray_changed(self.refresh_view_system_tray)
self.config.on_console_popup_changed(self.refresh_console_popup)
@@ -102,7 +101,6 @@
return 1
def show(self):
- self.topwin.show()
self.topwin.present()
#########################
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/storagebrowse.py
--- a/src/virtManager/storagebrowse.py Tue Feb 23 09:03:13 2010 +0000
+++ b/src/virtManager/storagebrowse.py Tue Feb 23 14:18:12 2010 -0500
@@ -90,7 +90,6 @@
def show(self, conn=None):
self.reset_state(conn)
- self.topwin.show()
self.topwin.present()
def close(self, ignore1=None, ignore2=None):

View File

@ -8,7 +8,7 @@
Name: virt-manager
Version: 0.8.2
Release: 2%{_extra_release}
Release: 3%{_extra_release}
Summary: Virtual Machine Manager
Group: Applications/Emulators
@ -21,6 +21,16 @@ BuildArch: noarch
Patch1: %{name}-%{version}-perms-qemu-user.patch
# Prefer HAL for device enumeration, to avoid possible regressions
Patch2: %{name}-%{version}-prefer-hal.patch
# Fix some german translation issues (bz 571200, bz 571231)
Patch3: %{name}-%{version}-fix-german-trans.patch
# Allow --sync CLI option
Patch4: %{name}-%{version}-gtk-cli-options.patch
# Fix using a manual 'default' pool (bz 557020)
Patch5: %{name}-%{version}-manual-default-pool.patch
# Fix crash if libvirtd is restarted (bz 555063)
Patch6: %{name}-%{version}-libvirtd-restart-crash.patch
# Don't force grab focus when app is run (bz 548430)
Patch7: %{name}-%{version}-stop-focus-grab.patch
# These two are just the oldest version tested
Requires: pygtk2 >= 1.99.12-6
@ -81,6 +91,11 @@ management API.
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
%configure
@ -154,6 +169,13 @@ fi
%{_datadir}/dbus-1/services/%{name}.service
%changelog
* Sun Mar 21 2010 Cole Robinson <crobinso@redhat.com> - 0.8.2-3.fc12
- Fix some german translation issues (bz 571200, bz 571231)
- Allow --sync CLI option
- Fix using a manual 'default' pool (bz 557020)
- Fix crash if libvirtd is restarted (bz 555063)
- Don't force grab focus when app is run (bz 548430)
* Tue Jan 12 2010 Cole Robinson <crobinso@redhat.com> - 0.8.2-2.fc12
- Build with actual upstream tarball (not manually built dist)