Minor optimization for packages loading

pull/47/head
parent fe2f2fc54c
commit a77405d1f2
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -40,7 +40,6 @@
// }
struct packages {
GHashTable *all_list;
GHashTable *installed_list;
@ -61,16 +60,19 @@ int yon_packages_init(){
config_str updates = yon_config_load("pacman -Qqu",&updates_size);
for (int i=0;i<size;i++){
while(gtk_events_pending()) gtk_main_iteration();
yon_char_remove_last_symbol(package_list[i],'\n');
g_hash_table_add(packages_struct.all_list,package_list[i]);
}
for (int i=0;i<installed_size;i++){
while(gtk_events_pending()) gtk_main_iteration();
yon_char_remove_last_symbol(installed[i],'\n');
g_hash_table_add(packages_struct.installed_list,installed[i]);
}
for (int i=0;i<updates_size;i++){
while(gtk_events_pending()) gtk_main_iteration();
yon_char_remove_last_symbol(updates[i],'\n');
g_hash_table_add(packages_struct.updates_list,updates[i]);
}

Loading…
Cancel
Save