fix ad hoc commands

This commit is contained in:
Denis Fomin 2013-01-11 20:44:29 +04:00
parent de9241ac11
commit c9ad2d1704
2 changed files with 5 additions and 4 deletions

View File

@ -236,7 +236,7 @@ class CommandWindow:
# build the commands list radiobuttons
first_radio = None
for (commandnode, commandname) in self.commandlist:
radio = Gtk.RadioButton(first_radio, label=commandname)
radio = Gtk.RadioButton.new_with_label_from_widget(first_radio, commandname)
radio.connect("toggled", self.on_command_radiobutton_toggled,
commandnode)
if not first_radio:
@ -255,9 +255,9 @@ class CommandWindow:
"""
Remove widgets we created. Not needed when the window is destroyed
"""
def remove_widget(widget):
def remove_widget(widget, param):
self.command_list_vbox.remove(widget)
self.command_list_vbox.foreach(remove_widget)
self.command_list_vbox.foreach(remove_widget, None)
def stage2_close_button_clicked(self, widget):
self.stage_finish()

View File

@ -332,7 +332,8 @@ class SingleForm(Gtk.Table, object):
widget
"""
if field.description != '':
if widget.flags() & Gtk.NO_WINDOW:
if not widget.get_window():
#if widget.flags() & Gtk.NO_WINDOW:
evbox = Gtk.EventBox()
evbox.add(widget)
widget = evbox