[glib: 14/19] GWin32AppInfo: be less picky about names




commit a2c287bf9fd9819a7f70837be19f04fa54f88f50
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Tue Dec 15 07:57:28 2020 +0000

    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.

 gio/gwin32appinfo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
index bcabad71a..4da9d8e9d 100644
--- a/gio/gwin32appinfo.c
+++ b/gio/gwin32appinfo.c
@@ -4009,7 +4009,9 @@ g_win32_app_info_get_name (GAppInfo *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;
   else
     return P_("Unnamed");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]