gmenu-tree.c: Return a basename if no appinfo is available when
sorting.
This is a workaround: if a desktop file is edited and becomes
invalid, the tree rebuilds and re-loading that file initially fails
and gets added to our "retry later" list (see b5495c4176e). The
problem is, mimeinfo never updates in this case, and we end up
with basically an invalid desktop entry with no appinfo.
This is mainly to silence a lot of runtime warnings because the
sorting fails.
Michael Webster
3 years ago
1778 | 1778 | break; |
1779 | 1779 | |
1780 | 1780 | case GMENU_TREE_ITEM_ENTRY: |
1781 | if (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item)) == NULL) | |
1782 | { | |
1783 | return desktop_entry_get_basename (GMENU_TREE_ENTRY (item)->desktop_entry); | |
1784 | } | |
1785 | ||
1781 | 1786 | if (flags & GMENU_TREE_FLAGS_SORT_DISPLAY_NAME) |
1782 | 1787 | name = g_app_info_get_display_name (G_APP_INFO (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item)))); |
1783 | 1788 | else |