GWin32AppInfo: be less picky about names

Use pretty name as the result of _name(), if available. This is
more in line with what .desktop files return. Canonical name
may be completely unintelligible.
This commit is contained in:
Руслан Ижбулатов 2020-12-15 07:57:28 +00:00
parent e7a738711b
commit a2c287bf9f

View File

@ -4009,7 +4009,9 @@ g_win32_app_info_get_name (GAppInfo *appinfo)
{ {
GWin32AppInfo *info = G_WIN32_APP_INFO (appinfo); GWin32AppInfo *info = G_WIN32_APP_INFO (appinfo);
if (info->app && info->app->canonical_name_u8) if (info->app && info->app->pretty_name_u8)
return info->app->pretty_name_u8;
else if (info->app && info->app->canonical_name_u8)
return info->app->canonical_name_u8; return info->app->canonical_name_u8;
else else
return P_("Unnamed"); return P_("Unnamed");