From c9ad2d17040d81f25ce11241eade1732eaa18825 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Fri, 11 Jan 2013 20:44:29 +0400 Subject: [PATCH] fix ad hoc commands --- src/adhoc_commands.py | 6 +++--- src/dataforms_widget.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/adhoc_commands.py b/src/adhoc_commands.py index 5a5d81cfc..87cc12a95 100644 --- a/src/adhoc_commands.py +++ b/src/adhoc_commands.py @@ -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() diff --git a/src/dataforms_widget.py b/src/dataforms_widget.py index 89b4beffb..092e1f038 100644 --- a/src/dataforms_widget.py +++ b/src/dataforms_widget.py @@ -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