self.sort_order_last_selected.get_last_child().hide()
list_item = self.sort_selection.props.selected_item.widget
list_item.get_parent().grab_focus()
- list_item.get_last_child().show()
self.sort_order_last_selected = list_item
self.sort_order_last_selected = None
factory = Gtk.SignalListItemFactory()
factory.connect('setup', setup_sort_order_item)
factory.connect('bind', bind_sort_order_item)
- selector = Gtk.ListView(model=self.sort_selection, factory=factory)
+ self.sort_list_view = Gtk.ListView(model=self.sort_selection,
+ factory=factory)
sort_box = Gtk.Box(orientation=OR_V)
sort_box.append(Gtk.Label(label='** sort order **'))
- sort_box.append(selector)
+ sort_box.append(self.sort_list_view)
self.btn_activate_sort = Gtk.Button(label='activate')
self.btn_activate_sort.props.sensitive = False
self.btn_activate_sort.connect(
focused = self.get_focus()
if isinstance(focused, GallerySlot):
self.gallery.on_focus_slot(focused)
+ elif focused.get_parent() == self.sort_list_view:
+ focused.get_first_child().get_last_child().show()
def on_resize(self):
"""On window resize, do .gallery.on_resize towards its new geometry."""