summaryrefslogtreecommitdiff
path: root/src/gui/core/core.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2024-07-20 23:23:43 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2024-07-20 23:23:43 (GMT)
commite4ccb9e56e822628e299527fee0b7325f0d25662 (patch)
tree10d5eb35fad4ba01b757d4c403c912f209eacb3e /src/gui/core/core.c
parent9d0d5edf372a9f681bbfd0a3639ee8fc367ce96d (diff)
Prepare a welcome screen.
Diffstat (limited to 'src/gui/core/core.c')
-rw-r--r--src/gui/core/core.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gui/core/core.c b/src/gui/core/core.c
index 2d47dc9..d02d54c 100644
--- a/src/gui/core/core.c
+++ b/src/gui/core/core.c
@@ -24,6 +24,7 @@
#include "core.h"
+#include "panels.h"
#include "../../glibext/linetoken.h"
@@ -59,6 +60,15 @@ bool load_gui_components(AvailableGuiComponent flags)
}
+ if ((flags & AGC_PANELS) != 0 && (__loaded & AGC_PANELS) == 0)
+ {
+ result = load_main_panels();
+ if (!result) goto done;
+
+ __loaded |= AGC_PANELS;
+
+ }
+
done:
return result;
@@ -80,6 +90,14 @@ bool load_gui_components(AvailableGuiComponent flags)
void unload_gui_components(AvailableGuiComponent flags)
{
+ if ((flags & AGC_PANELS) != 0 && (__loaded & AGC_PANELS) == 0)
+ {
+ unload_all_panels();
+
+ __loaded &= ~AGC_PANELS;
+
+ }
+
if ((flags & AGC_BUFFER_FEATURES) != 0 && (__loaded & AGC_BUFFER_FEATURES) == 0)
{
exit_segment_content_hash_table();
@@ -87,7 +105,6 @@ void unload_gui_components(AvailableGuiComponent flags)
__loaded &= ~AGC_BUFFER_FEATURES;
}
-
}