[gnome-photos] build: reduce libdazzle usage



commit 7fea3e1567fc5998852797b2e89356071f7b0451
Author: Stephan Vedder <vedder mbits info>
Date:   Mon Aug 8 16:16:54 2022 +0200

    build: reduce libdazzle usage
    
    It's deprecated and must be replaced for Gtk4

 src/photos-base-item.c            |  6 ------
 src/photos-item-manager.c         |  7 -------
 src/photos-main.c                 | 16 ----------------
 src/photos-offset-controller.c    | 10 ----------
 src/photos-pipeline.c             |  7 -------
 src/photos-selection-controller.c | 10 ----------
 src/photos-source.c               |  8 --------
 src/photos-tracker-controller.c   | 10 ----------
 8 files changed, 74 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index f249d359..ce974771 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -134,8 +134,6 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (PhotosBaseItem, photos_base_item, G_TYPE_OBJEC
                                                          photos_base_item_main_box_item_iface_init)
                                   G_IMPLEMENT_INTERFACE (PHOTOS_TYPE_FILTERABLE,
                                                          photos_base_item_filterable_iface_init));
-DZL_DEFINE_COUNTER (instances, "PhotosBaseItem", "Instances", "Number of PhotosBaseItem instances")
-
 
 typedef struct _PhotosBaseItemMetadataAddSharedData PhotosBaseItemMetadataAddSharedData;
 typedef struct _PhotosBaseItemQueryInfoData PhotosBaseItemQueryInfoData;
