+ selector.handler_unblock(handler) # reconnect callback
+
+ def _set_box_content(self, box, items):
+ """Updates box widget content."""
+
+ def on_button_click(widget):
+ self._show_item_dialog(widget.get_title(), \
+ widget.get_data('internal_name'))
+
+ for child in box.get_children():
+ box.remove(child)
+ for title, value, internal_name, item_type in items:
+ button = create_button(title, value)
+ button.connect('clicked', on_button_click)
+ button.set_data('internal_name', internal_name)
+ button.set_relief(gtk.RELIEF_NONE)
+ button.show()
+ box.pack_start(button, expand=False)
+
+ def _show_items_dialog(self, title, items, touch_selector_view=True):
+ """Creates dialog with items. If 'touch_selector_view' is True,
+ then items will be shown in TouchSelector widget, else each item
+ will be shown as Button in PannableArea."""