Sunflower
Sunflower copied to clipboard
Pressing Locations hotkey in Trash list results in exception
While Trash list does not have "Locations" button, pressing hotkey Ctrl+F1 (or F2, depending on panel) results in exception:
Traceback (most recent call last):
File "/home/virtualbox/dev/Sunflower/sunflower/accelerator_group.py", line 93, in _handle_activate
result = callback_method(widget, label)
File "/home/virtualbox/dev/Sunflower/sunflower/plugin_base/item_list.py", line 344, in _show_left_bookmarks
self._parent.show_bookmarks_menu(None, self._parent.left_notebook)
File "/home/virtualbox/dev/Sunflower/sunflower/gui/main_window.py", line 1536, in show_bookmarks_menu
reference = target_object.locations_button
AttributeError: 'TrashList' object has no attribute 'locations_button'
Ah, yes. Trash list is based on ItemList, so I assumed locations button will be present everywhere. This needs to safely fall back to an acceptable solution. It would be weird if we didn't show popover when user requested it.