[balsa/gtk4: 194/276] main: Adapt to libinit-balsa API change
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 194/276] main: Adapt to libinit-balsa API change
- Date: Sat, 12 Dec 2020 16:03:33 +0000 (UTC)
commit 86e733af0ddd9d4f68f3ffa32b429ab4054f92c0
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu Oct 15 12:40:04 2020 -0400
main: Adapt to libinit-balsa API change
src/main.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 3fc45220d..711fdc384 100644
--- a/src/main.c
+++ b/src/main.c
@@ -143,13 +143,27 @@ check_special_mailboxes(void)
return bomb;
}
+static void
+config_finish(void)
+{
+ config_load();
+ config_defclient_save();
+ g_application_activate(G_APPLICATION(balsa_app.application));
+}
+
static void
config_init(void)
{
- while (!config_load()) {
- balsa_init_begin();
+ if (config_load())
+ g_application_activate(G_APPLICATION(balsa_app.application));
+ else
+ balsa_init_begin(config_finish);
+}
+
+static void
+mailboxes_finish(void)
+{
config_defclient_save();
- }
}
static void
@@ -158,9 +172,7 @@ mailboxes_init(gboolean check_only)
check_special_mailboxes();
if (!balsa_app.inbox && !check_only) {
g_warning("*** error loading mailboxes");
- balsa_init_begin();
- config_defclient_save();
- return;
+ balsa_init_begin(mailboxes_finish);
}
}
@@ -754,7 +766,6 @@ balsa_command_line_cb(GApplication * application,
} else {
/* checking for valid config files */
config_init();
- g_application_activate(application);
}
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]