It's interesting, g_app_info_get_default_for_type() by itself does take mimeapps.list into account. As an experiment, I have created ~/.local/share/applications/mimeapps.list with the following line:
It prints "gwenview". However, FF doesn't seem to take mimeapps.list into account and uses associations from mimeinfo.cache - e.g., when I click "Open containing folder" menu item for the downloaded file, the folder is opened using Dolphin (which is the default system-wide association), not Gwenview.
I do see g_app_info_get_default_for_type() is called in FF the code, so something strange is going on here, indeed. And this makes FF quite inconvenient for KDE users, since KDE stores file associations in mimeapps.list; as a result, FF doesn't use associations set in the KDE control Center.
It's interesting, g_app_info_ get_default_ for_type( ) by itself does take mimeapps.list into account. As an experiment, I have created ~/.local/ share/applicati ons/mimeapps. list with the following line:
inode/ directory= kde4-gwenview. desktop;
And used the following sample program:
g_type_init (); get_default_ for_type ("inode/directory", TRUE); app_info_ get_executable( def));
GAppInfo *def;
def = g_app_info_
printf("EXEC: %s\n",g_
It prints "gwenview". However, FF doesn't seem to take mimeapps.list into account and uses associations from mimeinfo.cache - e.g., when I click "Open containing folder" menu item for the downloaded file, the folder is opened using Dolphin (which is the default system-wide association), not Gwenview.
I do see g_app_info_ get_default_ for_type( ) is called in FF the code, so something strange is going on here, indeed. And this makes FF quite inconvenient for KDE users, since KDE stores file associations in mimeapps.list; as a result, FF doesn't use associations set in the KDE control Center.