mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
browse_local: Fix choosing directory of F17
Seems hiding the dialog before retrieving the directory path stopped working. Remove the needlessness anyways https://bugzilla.redhat.com/show_bug.cgi?id=849450
This commit is contained in:
parent
63ba65d374
commit
71e5ac2a0a
@ -208,11 +208,11 @@ def browse_local(parent, dialog_name, conn, start_folder=None,
|
||||
if choose_button is None:
|
||||
choose_button = gtk.STOCK_OPEN
|
||||
|
||||
fcdialog = gtk.FileChooserDialog(dialog_name, parent,
|
||||
dialog_type,
|
||||
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||
choose_button, gtk.RESPONSE_ACCEPT),
|
||||
None)
|
||||
fcdialog = gtk.FileChooserDialog(title=dialog_name,
|
||||
parent=parent,
|
||||
action=dialog_type,
|
||||
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
|
||||
choose_button, gtk.RESPONSE_ACCEPT))
|
||||
fcdialog.set_default_response(gtk.RESPONSE_ACCEPT)
|
||||
|
||||
# If confirm is set, warn about a file overwrite
|
||||
@ -245,15 +245,10 @@ def browse_local(parent, dialog_name, conn, start_folder=None,
|
||||
fcdialog.set_current_folder(start_folder)
|
||||
|
||||
# Run the dialog and parse the response
|
||||
response = fcdialog.run()
|
||||
fcdialog.hide()
|
||||
if (response == gtk.RESPONSE_ACCEPT):
|
||||
filename = fcdialog.get_filename()
|
||||
fcdialog.destroy()
|
||||
ret = filename
|
||||
else:
|
||||
fcdialog.destroy()
|
||||
ret = None
|
||||
if fcdialog.run() == gtk.RESPONSE_ACCEPT:
|
||||
ret = fcdialog.get_filename()
|
||||
fcdialog.destroy()
|
||||
|
||||
# Store the chosen directory in gconf if necessary
|
||||
if ret and browse_reason and not ret.startswith("/dev"):
|
||||
|
Loading…
Reference in New Issue
Block a user