[gedit] Factory: create it in main() and set it as the TeplAbstractFactory



commit d5a43cece2082c79a4812e6a12ff2d4ab2ff8ae9
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun May 3 00:50:11 2020 +0200

    Factory: create it in main() and set it as the TeplAbstractFactory

 gedit/gedit.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gedit/gedit.c b/gedit/gedit.c
index 48d65c196..b48c79741 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -34,6 +34,7 @@
 
 #include "gedit-dirs.h"
 #include "gedit-debug.h"
+#include "gedit-factory.h"
 #include "gedit-settings.h"
 
 #ifdef G_OS_WIN32
@@ -116,6 +117,7 @@ int
 main (int argc, char *argv[])
 {
        GType type;
+       GeditFactory *factory;
        GeditApp *app;
        gint status;
 
@@ -138,6 +140,8 @@ main (int argc, char *argv[])
 
        setup_i18n ();
        tepl_init ();
+       factory = gedit_factory_new ();
+       tepl_abstract_factory_set_singleton (TEPL_ABSTRACT_FACTORY (factory));
 
        app = g_object_new (type,
                            "application-id", "org.gnome.gedit",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]