[gedit/zbrown/deteplification-src: 308/633] Call gedit_dirs_shutdown() at the end of main()
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/zbrown/deteplification-src: 308/633] Call gedit_dirs_shutdown() at the end of main()
- Date: Sat, 10 Apr 2021 12:48:01 +0000 (UTC)
commit c337b24bf8d4b77318abbd29540a5de16d67c758
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 | 7 +++++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 7805a0462..27d71a87a 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -1143,8 +1143,6 @@ gedit_app_shutdown (GApplication *app)
* shutdown after.
*/
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 034887969..ee3769537 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -132,8 +132,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 ();
@@ -161,6 +162,8 @@ main (int argc, char *argv[])
G_OBJECT (app)->ref_count);
}
+ gedit_dirs_shutdown ();
+
#ifdef G_OS_WIN32
gedit_w32_unload_private_dll ();
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]