No result returned using Gio.DesktopAppInfo.search('some_string') in some case
Hi,
I'm using python to get .desktop files then launch it via Gio.DesktopAppInfo.launch().
But I can't get excepted result using Gio.DesktopAppInfo.search('some_string').
For examples.
For 'onlyoffice-desktopeditors_onlyoffice-desktopeditors.desktop', Gio.DesktopAppInfo.search('onlyoffice') and Gio.DesktopAppInfo.search('editors') have non-empty list which is what I'm excepted.
But Gio.DesktopAppInfo.search('peditors') and Gio.DesktopAppInfo.search('desktopeditors') return an empty list.
I'm quit confused and don't understand.
Complete test code:
def test_get_string():
import gi
from gi.repository import Gio
r = Gio.DesktopAppInfo.search('onlyoffice')
print(r)
r = Gio.DesktopAppInfo.search('editors')
print(r)
r = Gio.DesktopAppInfo.search('peditors')
print(r)
r = Gio.DesktopAppInfo.search('desktopeditors')
print(r)
# Output
[['snap-onlyoffice-desktopeditors_onlyoffice-desktopeditors.desktop', 'onlyoffice-desktopeditors_onlyoffice-desktopeditors.desktop']]
[['snap-onlyoffice-desktopeditors_onlyoffice-desktopeditors.desktop', 'onlyoffice-desktopeditors_onlyoffice-desktopeditors.desktop']]
[] # I expect the same result like the above
[] # I expect the same result like the above
p.s. I know this project is written in C. I'm planing to test this issue with Glib, but I'm not familiar with C, it will take me a very long time.
I can't get some useful resources in the Internet to help me understand and address this issue. So I put it here, hope someone can help me figure out.
If this is not a proper place to submit this issue, please tell me where I can ask? Thank you very much.