[buoh] Use G_DEFINE_FINAL_TYPE



commit 741e67031fbe97bdd47be8b6a5af234bed7d01aa
Author: Jan Tojnar <jtojnar gmail com>
Date:   Mon Nov 1 08:48:19 2021 +0100

    Use G_DEFINE_FINAL_TYPE
    
    https://www.bassi.io/articles/2021/07/27/final-types/
    
    Requires GLib 2.70

 meson.build                   | 2 +-
 src/buoh-add-comic-dialog.c   | 2 +-
 src/buoh-application.c        | 2 +-
 src/buoh-comic-cache.c        | 2 +-
 src/buoh-comic-list.c         | 2 +-
 src/buoh-comic-loader.c       | 2 +-
 src/buoh-comic-manager-date.c | 2 +-
 src/buoh-comic.c              | 2 +-
 src/buoh-properties-dialog.c  | 2 +-
 src/buoh-view-comic.c         | 2 +-
 src/buoh-view-message.c       | 2 +-
 src/buoh-view.c               | 2 +-
 src/buoh-window.c             | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1e60e92..17440f0 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@ comicsdir = join_paths(pkgdatadir, 'comics')
 
 # Dependencies
 gtk = dependency('gtk+-3.0', version: '>= 3.22.0')
-glib = dependency('glib-2.0', version: '>= 2.26.0')
+glib = dependency('glib-2.0', version: '>= 2.70.0')
 libsoup = dependency('libsoup-2.4', version: '>= 2.4.0')
 libxml2 = dependency('libxml-2.0', version: '>= 2.4.0')
 
diff --git a/src/buoh-add-comic-dialog.c b/src/buoh-add-comic-dialog.c
index 92c49a0..1022b61 100644
--- a/src/buoh-add-comic-dialog.c
+++ b/src/buoh-add-comic-dialog.c
@@ -43,7 +43,7 @@ static void buoh_add_comic_toggled_cb             (GtkCellRendererToggle *render
                                                    gchar                 *path,
                                                    gpointer               gdata);
 
