Daniel Brötzmann pushed to branch emoji-completion-sorting at gajim / gajim
Commits:
d3efe022 by wurstsalat at 2025-07-27T12:59:51+02:00
imprv: Emoji completion: Sort emojis; improve search
Fixes #12382
- - - - -
1 changed file:
- gajim/gtk/completion/emoji.py
Changes:
=====================================
gajim/gtk/completion/emoji.py
=====================================
@@ -8,6 +8,7 @@
from typing import cast
from typing import Final
+import locale
import logging
from gi.repository import Gdk
@@ -158,9 +159,17 @@ def parse_emoji_data(bytes_data: GLib.Bytes, loc: str) ->
Gio.ListStore:
)
store.append(item)
+ store.sort(_sort_short_name)
return store
+@staticmethod
+def _sort_short_name(
+ item1: EmojiCompletionListItem, item2: EmojiCompletionListItem
+) -> int:
+ return locale.strcoll(item1.short_name, item2.short_name)
+
+
class EmojiCompletionListItem(BaseCompletionListItem, GObject.Object):
__gtype_name__ = "EmojiCompletionListItem"
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/d3efe02259debc278067b827ef950b9919ec9354
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/d3efe02259debc278067b827ef950b9919ec9354
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]