Added new function

pull/79/head
parent 70882b17f2
commit 997f8013f8

@ -94,6 +94,20 @@ apps *yon_apps_get(char *name){
return cur_app;
}
apps *yon_apps_find(char *name){
guint size = 0;
config_str keys = (config_str)g_hash_table_get_keys_as_array(_apps,&size);
apps *cur_app = NULL;
for (guint i=0;i<size;i++){
if (strstr(keys[i],name)){
cur_app = yon_apps_get(keys[i]);
break;
}
}
return cur_app;
}
config_str yon_apps_get_by_categories(config_str categories, int categories_size, int *final_size){
(*final_size) = 0;
GList *list = g_hash_table_get_values(_apps);

@ -684,6 +684,8 @@ gboolean yon_apps_check_init();
/// @return Structure with information about the application from the system
apps *yon_apps_get(char *name);
apps *yon_apps_find(char *name);
/// @brief Get all apps from the category list
/// @param categories List of categories for which applications are searched
/// @param categories_size The length of the category list
@ -759,6 +761,7 @@ char *yon_timezone_get_utc(const char *timezone);
/// @return A newly allocated string with converted representation of bytes
char *yon_size_long_convert_automatic_to_string(unsigned long bytes);
/// @brief Block widget from destruction;
void yon_gtk_widget_block_destruction(GtkWidget *target);
#endif
Loading…
Cancel
Save