[et-mgmt-tools] [PATCH] virt-manager: Make virt-manager remember last image directory
Cole Robinson
crobinso at redhat.com
Tue Jun 23 23:36:21 UTC 2009
Michal Novotny wrote:
> Sorry, I attached wrong version, this is the right one...
>
> Michal
>
> On 06/23/2009 08:07 AM, Michal Novotny wrote:
>> Hi,
>> this is new version of my patch so please check.
>>
>> Thanks,
>> Michal
Thanks! I've applied this now:
http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/aa4f30fce78b
There is still one issue I would like to have cleaned up, but it can be
addressed by an iterative patch, rather than the repeated back and
forth. See comments below.
<snip>
> diff -r 2e0e047d21f0 -r 7800fad8b767 src/virtManager/storagebrowse.py
> --- a/src/virtManager/storagebrowse.py Mon Jun 22 14:24:09 2009 -0400
> +++ b/src/virtManager/storagebrowse.py Tue Jun 23 08:06:19 2009 +0200
> @@ -38,7 +38,7 @@
> gobject.TYPE_NONE, [str]),
> }
>
> - def __init__(self, config, conn):
> + def __init__(self, config, conn, is_media=False):
> self.__gobject_init__()
> self.window = gtk.glade.XML(config.get_glade_dir() + \
> "/vmm-storage-browse.glade",
> @@ -58,8 +58,14 @@
> # Add Volume wizard
> self.addvol = None
>
> + if is_media:
> + reason = self.config.CONFIG_DIR_MEDIA
> + else:
> + reason = self.config.CONFIG_DIR_IMAGE
> +
> # Arguments to pass to util.browse_local for local storage
> - self.local_args = {"dialog_name": _("Choose local storage")}
> + self.local_args = {"dialog_name": _("Choose local storage"),
> + "browse_reason": reason, }
>
> self.window.signal_autoconnect({
> "on_vmm_storage_browse_delete_event" : self.close,
The 'is_media' piece here is no longer necessary. Just have the
StorageBrowser caller always specify "browse_reason" in the browse_local
args dictionary. It should help simplify all the calling code.
Thanks,
Cole
More information about the et-mgmt-tools
mailing list