@@ -3059,8 +3057,6 @@ photos_base_item_finalize (GObject *object)
   g_mutex_clear (&priv->mutex_save_metadata);
 
   G_OBJECT_CLASS (photos_base_item_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -3148,8 +3144,6 @@ photos_base_item_init (PhotosBaseItem *self)
 {
   PhotosBaseItemPrivate *priv;
 
-  DZL_COUNTER_INC (instances);
-
   priv = photos_base_item_get_instance_private (self);
 
   priv->cancellable = g_cancellable_new ();
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 73ccaaa6..85b9830b 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -25,7 +25,6 @@
 
 #include <string.h>
 
-#include <dazzle.h>
 #include <gio/gio.h>
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -86,8 +85,6 @@ static void photos_item_manager_list_model_iface_init (GListModelInterface *ifac
 
 G_DEFINE_TYPE_WITH_CODE (PhotosItemManager, photos_item_manager, PHOTOS_TYPE_BASE_MANAGER,
                          G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, 
photos_item_manager_list_model_iface_init));
-DZL_DEFINE_COUNTER (instances, "PhotosItemManager", "Instances", "Number of PhotosItemManager instances")
-
 
 typedef struct _PhotosItemManagerHiddenItem PhotosItemManagerHiddenItem;
 
@@ -1075,8 +1072,6 @@ photos_item_manager_finalize (GObject *object)
   g_free (self->constrain_additions);
 
   G_OBJECT_CLASS (photos_item_manager_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -1086,8 +1081,6 @@ photos_item_manager_init (PhotosItemManager *self)
   GEnumClass *window_mode_class; /* TODO: use g_autoptr */
   guint i;
 
-  DZL_COUNTER_INC (instances);
-
   self->collections = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
   self->hidden_items = g_hash_table_new_full (g_str_hash,
                                               g_str_equal,
diff --git a/src/photos-main.c b/src/photos-main.c
index a7477041..e7e13e47 100644
--- a/src/photos-main.c
+++ b/src/photos-main.c
@@ -23,28 +23,15 @@
 
 #include "config.h"
 
-#include <dazzle.h>
 #include <glib.h>
 
 #include "photos-application.h"
 #include "photos-debug.h"
 #include "photos-remote-display-manager.h"
 
-
-static void
-photos_main_counter_arena_foreach (DzlCounter *counter, gpointer user_data)
-{
-  gint64 count;
-
-  count = dzl_counter_get (counter);
-  photos_debug (PHOTOS_DEBUG_MEMORY, "%s.%s = %" G_GINT64_FORMAT, counter->category, counter->name, count);
-}
-
-
 gint
 main (gint argc, gchar *argv[])
 {
-  DzlCounterArena *counter_arena;
   gint exit_status;
 
   {
@@ -61,8 +48,5 @@ main (gint argc, gchar *argv[])
     exit_status = g_application_run (app, argc, argv);
   }
 
-  counter_arena = dzl_counter_arena_get_default ();
-  dzl_counter_arena_foreach (counter_arena, photos_main_counter_arena_foreach, NULL);
-
   return exit_status;
 }
diff --git a/src/photos-offset-controller.c b/src/photos-offset-controller.c
index 5b47e098..9acdc5ce 100644
--- a/src/photos-offset-controller.c
+++ b/src/photos-offset-controller.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 
-#include <dazzle.h>
 #include <glib.h>
 #include <tracker-sparql.h>
 
@@ -52,11 +51,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
 
 
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (PhotosOffsetController, photos_offset_controller, G_TYPE_OBJECT);
-DZL_DEFINE_COUNTER (instances,
-                    "PhotosOffsetController",
-                    "Instances",
-                    "Number of PhotosOffsetController instances")
-
 
 enum
 {
@@ -160,8 +154,6 @@ static void
 photos_offset_controller_finalize (GObject *object)
 {
   G_OBJECT_CLASS (photos_offset_controller_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -170,8 +162,6 @@ photos_offset_controller_init (PhotosOffsetController *self)
 {
   PhotosOffsetControllerPrivate *priv;
 
-  DZL_COUNTER_INC (instances);
-
   priv = photos_offset_controller_get_instance_private (self);
 
   priv->cancellable = g_cancellable_new ();
diff --git a/src/photos-pipeline.c b/src/photos-pipeline.c
index 2a667f44..61b75cf4 100644
--- a/src/photos-pipeline.c
+++ b/src/photos-pipeline.c
@@ -22,7 +22,6 @@
 
 #include <string.h>
 
-#include <dazzle.h>
 #include <glib.h>
 
 #include "photos-debug.h"
@@ -52,8 +51,6 @@ static void photos_pipeline_async_initable_iface_init (GAsyncInitableIface *ifac
 
 G_DEFINE_TYPE_EXTENDED (PhotosPipeline, photos_pipeline, G_TYPE_OBJECT, 0,
                         G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, 
photos_pipeline_async_initable_iface_init));
-DZL_DEFINE_COUNTER (instances, "PhotosPipeline", "Instances", "Number of PhotosPipeline instances")
-
 
 static const gchar *OPERATIONS[] =
 {
@@ -294,8 +291,6 @@ photos_pipeline_finalize (GObject *object)
   g_free (self->snapshot);
 
   G_OBJECT_CLASS (photos_pipeline_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -329,8 +324,6 @@ photos_pipeline_set_property (GObject *object, guint prop_id, const GValue *valu
 static void
 photos_pipeline_init (PhotosPipeline *self)
 {
-  DZL_COUNTER_INC (instances);
-
   self->hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
   self->graph = gegl_node_new ();
 }
diff --git a/src/photos-selection-controller.c b/src/photos-selection-controller.c
index 5bbcfcec..2d9853d5 100644
--- a/src/photos-selection-controller.c
+++ b/src/photos-selection-controller.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 
-#include <dazzle.h>
 #include <gio/gio.h>
 #include <glib.h>
 
@@ -51,11 +50,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
 
 
 G_DEFINE_TYPE (PhotosSelectionController, photos_selection_controller, G_TYPE_OBJECT);
-DZL_DEFINE_COUNTER (instances,
-                    "PhotosSelectionController",
-                    "Instances",
-                    "Number of PhotosSelectionController instances")
-
 
 static void
 photos_selection_controller_object_removed (PhotosBaseManager *manager, GObject *object, gpointer user_data)
@@ -112,8 +106,6 @@ photos_selection_controller_finalize (GObject *object)
     g_object_remove_weak_pointer (G_OBJECT (self->item_mngr), (gpointer *) &self->item_mngr);
 
   G_OBJECT_CLASS (photos_selection_controller_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -123,8 +115,6 @@ photos_selection_controller_init (PhotosSelectionController *self)
   GApplication *app;
   PhotosSearchContextState *state;
 
-  DZL_COUNTER_INC (instances);
-
   app = g_application_get_default ();
   state = photos_search_context_get_state (PHOTOS_SEARCH_CONTEXT (app));
 
diff --git a/src/photos-source.c b/src/photos-source.c
index 4bfcd969..7162c00f 100644
--- a/src/photos-source.c
+++ b/src/photos-source.c
@@ -23,8 +23,6 @@
 
 #include "config.h"
 
-#include <dazzle.h>
-
 #include "photos-filterable.h"
 #include "photos-query.h"
 #include "photos-source.h"
@@ -59,8 +57,6 @@ static void photos_source_filterable_iface_init (PhotosFilterableInterface *ifac
 G_DEFINE_TYPE_WITH_CODE (PhotosSource, photos_source, G_TYPE_OBJECT,
                          G_IMPLEMENT_INTERFACE (PHOTOS_TYPE_FILTERABLE,
                                                 photos_source_filterable_iface_init));
-DZL_DEFINE_COUNTER (instances, "PhotosSource", "Instances", "Number of PhotosSource instances")
-
 
 static const gchar *TRACKER_SCHEMA = "org.freedesktop.Tracker3.Miner.Files";
 static const gchar *TRACKER_KEY_RECURSIVE_DIRECTORIES = "index-recursive-directories";
@@ -222,8 +218,6 @@ photos_source_finalize (GObject *object)
   g_free (self->name);
 
   G_OBJECT_CLASS (photos_source_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -363,10 +357,8 @@ photos_source_set_property (GObject *object, guint prop_id, const GValue *value,
 static void
 photos_source_init (PhotosSource *self)
 {
-  DZL_COUNTER_INC (instances);
 }
 
-
 static void
 photos_source_class_init (PhotosSourceClass *class)
 {
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
index 4f593890..579acc7b 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 
-#include <dazzle.h>
 #include <glib.h>
 #include <glib/gi18n.h>
 
@@ -81,11 +80,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
 
 
 G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (PhotosTrackerController, photos_tracker_controller, G_TYPE_OBJECT);
-DZL_DEFINE_COUNTER (instances,
-                    "PhotosTrackerController",
-                    "Instances",
-                    "Number of PhotosTrackerController instances")
-
 
 enum
 {
@@ -526,8 +520,6 @@ photos_tracker_controller_finalize (GObject *object)
   g_clear_error (&priv->queue_error);
 
   G_OBJECT_CLASS (photos_tracker_controller_parent_class)->finalize (object);
-
-  DZL_COUNTER_DEC (instances);
 }
 
 
@@ -563,8 +555,6 @@ photos_tracker_controller_init (PhotosTrackerController *self)
   GApplication *app;
   PhotosSearchContextState *state;
 
-  DZL_COUNTER_INC (instances);
-
   priv = photos_tracker_controller_get_instance_private (self);
 
   app = g_application_get_default ();


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