|
|
|
@ -918,7 +918,7 @@ dictionary *yon_scan_desktops(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (apps_dict) return apps_dict;
|
|
|
|
if (apps_dict) return apps_dict;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static apps *scanned_application = NULL;
|
|
|
|
apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int size = 0;
|
|
|
|
int size = 0;
|
|
|
|
@ -941,7 +941,8 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
apps tempapp;
|
|
|
|
apps tempapp;
|
|
|
|
GKeyFile *gfile = g_key_file_new();
|
|
|
|
GKeyFile *gfile = g_key_file_new();
|
|
|
|
GError *err = NULL;
|
|
|
|
GError *err = NULL;
|
|
|
|
g_key_file_load_from_file(gfile, path, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
|
|
|
|
g_key_file_load_from_file(gfile, path, G_KEY_FILE_KEEP_TRANSLATIONS, &err);
|
|
|
|
|
|
|
|
if (!err){
|
|
|
|
char *Type = g_key_file_get_string(gfile, "Desktop Entry", "Type", &err);
|
|
|
|
char *Type = g_key_file_get_string(gfile, "Desktop Entry", "Type", &err);
|
|
|
|
if (err)
|
|
|
|
if (err)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -998,6 +999,8 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
size++;
|
|
|
|
size++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
g_key_file_free(gfile);
|
|
|
|
g_key_file_free(gfile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1005,6 +1008,7 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*sizef = size;
|
|
|
|
*sizef = size;
|
|
|
|
|
|
|
|
scanned_application = applist;
|
|
|
|
return applist;
|
|
|
|
return applist;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -1098,7 +1102,7 @@ char *yon_app_chooser_open_with_sections(char *section_name, char *section_filte
|
|
|
|
}
|
|
|
|
}
|
|
|
|
va_end(args);
|
|
|
|
va_end(args);
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
apps *app_list = yon_apps_scan_and_parse_desktops(&size);
|
|
|
|
apps *app_list = scanned_application ? scanned_application : yon_apps_scan_and_parse_desktops(&size);
|
|
|
|
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store),&iter);
|
|
|
|
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store),&iter);
|
|
|
|
for (; valid; valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store),&iter)){
|
|
|
|
for (; valid; valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store),&iter)){
|
|
|
|
char *cur_categories;
|
|
|
|
char *cur_categories;
|
|
|
|
|