call populate_opt_media when the widget gets activated

not when it gets deactivated. Also select the first entry since we always have
one. Prevents the physical media combo box from suddenly becomming empty.
This commit is contained in:
Guido Gunther 2008-10-02 16:30:55 +02:00
parent 768e777a6b
commit 628702f470
1 changed files with 2 additions and 1 deletions

View File

@ -116,6 +116,8 @@ class vmmChooseCD(gobject.GObject):
def media_toggled(self, ignore1=None, ignore2=None):
if self.window.get_widget("physical-media").get_active():
self.populate_opt_media()
self.window.get_widget("cd-path").set_active(0)
self.window.get_widget("cd-path").set_sensitive(True)
self.window.get_widget("iso-path").set_sensitive(False)
self.window.get_widget("iso-file-chooser").set_sensitive(False)
@ -123,7 +125,6 @@ class vmmChooseCD(gobject.GObject):
self.window.get_widget("cd-path").set_sensitive(False)
self.window.get_widget("iso-path").set_sensitive(True)
self.window.get_widget("iso-file-chooser").set_sensitive(True)
self.populate_opt_media()
def change_cd_path(self, ignore1=None, ignore2=None):
pass