-G_DEFINE_TYPE(BuohAddComicDialog, buoh_add_comic_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_FINAL_TYPE(BuohAddComicDialog, buoh_add_comic_dialog, GTK_TYPE_DIALOG)
 
 static void
 buoh_add_comic_dialog_init (BuohAddComicDialog *dialog)
diff --git a/src/buoh-application.c b/src/buoh-application.c
index eb21066..24607cb 100644
--- a/src/buoh-application.c
+++ b/src/buoh-application.c
@@ -56,7 +56,7 @@ static void          buoh_application_save_comic_list        (GtkTreeModel
                                                               gpointer                 gdata);
 static void          buoh_application_create_user_dir        (BuohApplication         *buoh);
 
-G_DEFINE_TYPE (BuohApplication, buoh_application, GTK_TYPE_APPLICATION)
+G_DEFINE_FINAL_TYPE (BuohApplication, buoh_application, GTK_TYPE_APPLICATION)
 
 void
 buoh_debug (const gchar *format, ...)
diff --git a/src/buoh-comic-cache.c b/src/buoh-comic-cache.c
index 6c5591c..debb277 100644
--- a/src/buoh-comic-cache.c
+++ b/src/buoh-comic-cache.c
@@ -43,7 +43,7 @@ static void buoh_comic_cache_init       (BuohComicCache *buoh_comic_cache);
 static void buoh_comic_cache_class_init (BuohComicCacheClass *klass);
 static void buoh_comic_cache_finalize   (GObject *object);
 
-G_DEFINE_TYPE (BuohComicCache, buoh_comic_cache, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (BuohComicCache, buoh_comic_cache, G_TYPE_OBJECT)
 
 static void
 buoh_comic_cache_init (BuohComicCache *buoh_comic_cache)
diff --git a/src/buoh-comic-list.c b/src/buoh-comic-list.c
index 0142cae..c56b454 100644
--- a/src/buoh-comic-list.c
+++ b/src/buoh-comic-list.c
@@ -59,7 +59,7 @@ static gboolean buoh_comic_list_visible            (GtkTreeModel     *model,
                                                     GtkTreeIter      *iter,
                                                     gpointer          gdata);
 
-G_DEFINE_TYPE (BuohComicList, buoh_comic_list, GTK_TYPE_BIN)
+G_DEFINE_FINAL_TYPE (BuohComicList, buoh_comic_list, GTK_TYPE_BIN)
 
 static void
 buoh_comic_list_selection_changed (GtkTreeSelection *selection, gpointer gdata)
diff --git a/src/buoh-comic-loader.c b/src/buoh-comic-loader.c
index 1cebdb1..c531913 100644
--- a/src/buoh-comic-loader.c
+++ b/src/buoh-comic-loader.c
@@ -46,7 +46,7 @@ static void  buoh_comic_loader_job_init         (BuohComicLoaderJob      *job);
 static void  buoh_comic_loader_job_class_init   (BuohComicLoaderJobClass *klass);
 static void  buoh_comic_loader_job_finalize     (GObject                 *object);
 
-G_DEFINE_TYPE (BuohComicLoaderJob, buoh_comic_loader_job, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (BuohComicLoaderJob, buoh_comic_loader_job, G_TYPE_OBJECT)
 
 typedef struct {
         BuohComicLoaderJob *job;
diff --git a/src/buoh-comic-manager-date.c b/src/buoh-comic-manager-date.c
index 665a62e..6b640c6 100644
--- a/src/buoh-comic-manager-date.c
+++ b/src/buoh-comic-manager-date.c
@@ -69,7 +69,7 @@ static const gchar *day_names[] = {
         N_("Sunday")
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (BuohComicManagerDate, buoh_comic_manager_date, BUOH_TYPE_COMIC_MANAGER)
+G_DEFINE_FINAL_TYPE_WITH_PRIVATE (BuohComicManagerDate, buoh_comic_manager_date, BUOH_TYPE_COMIC_MANAGER)
 
 static void
 buoh_comic_manager_date_init (BuohComicManagerDate *comic_manager)
diff --git a/src/buoh-comic.c b/src/buoh-comic.c
index 9e69f6c..0ce5084 100644
--- a/src/buoh-comic.c
+++ b/src/buoh-comic.c
@@ -70,7 +70,7 @@ static void buoh_comic_set_property (GObject        *object,
                                      const GValue   *value,
                                      GParamSpec     *pspec);
 
-G_DEFINE_TYPE (BuohComic, buoh_comic, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (BuohComic, buoh_comic, G_TYPE_OBJECT)
 
 static void
 buoh_comic_init (BuohComic *buoh_comic)
diff --git a/src/buoh-properties-dialog.c b/src/buoh-properties-dialog.c
index d45a714..17a262e 100644
--- a/src/buoh-properties-dialog.c
+++ b/src/buoh-properties-dialog.c
@@ -44,7 +44,7 @@ struct _BuohPropertiesDialog {
 static void buoh_properties_dialog_init       (BuohPropertiesDialog      *dialog);
 static void buoh_properties_dialog_class_init (BuohPropertiesDialogClass *klass);
 
-G_DEFINE_TYPE (BuohPropertiesDialog, buoh_properties_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_FINAL_TYPE (BuohPropertiesDialog, buoh_properties_dialog, GTK_TYPE_DIALOG)
 
 static void
 buoh_properties_dialog_init (BuohPropertiesDialog *dialog)
diff --git a/src/buoh-view-comic.c b/src/buoh-view-comic.c
index 7b7dbfd..5c1985e 100644
--- a/src/buoh-view-comic.c
+++ b/src/buoh-view-comic.c
@@ -123,7 +123,7 @@ static void     buoh_view_comic_zoom                  (BuohViewComic    *c_view,
                                                        gdouble           factor,
                                                        gboolean          relative);
 
-G_DEFINE_TYPE (BuohViewComic, buoh_view_comic, GTK_TYPE_VIEWPORT)
+G_DEFINE_FINAL_TYPE (BuohViewComic, buoh_view_comic, GTK_TYPE_VIEWPORT)
 
 static void
 buoh_view_comic_init (BuohViewComic *c_view)
diff --git a/src/buoh-view-message.c b/src/buoh-view-message.c
index 7824a4a..ce60cc3 100644
--- a/src/buoh-view-message.c
+++ b/src/buoh-view-message.c
@@ -32,7 +32,7 @@ struct _BuohViewMessage {
 static void buoh_view_message_init          (BuohViewMessage *m_view);
 static void buoh_view_message_class_init    (BuohViewMessageClass *klass);
 
-G_DEFINE_TYPE (BuohViewMessage, buoh_view_message, GTK_TYPE_VIEWPORT)
+G_DEFINE_FINAL_TYPE (BuohViewMessage, buoh_view_message, GTK_TYPE_VIEWPORT)
 
 static void
 buoh_view_message_init (BuohViewMessage *m_view)
diff --git a/src/buoh-view.c b/src/buoh-view.c
index a612625..1a81f55 100644
--- a/src/buoh-view.c
+++ b/src/buoh-view.c
@@ -74,7 +74,7 @@ static void     buoh_view_scale_changed_cb   (GObject        *object,
                                               GParamSpec     *arg,
                                               gpointer        gdata);
 
-G_DEFINE_TYPE (BuohView, buoh_view, GTK_TYPE_STACK)
+G_DEFINE_FINAL_TYPE (BuohView, buoh_view, GTK_TYPE_STACK)
 
 static void
 buoh_view_init (BuohView *buoh_view)
diff --git a/src/buoh-window.c b/src/buoh-window.c
index c933ec0..2539d87 100644
--- a/src/buoh-window.c
+++ b/src/buoh-window.c
@@ -188,7 +188,7 @@ static const GActionEntry menu_entries[] = {
           buoh_window_cmd_help_about }
 };
 
-G_DEFINE_TYPE (BuohWindow, buoh_window, GTK_TYPE_APPLICATION_WINDOW)
+G_DEFINE_FINAL_TYPE (BuohWindow, buoh_window, GTK_TYPE_APPLICATION_WINDOW)
 
 static void
 buoh_window_init (BuohWindow *buoh_window)


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