From 176c415d4c8dc27906906ad1882f27304dc9fddd Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 19 May 2025 11:19:09 +0600 Subject: [PATCH] App chooser execution file name change --- source/libublsettingsui-gtk3-app-chooser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libublsettingsui-gtk3-app-chooser.c b/source/libublsettingsui-gtk3-app-chooser.c index 542e643..e0d8e07 100644 --- a/source/libublsettingsui-gtk3-app-chooser.c +++ b/source/libublsettingsui-gtk3-app-chooser.c @@ -61,15 +61,18 @@ int yon_app_chooser_convert_apps(yon_app_chooser_window *window){ window->apps_convert = NULL; for (int i=0;iapps_size;i++){ if (g_key_file_load_from_file(file,window->apps[i],G_KEY_FILE_KEEP_TRANSLATIONS,NULL)){ + char *exec_temp = yon_char_new(window->apps[i]); + free(yon_char_divide(exec_temp,yon_char_find_last(exec_temp,'/'))); struct application *app = new(struct application); memset(app,0,sizeof(struct application)); app->name = g_key_file_get_locale_string(file,"Desktop Entry","Name",setlocale(LC_ALL,NULL),NULL); app->description = g_key_file_get_locale_string(file,"[Desktop Entry","Comment",setlocale(LC_ALL,NULL),NULL); app->tags = g_key_file_get_string(file,"Desktop Entry","Categories",NULL); - app->execute = g_key_file_get_string(file,"Desktop Entry","Exec",NULL); + app->execute = yon_char_divide_search(exec_temp,".",-1); app->icon = g_key_file_get_string(file,"Desktop Entry","Icon",NULL); app->path = yon_char_new(window->apps[i]); yon_dictionary_add_or_create_if_exists_with_data(window->apps_convert,app->name,app); + free(exec_temp); } } if (window->apps_convert) return 1; else return 0;