diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-04-09 06:14:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-04-09 06:14:53 (GMT) |
commit | 799edfed201e47b5d16fa811ffc77231695000d7 (patch) | |
tree | 5f539bb5498a594db48299fac059f72bcd92df9c /src/gui/core/core.c | |
parent | 010c4d4c07d19ff3f50d0f3caa9fc519ec17df14 (diff) |
Introduced a new theme format.
Diffstat (limited to 'src/gui/core/core.c')
-rw-r--r-- | src/gui/core/core.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/core/core.c b/src/gui/core/core.c index 8783783..a0904f8 100644 --- a/src/gui/core/core.c +++ b/src/gui/core/core.c @@ -90,10 +90,16 @@ bool load_all_gui_components(void) bool complete_loading_of_all_gui_components(GGenConfig *config) { bool result; /* Bilan à faire remonter */ + const char *name; /* Nom du thème recherché */ GtkTiledGrid *grid; /* Composant d'affichage */ GPanelItem *welcome; /* Panneau d'accueil */ - load_extra_gtk_theme(); + result = g_generic_config_get_value(config, MPK_INTERNAL_THEME, &name); + if (!result) goto no_theme; + + load_all_themes(); + + apply_gtk_theme(name); result = load_segment_rendering_parameters(); @@ -119,6 +125,8 @@ bool complete_loading_of_all_gui_components(GGenConfig *config) gtk_tiled_grid_restore_positions(grid, config); + no_theme: + return result; } @@ -140,4 +148,6 @@ void unload_all_gui_components(void) { exit_segment_content_hash_table(); + unload_all_themes(); + } |