home
·
contact
·
privacy
projects
/
stable_plom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64f7b82
)
Add .last_mod_time, .name to attributes allowing filtering.
master
author
Plom Heller
<plom@plomlompom.com>
Sat, 18 Apr 2026 03:58:14 +0000
(
05:58
+0200)
committer
Plom Heller
<plom@plomlompom.com>
Sat, 18 Apr 2026 03:58:14 +0000
(
05:58
+0200)
browser/gallery_config.py
patch
|
blob
|
history
diff --git
a/browser/gallery_config.py
b/browser/gallery_config.py
index 18bc3afab124f40b9deef492c1dd9a1fe499e402..cbd77ab3ad855ee48a26268e498185f65bdb1d18 100644
(file)
--- a/
browser/gallery_config.py
+++ b/
browser/gallery_config.py
@@
-17,6
+17,9
@@
gi.require_version('Gio', '2.0')
from gi.repository import Gio, GObject, Gtk, Pango # type: ignore # noqa: E402
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
class SorterAndFilterer(GObject.GObject):
"""Sort order box representation of sorting/filtering attribute."""
widget: Gtk.Box
@@
-147,7
+150,7
@@
class SorterAndFiltererOrder:
@classmethod
def from_suggestion(cls, suggestion: list[str]) -> Self:
"""Create new, interpreting order of strings in suggestion."""
@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)]
order: list[SorterAndFilterer] = []
for name in names:
order += [SorterAndFilterer(name)]