Merge pull request 'Fixed crash' (#88) from YanTheKaller/ubl-settings-manager:master into master

Reviewed-on: #88
master v2.14
Dmitry Razumov 5 days ago
commit 66389e0b57

@ -2,8 +2,8 @@
theme_struct *yon_theme_update(main_window *widgets){
char *theme_id;
if (!yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){
theme_id = yon_char_new(MAIN_THEME_LABEL);
if (!yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)||!g_hash_table_contains(main_config.themes,theme_id)){
theme_id = yon_char_new("MAIN_THEME_LABEL");
}
theme_struct *theme = ((theme_struct*(*)())g_hash_table_lookup(main_config.themes,theme_id))();
@ -27,6 +27,6 @@ theme_struct *yon_theme_update(main_window *widgets){
void yon_theme_init(){
// theme_struct *gnome_struct = (theme_struct*)yon_gnome_theme_new();
// theme_struct *main_struct = (theme_struct*)yon_main_theme_new();
g_hash_table_insert(main_config.themes,yon_char_new(GNOME_THEME_LABEL),yon_gnome_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new(MAIN_THEME_LABEL),yon_main_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new("GNOME_THEME_LABEL"),yon_gnome_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new("MAIN_THEME_LABEL"),yon_main_theme_new);
}
Loading…
Cancel
Save