[gedit] Call gedit_dirs_shutdown() at the end of main()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Call gedit_dirs_shutdown() at the end of main()
- Date: Wed, 6 May 2020 21:27:15 +0000 (UTC)
commit caed551a570f7676f10b30a227214c97804cf344
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed May 6 23:20:16 2020 +0200
Call gedit_dirs_shutdown() at the end of main()
To pair it with gedit_dirs_init(), it's more logical.
It fixes a bug with gedit_dirs_shutdown() being called *before* saving
the metadata. And for saving the metadata one of the gedit dirs is
needed (see GeditFactory).
gedit/gedit-app.c | 2 --
gedit/gedit.c | 6 ++++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 07cd28f0d..5532d5975 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -1115,8 +1115,6 @@ gedit_app_shutdown (GApplication *app)
save_print_settings (GEDIT_APP (app));
G_APPLICATION_CLASS (gedit_app_parent_class)->shutdown (app);
-
- gedit_dirs_shutdown ();
}
static gboolean
diff --git a/gedit/gedit.c b/gedit/gedit.c
index b48c79741..fcffdaca6 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -134,8 +134,9 @@ main (int argc, char *argv[])
type = GEDIT_TYPE_APP;
#endif
- /* NOTE: we should not make any calls to the gedit api before the
- * private library is loaded */
+ /* NOTE: we should not make any calls to the gedit API before the
+ * private library is loaded.
+ */
gedit_dirs_init ();
setup_i18n ();
@@ -167,6 +168,7 @@ main (int argc, char *argv[])
}
tepl_finalize ();
+ gedit_dirs_shutdown ();
#ifdef G_OS_WIN32
gedit_w32_unload_private_dll ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]