[gnome-notes] application: initialize settings in startup()



commit 3277d3a2538beec8e3ed7a0ce51a3e5ab00a215d
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Mon Mar 15 08:39:42 2021 +0530

    application: initialize settings in startup()
    
    init() is executed for every application instance created (whether it's remote or not).
    But we require settings and icon to be set only for primary instance.
    
    This will also speedup launching of remote instances, though it's
    not a big concern here.

 src/bjb-application.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/bjb-application.c b/src/bjb-application.c
index dfa0567..6792d1c 100644
--- a/src/bjb-application.c
+++ b/src/bjb-application.c
@@ -216,10 +216,7 @@ bijiben_open (GApplication  *application,
 static void
 bjb_application_init (BjbApplication *self)
 {
-  self->settings = bjb_settings_new ();
   g_queue_init (&self->files_to_open);
-
-  gtk_window_set_default_icon_name ("org.gnome.Notes");
 }
 
 
@@ -377,6 +374,9 @@ bijiben_startup (GApplication *application)
   G_APPLICATION_CLASS (bjb_application_parent_class)->startup (application);
   self = BJB_APPLICATION (application);
 
+  self->settings = bjb_settings_new ();
+
+  gtk_window_set_default_icon_name ("org.gnome.Notes");
   bjb_apply_style (self);
 
   gtk_application_set_accels_for_action (GTK_APPLICATION (application), "win.close", vaccels_close);


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