[gnome-todo] application: Instrument code



commit 6d1ac38e3bcfbbae6949f9970f49169e299eb55c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Feb 3 12:06:40 2018 -0200

    application: Instrument code

 src/gtd-application.c | 20 +++++++++-----------
 src/main.c            |  2 ++
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/gtd-application.c b/src/gtd-application.c
index 764bfd5..ddb4392 100644
--- a/src/gtd-application.c
+++ b/src/gtd-application.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include "gtd-application.h"
+#include "gtd-debug.h"
 #include "gtd-initial-setup-window.h"
 #include "gtd-log.h"
 #include "gtd-manager.h"
@@ -98,7 +99,7 @@ gtd_application_start_client (GSimpleAction *simple,
                               gpointer       user_data)
 {
   /* TODO */
-  g_message ("Starting up client");
+  g_debug ("Starting up client");
 }
 
 static void
@@ -176,8 +177,6 @@ gtd_application_quit (GSimpleAction *simple,
 GtdApplication *
 gtd_application_new (void)
 {
-  g_set_application_name (_("To Do"));
-
   return g_object_new (GTD_TYPE_APPLICATION,
                        "application-id", "org.gnome.Todo",
                        "flags", G_APPLICATION_HANDLES_COMMAND_LINE,
@@ -236,16 +235,14 @@ run_initial_setup (GtdApplication *application)
 static void
 gtd_application_activate (GApplication *application)
 {
+  GTD_ENTRY;
+
   /* FIXME: the initial setup is disabled for the 3.18 release because
    * we can't create tasklists on GOA accounts.
    */
   run_window (GTD_APPLICATION (application));
-}
 
-static void
-gtd_application_finalize (GObject *object)
-{
-  G_OBJECT_CLASS (gtd_application_parent_class)->finalize (object);
+  GTD_EXIT;
 }
 
 static void
@@ -256,6 +253,8 @@ gtd_application_startup (GApplication *application)
   g_autoptr (GFile) css_file;
   g_autofree gchar *theme_name, *theme_uri;
 
+  GTD_ENTRY;
+
   self = GTD_APPLICATION (application);
 
   /* add actions */
@@ -292,6 +291,8 @@ gtd_application_startup (GApplication *application)
 
   /* Load the plugins */
   gtd_manager_load_plugins (gtd_manager_get_default ());
+
+  GTD_EXIT;
 }
 
 static gint
@@ -338,11 +339,8 @@ gtd_application_handle_local_options (GApplication *application,
 static void
 gtd_application_class_init (GtdApplicationClass *klass)
 {
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GApplicationClass *application_class = G_APPLICATION_CLASS (klass);
 
-  object_class->finalize = gtd_application_finalize;
-
   application_class->activate = gtd_application_activate;
   application_class->startup = gtd_application_startup;
   application_class->command_line = gtd_application_command_line;
diff --git a/src/main.c b/src/main.c
index 07e2d81..8165f19 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,6 +32,8 @@ main (gint  argc,
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
+  g_set_application_name (_("To Do"));
+
   app = gtd_application_new ();
   g_application_set_default (G_APPLICATION (app));
 


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