from gi.repository import Gio, GObject, Gtk, Pango # type: ignore # noqa: E402
+ALWAYS_ORDERS = ['bookmarked', 'last_mod_time', 'name']
+
+
class SorterAndFilterer(GObject.GObject):
"""Sort order box representation of sorting/filtering attribute."""
widget: Gtk.Box
@classmethod
def from_suggestion(cls, suggestion: list[str]) -> Self:
"""Create new, interpreting order of strings in suggestion."""
- names: list[str] = [p.lower() for p in GEN_PARAMS] + ['bookmarked']
+ names: list[str] = [p.lower() for p in GEN_PARAMS] + ALWAYS_ORDERS
order: list[SorterAndFilterer] = []
for name in names:
order += [SorterAndFilterer(name)]