Merge pull request 'Replaced package dependances list space separator to new line' (#79) from YanTheKaller/libublsettings-gtk3:master into master

Reviewed-on: #79
master v1.73
Dmitry Razumov 6 days ago
commit c4844e8fee

@ -94,6 +94,20 @@ apps *yon_apps_get(char *name){
return cur_app; 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){ config_str yon_apps_get_by_categories(config_str categories, int categories_size, int *final_size){
(*final_size) = 0; (*final_size) = 0;
GList *list = g_hash_table_get_values(_apps); GList *list = g_hash_table_get_values(_apps);

@ -334,7 +334,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)alpm_list_nth(depends_list,i)->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)alpm_list_nth(depends_list,i)->data)->name);
} }
package_info->depends = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->depends = yon_char_parsed_to_string(parsed,parsed_size, "\n");
// alpm_list_free(depends_list); // alpm_list_free(depends_list);
} }

@ -245,6 +245,14 @@
case YON_TYPE_STRING: g_key_file_set_string(__yon_window_config_file,section,param_name,(char*)tracked_value); case YON_TYPE_STRING: g_key_file_set_string(__yon_window_config_file,section,param_name,(char*)tracked_value);
break; break;
} }
GError *err = NULL;
if (!g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,&err)){
printf("%s\n",err->message);
}
{
struct passwd *user = getpwnam(yon_ubl_root_user_get());
int chown_success = chown(__yon_window_config_path,user->pw_uid,user->pw_gid);
}
} }
} }

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