[gtk/ebassi/final-types: 2/3] Use G_DEFINE_FINAL_TYPE for final types
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/final-types: 2/3] Use G_DEFINE_FINAL_TYPE for final types
- Date: Wed, 16 Mar 2022 14:47:03 +0000 (UTC)
commit 80617f01c35a32160490ce3fb84283bbd614bd8c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Mar 16 14:35:32 2022 +0000
Use G_DEFINE_FINAL_TYPE for final types
If we're using G_DECLARE_FINAL_TYPE in the header, we should use
G_DEFINE_FINAL_TYPE in the source.
gtk/gtkbinlayout.c | 2 +-
gtk/gtkbookmarklist.c | 4 ++--
gtk/gtkboolfilter.c | 4 ++--
gtk/gtkboxlayout.c | 6 +++---
gtk/gtkcenterlayout.c | 2 +-
gtk/gtkconstraint.c | 2 +-
gtk/gtkconstraintguide.c | 8 ++++----
gtk/gtkconstraintlayout.c | 6 +++---
gtk/gtkcustomfilter.c | 2 +-
gtk/gtkcustomlayout.c | 2 +-
gtk/gtkcustomsorter.c | 2 +-
gtk/gtkdirectorylist.c | 4 ++--
gtk/gtkdragicon.c | 10 +++++-----
gtk/gtkdropdown.c | 2 +-
gtk/gtkeditablelabel.c | 6 +++---
gtk/gtkfilechoosernative.c | 6 +++---
gtk/gtkfilterlistmodel.c | 10 +++++-----
gtk/gtkfixedlayout.c | 4 ++--
gtk/gtkflattenlistmodel.c | 8 ++++----
gtk/gtkgridlayout.c | 4 ++--
gtk/gtkmaplistmodel.c | 12 ++++++------
gtk/gtkmediacontrols.c | 4 ++--
gtk/gtkmultiselection.c | 10 +++++-----
gtk/gtkmultisorter.c | 6 +++---
gtk/gtknoselection.c | 12 ++++++------
gtk/gtknumericsorter.c | 4 ++--
gtk/gtkoverlaylayout.c | 4 ++--
gtk/gtkpasswordentrybuffer.c | 4 ++--
gtk/gtkpicture.c | 2 +-
gtk/gtkselectionfiltermodel.c | 4 ++--
gtk/gtkshortcut.c | 4 ++--
gtk/gtksingleselection.c | 24 ++++++++++++------------
gtk/gtkslicelistmodel.c | 8 ++++----
gtk/gtksortlistmodel.c | 16 ++++++++--------
gtk/gtkstringfilter.c | 4 ++--
gtk/gtkstringlist.c | 12 ++++++------
gtk/gtkstringsorter.c | 4 ++--
gtk/gtktreeexpander.c | 2 +-
gtk/gtktreelistmodel.c | 22 +++++++++++-----------
gtk/gtktreelistrowsorter.c | 6 +++---
gtk/gtkvideo.c | 2 +-
gtk/gtkwidgetpaintable.c | 8 ++++----
gtk/gtkwindowcontrols.c | 2 +-
gtk/gtkwindowhandle.c | 4 ++--
44 files changed, 137 insertions(+), 137 deletions(-)
---
diff --git a/gtk/gtkbinlayout.c b/gtk/gtkbinlayout.c
index a8e1e8cf01..cf82b66678 100644
--- a/gtk/gtkbinlayout.c
+++ b/gtk/gtkbinlayout.c
@@ -38,7 +38,7 @@ struct _GtkBinLayout
GtkLayoutManager parent_instance;
};
-G_DEFINE_TYPE (GtkBinLayout, gtk_bin_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkBinLayout, gtk_bin_layout, GTK_TYPE_LAYOUT_MANAGER)
static void
gtk_bin_layout_measure (GtkLayoutManager *layout_manager,
diff --git a/gtk/gtkbookmarklist.c b/gtk/gtkbookmarklist.c
index c947b25a4f..ae3433ee76 100644
--- a/gtk/gtkbookmarklist.c
+++ b/gtk/gtkbookmarklist.c
@@ -117,8 +117,8 @@ static void bookmark_file_changed (GFileMonitor *monitor,
static void gtk_bookmark_list_set_filename (GtkBookmarkList *self,
const char *filename);
-G_DEFINE_TYPE_WITH_CODE (GtkBookmarkList, gtk_bookmark_list, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_bookmark_list_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkBookmarkList, gtk_bookmark_list, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_bookmark_list_model_init))
static void
gtk_bookmark_list_set_property (GObject *object,
diff --git a/gtk/gtkboolfilter.c b/gtk/gtkboolfilter.c
index 987ec1ff4d..22ada9537a 100644
--- a/gtk/gtkboolfilter.c
+++ b/gtk/gtkboolfilter.c
@@ -46,7 +46,7 @@ enum {
NUM_PROPERTIES
};
-G_DEFINE_TYPE (GtkBoolFilter, gtk_bool_filter, GTK_TYPE_FILTER)
+G_DEFINE_FINAL_TYPE (GtkBoolFilter, gtk_bool_filter, GTK_TYPE_FILTER)
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
@@ -106,7 +106,7 @@ gtk_bool_filter_set_property (GObject *object,
}
}
-static void
+static void
gtk_bool_filter_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtkboxlayout.c b/gtk/gtkboxlayout.c
index e79c5e202a..f62d5091a8 100644
--- a/gtk/gtkboxlayout.c
+++ b/gtk/gtkboxlayout.c
@@ -58,8 +58,8 @@ struct _GtkBoxLayout
GtkBaselinePosition baseline_position;
};
-G_DEFINE_TYPE_WITH_CODE (GtkBoxLayout, gtk_box_layout, GTK_TYPE_LAYOUT_MANAGER,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkBoxLayout, gtk_box_layout, GTK_TYPE_LAYOUT_MANAGER,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL))
enum {
PROP_HOMOGENEOUS = 1,
@@ -342,7 +342,7 @@ distribute_remaining_size (GtkRequestedSize *sizes,
else
max = test;
}
-
+
return available - total_size;
}
diff --git a/gtk/gtkcenterlayout.c b/gtk/gtkcenterlayout.c
index 72db233550..9fb892aad0 100644
--- a/gtk/gtkcenterlayout.c
+++ b/gtk/gtkcenterlayout.c
@@ -54,7 +54,7 @@ struct _GtkCenterLayout
};
};
-G_DEFINE_TYPE (GtkCenterLayout, gtk_center_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkCenterLayout, gtk_center_layout, GTK_TYPE_LAYOUT_MANAGER)
static int
get_spacing (GtkCenterLayout *self,
diff --git a/gtk/gtkconstraint.c b/gtk/gtkconstraint.c
index b0fd0cceec..e624dbc699 100644
--- a/gtk/gtkconstraint.c
+++ b/gtk/gtkconstraint.c
@@ -60,7 +60,7 @@ enum {
static GParamSpec *obj_props[N_PROPERTIES];
-G_DEFINE_TYPE (GtkConstraint, gtk_constraint, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (GtkConstraint, gtk_constraint, G_TYPE_OBJECT)
static void
gtk_constraint_set_property (GObject *gobject,
diff --git a/gtk/gtkconstraintguide.c b/gtk/gtkconstraintguide.c
index 512b91cfd4..1ee1a48678 100644
--- a/gtk/gtkconstraintguide.c
+++ b/gtk/gtkconstraintguide.c
@@ -59,7 +59,7 @@ typedef enum {
} GuideValue;
struct _GtkConstraintGuide
-{
+{
GObject parent_instance;
char *name;
@@ -104,9 +104,9 @@ gtk_constraint_guide_constraint_target_iface_init (GtkConstraintTargetInterface
{
}
-G_DEFINE_TYPE_WITH_CODE (GtkConstraintGuide, gtk_constraint_guide, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_CONSTRAINT_TARGET,
- gtk_constraint_guide_constraint_target_iface_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkConstraintGuide, gtk_constraint_guide, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_CONSTRAINT_TARGET,
+ gtk_constraint_guide_constraint_target_iface_init))
static void
gtk_constraint_guide_init (GtkConstraintGuide *guide)
diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c
index 7d83b83d16..7b5bfba085 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -266,7 +266,7 @@ struct _GtkConstraintLayout
GListStore *guides_observer;
};
-G_DEFINE_TYPE (GtkConstraintLayoutChild, gtk_constraint_layout_child, GTK_TYPE_LAYOUT_CHILD)
+G_DEFINE_FINAL_TYPE (GtkConstraintLayoutChild, gtk_constraint_layout_child, GTK_TYPE_LAYOUT_CHILD)
GtkConstraintSolver *
gtk_constraint_layout_get_solver (GtkConstraintLayout *self)
@@ -537,8 +537,8 @@ gtk_constraint_layout_child_init (GtkConstraintLayoutChild *self)
static void gtk_buildable_interface_init (GtkBuildableIface *iface);
-G_DEFINE_TYPE_WITH_CODE (GtkConstraintLayout, gtk_constraint_layout, GTK_TYPE_LAYOUT_MANAGER,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_buildable_interface_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkConstraintLayout, gtk_constraint_layout, GTK_TYPE_LAYOUT_MANAGER,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_buildable_interface_init))
static void
gtk_constraint_layout_finalize (GObject *gobject)
diff --git a/gtk/gtkcustomfilter.c b/gtk/gtkcustomfilter.c
index 97c86e2470..7a4afe01e4 100644
--- a/gtk/gtkcustomfilter.c
+++ b/gtk/gtkcustomfilter.c
@@ -38,7 +38,7 @@ struct _GtkCustomFilter
GDestroyNotify user_destroy;
};
-G_DEFINE_TYPE (GtkCustomFilter, gtk_custom_filter, GTK_TYPE_FILTER)
+G_DEFINE_FINAL_TYPE (GtkCustomFilter, gtk_custom_filter, GTK_TYPE_FILTER)
static gboolean
gtk_custom_filter_match (GtkFilter *filter,
diff --git a/gtk/gtkcustomlayout.c b/gtk/gtkcustomlayout.c
index aa64882e2e..c10d5e44f2 100644
--- a/gtk/gtkcustomlayout.c
+++ b/gtk/gtkcustomlayout.c
@@ -22,7 +22,7 @@ struct _GtkCustomLayout
GtkCustomAllocateFunc allocate_func;
};
-G_DEFINE_TYPE (GtkCustomLayout, gtk_custom_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkCustomLayout, gtk_custom_layout, GTK_TYPE_LAYOUT_MANAGER)
static GtkSizeRequestMode
gtk_custom_layout_get_request_mode (GtkLayoutManager *manager,
diff --git a/gtk/gtkcustomsorter.c b/gtk/gtkcustomsorter.c
index 4ee526aa2c..f1fd064a66 100644
--- a/gtk/gtkcustomsorter.c
+++ b/gtk/gtkcustomsorter.c
@@ -39,7 +39,7 @@ struct _GtkCustomSorter
GDestroyNotify user_destroy;
};
-G_DEFINE_TYPE (GtkCustomSorter, gtk_custom_sorter, GTK_TYPE_SORTER)
+G_DEFINE_FINAL_TYPE (GtkCustomSorter, gtk_custom_sorter, GTK_TYPE_SORTER)
static GtkOrdering
gtk_custom_sorter_compare (GtkSorter *sorter,
diff --git a/gtk/gtkdirectorylist.c b/gtk/gtkdirectorylist.c
index 3b8908aefd..4425fd8ef9 100644
--- a/gtk/gtkdirectorylist.c
+++ b/gtk/gtkdirectorylist.c
@@ -144,8 +144,8 @@ gtk_directory_list_model_init (GListModelInterface *iface)
iface->get_item = gtk_directory_list_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkDirectoryList, gtk_directory_list, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_directory_list_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkDirectoryList, gtk_directory_list, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_directory_list_model_init))
static void
gtk_directory_list_set_property (GObject *object,
diff --git a/gtk/gtkdragicon.c b/gtk/gtkdragicon.c
index dfcd6768c6..ea4b627cb4 100644
--- a/gtk/gtkdragicon.c
+++ b/gtk/gtkdragicon.c
@@ -79,11 +79,11 @@ static GParamSpec *properties[LAST_ARG] = { NULL, };
static void gtk_drag_icon_root_init (GtkRootInterface *iface);
static void gtk_drag_icon_native_init (GtkNativeInterface *iface);
-G_DEFINE_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_WIDGET,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_NATIVE,
- gtk_drag_icon_native_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ROOT,
- gtk_drag_icon_root_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkDragIcon, gtk_drag_icon, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_NATIVE,
+ gtk_drag_icon_native_init)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ROOT,
+ gtk_drag_icon_root_init))
static GdkDisplay *
gtk_drag_icon_root_get_display (GtkRoot *self)
diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c
index 30cb3fa172..a53a806022 100644
--- a/gtk/gtkdropdown.c
+++ b/gtk/gtkdropdown.c
@@ -132,7 +132,7 @@ enum
LAST_SIGNAL
};
-G_DEFINE_TYPE (GtkDropDown, gtk_drop_down, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkDropDown, gtk_drop_down, GTK_TYPE_WIDGET)
static GParamSpec *properties[N_PROPS] = { NULL, };
static guint signals[LAST_SIGNAL] = { 0 };
diff --git a/gtk/gtkeditablelabel.c b/gtk/gtkeditablelabel.c
index b75b6a531d..5b03aab400 100644
--- a/gtk/gtkeditablelabel.c
+++ b/gtk/gtkeditablelabel.c
@@ -103,9 +103,9 @@ gtk_editable_label_editable_init (GtkEditableInterface *iface)
}
-G_DEFINE_TYPE_WITH_CODE (GtkEditableLabel, gtk_editable_label, GTK_TYPE_WIDGET,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
- gtk_editable_label_editable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkEditableLabel, gtk_editable_label, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
+ gtk_editable_label_editable_init))
static void
start_editing (GtkWidget *widget,
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c
index af89e65e1a..267d36af82 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -206,9 +206,9 @@ static GParamSpec *native_props[LAST_ARG] = { NULL, };
static void _gtk_file_chooser_native_iface_init (GtkFileChooserIface *iface);
-G_DEFINE_TYPE_WITH_CODE (GtkFileChooserNative, gtk_file_chooser_native, GTK_TYPE_NATIVE_DIALOG,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_FILE_CHOOSER,
- _gtk_file_chooser_native_iface_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkFileChooserNative, gtk_file_chooser_native, GTK_TYPE_NATIVE_DIALOG,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_FILE_CHOOSER,
+ _gtk_file_chooser_native_iface_init))
/**
diff --git a/gtk/gtkfilterlistmodel.c b/gtk/gtkfilterlistmodel.c
index 1c03dfb617..7e04279b9b 100644
--- a/gtk/gtkfilterlistmodel.c
+++ b/gtk/gtkfilterlistmodel.c
@@ -134,8 +134,8 @@ gtk_filter_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_filter_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkFilterListModel, gtk_filter_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_filter_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkFilterListModel, gtk_filter_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_filter_list_model_model_init))
static gboolean
gtk_filter_list_model_run_filter_on_item (GtkFilterListModel *self,
@@ -163,7 +163,7 @@ gtk_filter_list_model_run_filter (GtkFilterListModel *self,
gboolean more;
g_return_if_fail (GTK_IS_FILTER_LIST_MODEL (self));
-
+
if (self->pending == NULL)
return;
@@ -346,7 +346,7 @@ gtk_filter_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_filter_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -473,7 +473,7 @@ gtk_filter_list_model_refilter (GtkFilterListModel *self,
case GTK_FILTER_MATCH_SOME:
{
GtkBitset *old, *pending;
-
+
if (self->matches == NULL)
{
if (self->strictness == GTK_FILTER_MATCH_ALL)
diff --git a/gtk/gtkfixedlayout.c b/gtk/gtkfixedlayout.c
index 1cf67c3ba3..951651d85f 100644
--- a/gtk/gtkfixedlayout.c
+++ b/gtk/gtkfixedlayout.c
@@ -92,7 +92,7 @@ enum
static GParamSpec *child_props[N_CHILD_PROPERTIES];
-G_DEFINE_TYPE (GtkFixedLayoutChild, gtk_fixed_layout_child, GTK_TYPE_LAYOUT_CHILD)
+G_DEFINE_FINAL_TYPE (GtkFixedLayoutChild, gtk_fixed_layout_child, GTK_TYPE_LAYOUT_CHILD)
static void
gtk_fixed_layout_child_set_property (GObject *gobject,
@@ -215,7 +215,7 @@ gtk_fixed_layout_child_get_transform (GtkFixedLayoutChild *child)
return child->transform;
}
-G_DEFINE_TYPE (GtkFixedLayout, gtk_fixed_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkFixedLayout, gtk_fixed_layout, GTK_TYPE_LAYOUT_MANAGER)
static GtkSizeRequestMode
gtk_fixed_layout_get_request_mode (GtkLayoutManager *layout_manager,
diff --git a/gtk/gtkflattenlistmodel.c b/gtk/gtkflattenlistmodel.c
index 74f3b7795a..ec414067dc 100644
--- a/gtk/gtkflattenlistmodel.c
+++ b/gtk/gtkflattenlistmodel.c
@@ -198,8 +198,8 @@ gtk_flatten_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_flatten_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkFlattenListModel, gtk_flatten_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_flatten_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkFlattenListModel, gtk_flatten_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_flatten_list_model_model_init))
static void
gtk_flatten_list_model_items_changed_cb (GListModel *model,
@@ -322,7 +322,7 @@ gtk_flatten_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_flatten_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -463,7 +463,7 @@ gtk_flatten_list_model_set_model (GtkFlattenListModel *self,
if (self->model == model)
return;
- removed = g_list_model_get_n_items (G_LIST_MODEL (self));
+ removed = g_list_model_get_n_items (G_LIST_MODEL (self));
gtk_flatten_list_clear_model (self);
self->model = model;
diff --git a/gtk/gtkgridlayout.c b/gtk/gtkgridlayout.c
index c9b6195abe..3837df6090 100644
--- a/gtk/gtkgridlayout.c
+++ b/gtk/gtkgridlayout.c
@@ -84,7 +84,7 @@ enum {
static GParamSpec *child_props[N_CHILD_PROPERTIES];
-G_DEFINE_TYPE (GtkGridLayoutChild, gtk_grid_layout_child, GTK_TYPE_LAYOUT_CHILD)
+G_DEFINE_FINAL_TYPE (GtkGridLayoutChild, gtk_grid_layout_child, GTK_TYPE_LAYOUT_CHILD)
static void
gtk_grid_layout_child_set_property (GObject *gobject,
@@ -454,7 +454,7 @@ enum {
static GParamSpec *layout_props[N_PROPERTIES];
-G_DEFINE_TYPE (GtkGridLayout, gtk_grid_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkGridLayout, gtk_grid_layout, GTK_TYPE_LAYOUT_MANAGER)
static inline GtkGridLayoutChild *
get_grid_child (GtkGridLayout *self,
diff --git a/gtk/gtkmaplistmodel.c b/gtk/gtkmaplistmodel.c
index 0de6b7c7d8..d81c94ec20 100644
--- a/gtk/gtkmaplistmodel.c
+++ b/gtk/gtkmaplistmodel.c
@@ -147,7 +147,7 @@ static guint
gtk_map_list_model_get_n_items (GListModel *list)
{
GtkMapListModel *self = GTK_MAP_LIST_MODEL (list);
-
+
if (self->model == NULL)
return 0;
@@ -205,8 +205,8 @@ gtk_map_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_map_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkMapListModel, gtk_map_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_map_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkMapListModel, gtk_map_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_map_list_model_model_init))
static void
gtk_map_list_model_items_changed_cb (GListModel *model,
@@ -291,7 +291,7 @@ gtk_map_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_map_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -527,7 +527,7 @@ gtk_map_list_model_set_map_func (GtkMapListModel *self,
self->map_func = map_func;
self->user_data = user_data;
self->user_destroy = user_destroy;
-
+
gtk_map_list_model_init_items (self);
if (self->model)
@@ -579,7 +579,7 @@ gtk_map_list_model_set_model (GtkMapListModel *self,
}
gtk_map_list_model_init_items (self);
-
+
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
diff --git a/gtk/gtkmediacontrols.c b/gtk/gtkmediacontrols.c
index 8fd3329296..1caead03d2 100644
--- a/gtk/gtkmediacontrols.c
+++ b/gtk/gtkmediacontrols.c
@@ -62,7 +62,7 @@ enum
N_PROPS
};
-G_DEFINE_TYPE (GtkMediaControls, gtk_media_controls, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkMediaControls, gtk_media_controls, GTK_TYPE_WIDGET)
static GParamSpec *properties[N_PROPS] = { NULL, };
@@ -138,7 +138,7 @@ time_adjustment_changed (GtkAdjustment *adjustment,
if (gtk_adjustment_get_value (adjustment) == (double) gtk_media_stream_get_timestamp (controls->stream) /
G_USEC_PER_SEC)
return;
- gtk_media_stream_seek (controls->stream,
+ gtk_media_stream_seek (controls->stream,
gtk_adjustment_get_value (adjustment) * G_USEC_PER_SEC + 0.5);
}
diff --git a/gtk/gtkmultiselection.c b/gtk/gtkmultiselection.c
index bee83622c6..3c5e7725b2 100644
--- a/gtk/gtkmultiselection.c
+++ b/gtk/gtkmultiselection.c
@@ -201,11 +201,11 @@ gtk_multi_selection_selection_model_init (GtkSelectionModelInterface *iface)
iface->set_selection = gtk_multi_selection_set_selection;
}
-G_DEFINE_TYPE_EXTENDED (GtkMultiSelection, gtk_multi_selection, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
- gtk_multi_selection_list_model_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
- gtk_multi_selection_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkMultiSelection, gtk_multi_selection, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
+ gtk_multi_selection_list_model_init)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
+ gtk_multi_selection_selection_model_init))
static void
gtk_multi_selection_items_changed_cb (GListModel *model,
diff --git a/gtk/gtkmultisorter.c b/gtk/gtkmultisorter.c
index 72d686784b..af41d39d41 100644
--- a/gtk/gtkmultisorter.c
+++ b/gtk/gtkmultisorter.c
@@ -240,9 +240,9 @@ gtk_multi_sorter_buildable_init (GtkBuildableIface *iface)
iface->add_child = gtk_multi_sorter_buildable_add_child;
}
-G_DEFINE_TYPE_WITH_CODE (GtkMultiSorter, gtk_multi_sorter, GTK_TYPE_SORTER,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_multi_sorter_list_model_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_multi_sorter_buildable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkMultiSorter, gtk_multi_sorter, GTK_TYPE_SORTER,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_multi_sorter_list_model_init)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_multi_sorter_buildable_init))
static GtkOrdering
gtk_multi_sorter_compare (GtkSorter *sorter,
diff --git a/gtk/gtknoselection.c b/gtk/gtknoselection.c
index 9b48082d6a..8b37cb8d9c 100644
--- a/gtk/gtknoselection.c
+++ b/gtk/gtknoselection.c
@@ -113,11 +113,11 @@ gtk_no_selection_selection_model_init (GtkSelectionModelInterface *iface)
iface->get_selection_in_range = gtk_no_selection_get_selection_in_range;
}
-G_DEFINE_TYPE_EXTENDED (GtkNoSelection, gtk_no_selection, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
- gtk_no_selection_list_model_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
- gtk_no_selection_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkNoSelection, gtk_no_selection, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
+ gtk_no_selection_list_model_init)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
+ gtk_no_selection_selection_model_init))
static void
gtk_no_selection_clear_model (GtkNoSelection *self)
@@ -125,7 +125,7 @@ gtk_no_selection_clear_model (GtkNoSelection *self)
if (self->model == NULL)
return;
- g_signal_handlers_disconnect_by_func (self->model,
+ g_signal_handlers_disconnect_by_func (self->model,
g_list_model_items_changed,
self);
g_clear_object (&self->model);
diff --git a/gtk/gtknumericsorter.c b/gtk/gtknumericsorter.c
index bc1227b343..1a6eb05282 100644
--- a/gtk/gtknumericsorter.c
+++ b/gtk/gtknumericsorter.c
@@ -52,7 +52,7 @@ enum {
NUM_PROPERTIES
};
-G_DEFINE_TYPE (GtkNumericSorter, gtk_numeric_sorter, GTK_TYPE_SORTER)
+G_DEFINE_FINAL_TYPE (GtkNumericSorter, gtk_numeric_sorter, GTK_TYPE_SORTER)
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
@@ -491,7 +491,7 @@ gtk_numeric_sorter_set_property (GObject *object,
}
}
-static void
+static void
gtk_numeric_sorter_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtkoverlaylayout.c b/gtk/gtkoverlaylayout.c
index bc457719d6..538faf699f 100644
--- a/gtk/gtkoverlaylayout.c
+++ b/gtk/gtkoverlaylayout.c
@@ -72,7 +72,7 @@ enum
static GParamSpec *child_props[N_CHILD_PROPERTIES];
-G_DEFINE_TYPE (GtkOverlayLayoutChild, gtk_overlay_layout_child, GTK_TYPE_LAYOUT_CHILD)
+G_DEFINE_FINAL_TYPE (GtkOverlayLayoutChild, gtk_overlay_layout_child, GTK_TYPE_LAYOUT_CHILD)
static void
gtk_overlay_layout_child_set_property (GObject *gobject,
@@ -247,7 +247,7 @@ gtk_overlay_layout_child_get_clip_overlay (GtkOverlayLayoutChild *child)
return child->clip_overlay;
}
-G_DEFINE_TYPE (GtkOverlayLayout, gtk_overlay_layout, GTK_TYPE_LAYOUT_MANAGER)
+G_DEFINE_FINAL_TYPE (GtkOverlayLayout, gtk_overlay_layout, GTK_TYPE_LAYOUT_MANAGER)
static void
gtk_overlay_layout_measure (GtkLayoutManager *layout_manager,
diff --git a/gtk/gtkpasswordentrybuffer.c b/gtk/gtkpasswordentrybuffer.c
index 39e75dc952..ac5eb20df0 100644
--- a/gtk/gtkpasswordentrybuffer.c
+++ b/gtk/gtkpasswordentrybuffer.c
@@ -1,4 +1,4 @@
-/* gtkpasswordentrybuffer.c: Entry buffer with secure allocation
+/* gtkpasswordentrybuffer.c: Entry buffer with secure allocation
*
Copyright 2009 Stefan Walter
* Copyright 2020 GNOME Foundation
@@ -50,7 +50,7 @@ struct _GtkPasswordEntryBuffer
guint text_chars;
};
-G_DEFINE_TYPE (GtkPasswordEntryBuffer, gtk_password_entry_buffer, GTK_TYPE_ENTRY_BUFFER)
+G_DEFINE_FINAL_TYPE (GtkPasswordEntryBuffer, gtk_password_entry_buffer, GTK_TYPE_ENTRY_BUFFER)
static const char *
gtk_password_entry_buffer_real_get_text (GtkEntryBuffer *buffer,
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index cf7cd61f83..d66ebd06ec 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -111,7 +111,7 @@ struct _GtkPictureClass
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
-G_DEFINE_TYPE (GtkPicture, gtk_picture, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkPicture, gtk_picture, GTK_TYPE_WIDGET)
static void
gtk_picture_snapshot (GtkWidget *widget,
diff --git a/gtk/gtkselectionfiltermodel.c b/gtk/gtkselectionfiltermodel.c
index 398b88bc30..311a7a2b98 100644
--- a/gtk/gtkselectionfiltermodel.c
+++ b/gtk/gtkselectionfiltermodel.c
@@ -95,8 +95,8 @@ gtk_selection_filter_model_list_model_init (GListModelInterface *iface)
iface->get_item = gtk_selection_filter_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkSelectionFilterModel, gtk_selection_filter_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
gtk_selection_filter_model_list_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkSelectionFilterModel, gtk_selection_filter_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
gtk_selection_filter_model_list_model_init))
static void
selection_filter_model_items_changed (GtkSelectionFilterModel *self,
diff --git a/gtk/gtkshortcut.c b/gtk/gtkshortcut.c
index 37620b6fb4..87a231cce5 100644
--- a/gtk/gtkshortcut.c
+++ b/gtk/gtkshortcut.c
@@ -65,7 +65,7 @@ enum
N_PROPS
};
-G_DEFINE_TYPE (GtkShortcut, gtk_shortcut, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (GtkShortcut, gtk_shortcut, G_TYPE_OBJECT)
static GParamSpec *properties[N_PROPS] = { NULL, };
@@ -387,7 +387,7 @@ gtk_shortcut_set_arguments (GtkShortcut *self,
if (self->args == args)
return;
-
+
g_clear_pointer (&self->args, g_variant_unref);
if (args)
self->args = g_variant_ref_sink (args);
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c
index 7b01cb6f19..e39eba960b 100644
--- a/gtk/gtksingleselection.c
+++ b/gtk/gtksingleselection.c
@@ -157,17 +157,17 @@ gtk_single_selection_unselect_item (GtkSelectionModel *model,
static void
gtk_single_selection_selection_model_init (GtkSelectionModelInterface *iface)
{
- iface->is_selected = gtk_single_selection_is_selected;
- iface->get_selection_in_range = gtk_single_selection_get_selection_in_range;
- iface->select_item = gtk_single_selection_select_item;
- iface->unselect_item = gtk_single_selection_unselect_item;
+ iface->is_selected = gtk_single_selection_is_selected;
+ iface->get_selection_in_range = gtk_single_selection_get_selection_in_range;
+ iface->select_item = gtk_single_selection_select_item;
+ iface->unselect_item = gtk_single_selection_unselect_item;
}
-G_DEFINE_TYPE_EXTENDED (GtkSingleSelection, gtk_single_selection, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
- gtk_single_selection_list_model_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
- gtk_single_selection_selection_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkSingleSelection, gtk_single_selection, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
+ gtk_single_selection_list_model_init)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
+ gtk_single_selection_selection_model_init))
static void
gtk_single_selection_items_changed_cb (GListModel *model,
@@ -281,7 +281,7 @@ gtk_single_selection_clear_model (GtkSingleSelection *self)
if (self->model == NULL)
return;
- g_signal_handlers_disconnect_by_func (self->model,
+ g_signal_handlers_disconnect_by_func (self->model,
gtk_single_selection_items_changed_cb,
self);
g_clear_object (&self->model);
@@ -510,7 +510,7 @@ gtk_single_selection_set_model (GtkSingleSelection *self,
return;
g_object_freeze_notify (G_OBJECT (self));
-
+
n_items_before = self->model ? g_list_model_get_n_items (self->model) : 0;
gtk_single_selection_clear_model (self);
@@ -674,7 +674,7 @@ gtk_single_selection_set_autoselect (GtkSingleSelection *self,
self->autoselect = autoselect;
g_object_freeze_notify (G_OBJECT (self));
-
+
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_AUTOSELECT]);
if (self->autoselect && !self->selected_item)
diff --git a/gtk/gtkslicelistmodel.c b/gtk/gtkslicelistmodel.c
index 2642d514a5..bc13c066cf 100644
--- a/gtk/gtkslicelistmodel.c
+++ b/gtk/gtkslicelistmodel.c
@@ -73,7 +73,7 @@ gtk_slice_list_model_get_n_items (GListModel *list)
{
GtkSliceListModel *self = GTK_SLICE_LIST_MODEL (list);
guint n_items;
-
+
if (self->model == NULL)
return 0;
@@ -110,8 +110,8 @@ gtk_slice_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_slice_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkSliceListModel, gtk_slice_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_slice_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkSliceListModel, gtk_slice_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_slice_list_model_model_init))
static void
gtk_slice_list_model_items_changed_cb (GListModel *model,
@@ -193,7 +193,7 @@ gtk_slice_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_slice_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtksortlistmodel.c b/gtk/gtksortlistmodel.c
index 2d706ba521..3bac2c98d1 100644
--- a/gtk/gtksortlistmodel.c
+++ b/gtk/gtksortlistmodel.c
@@ -173,8 +173,8 @@ gtk_sort_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_sort_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkSortListModel, gtk_sort_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_sort_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkSortListModel, gtk_sort_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_sort_list_model_model_init))
static gboolean
gtk_sort_list_model_is_sorting (GtkSortListModel *self)
@@ -253,7 +253,7 @@ gtk_sort_list_model_sort_step (GtkSortListModel *self,
start_change = MIN (start_change, (gpointer *) change.base);
end_change = MAX (end_change, ((gpointer *) change.base) + change.len);
}
-
+
if (g_get_monotonic_time () >= end_time && !finish)
break;
}
@@ -419,7 +419,7 @@ gtk_sort_list_model_clear_items (GtkSortListModel *self,
g_clear_pointer (&self->positions, g_free);
gtk_sort_list_model_clear_keys (self);
-}
+}
static gboolean
gtk_sort_list_model_should_sort (GtkSortListModel *self)
@@ -478,7 +478,7 @@ gtk_sort_list_model_update_items (GtkSortListModel *self,
n_items = self->n_items;
start = n_items;
end = n_items;
-
+
/* first, move the keys over */
old_keys = self->keys;
gtk_sort_list_model_clear_sort_keys (self, position, removed);
@@ -523,7 +523,7 @@ gtk_sort_list_model_update_items (GtkSortListModel *self,
if (pos >= position + removed)
pos = pos - removed + added;
else if (pos >= position)
- {
+ {
start = MIN (start, valid);
end = n_items - i - 1;
continue;
@@ -650,7 +650,7 @@ gtk_sort_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_sort_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -903,7 +903,7 @@ gtk_sort_list_model_set_model (GtkSortListModel *self,
gtk_sort_list_model_finish_sorting (self, &ignore1, &ignore2);
}
}
-
+
if (removed > 0 || self->n_items > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, self->n_items);
diff --git a/gtk/gtkstringfilter.c b/gtk/gtkstringfilter.c
index c4f3c9e630..accb5b2eef 100644
--- a/gtk/gtkstringfilter.c
+++ b/gtk/gtkstringfilter.c
@@ -64,7 +64,7 @@ enum {
NUM_PROPERTIES
};
-G_DEFINE_TYPE (GtkStringFilter, gtk_string_filter, GTK_TYPE_FILTER)
+G_DEFINE_FINAL_TYPE (GtkStringFilter, gtk_string_filter, GTK_TYPE_FILTER)
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
@@ -190,7 +190,7 @@ gtk_string_filter_set_property (GObject *object,
}
}
-static void
+static void
gtk_string_filter_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtkstringlist.c b/gtk/gtkstringlist.c
index 2b12cb957f..8da41a20dd 100644
--- a/gtk/gtkstringlist.c
+++ b/gtk/gtkstringlist.c
@@ -83,7 +83,7 @@ enum {
PROP_NUM_PROPERTIES
};
-G_DEFINE_TYPE (GtkStringObject, gtk_string_object, G_TYPE_OBJECT);
+G_DEFINE_FINAL_TYPE (GtkStringObject, gtk_string_object, G_TYPE_OBJECT)
static void
gtk_string_object_init (GtkStringObject *object)
@@ -395,11 +395,11 @@ gtk_string_list_buildable_init (GtkBuildableIface *iface)
iface->custom_finished = gtk_string_list_buildable_custom_finished;
}
-G_DEFINE_TYPE_WITH_CODE (GtkStringList, gtk_string_list, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
- gtk_string_list_buildable_init)
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
- gtk_string_list_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkStringList, gtk_string_list, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
+ gtk_string_list_buildable_init)
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL,
+ gtk_string_list_model_init))
static void
gtk_string_list_dispose (GObject *object)
diff --git a/gtk/gtkstringsorter.c b/gtk/gtkstringsorter.c
index a6fcefab77..f10cd42fde 100644
--- a/gtk/gtkstringsorter.c
+++ b/gtk/gtkstringsorter.c
@@ -54,7 +54,7 @@ enum {
NUM_PROPERTIES
};
-G_DEFINE_TYPE (GtkStringSorter, gtk_string_sorter, GTK_TYPE_SORTER)
+G_DEFINE_FINAL_TYPE (GtkStringSorter, gtk_string_sorter, GTK_TYPE_SORTER)
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
@@ -238,7 +238,7 @@ gtk_string_sorter_set_property (GObject *object,
}
}
-static void
+static void
gtk_string_sorter_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtktreeexpander.c b/gtk/gtktreeexpander.c
index 2b4e8b415d..e171090754 100644
--- a/gtk/gtktreeexpander.c
+++ b/gtk/gtktreeexpander.c
@@ -101,7 +101,7 @@ enum
N_PROPS
};
-G_DEFINE_TYPE (GtkTreeExpander, gtk_tree_expander, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkTreeExpander, gtk_tree_expander, GTK_TYPE_WIDGET)
static GParamSpec *properties[N_PROPS] = { NULL, };
diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
index 35f1fe3ab0..350ed2fca5 100644
--- a/gtk/gtktreelistmodel.c
+++ b/gtk/gtktreelistmodel.c
@@ -165,7 +165,7 @@ tree_node_get_local_position (GtkRbTree *tree,
TreeNode *left, *parent;
TreeAugment *left_aug;
guint n;
-
+
left = gtk_rb_tree_node_get_left (node);
if (left)
{
@@ -209,7 +209,7 @@ tree_node_get_position (TreeNode *node)
TreeNode *left, *parent;
TreeAugment *left_aug;
guint n;
-
+
for (n = 0;
!node->is_root;
node = node->parent, n++)
@@ -520,7 +520,7 @@ gtk_tree_list_model_expand_node (GtkTreeListModel *self,
if (node->empty)
return 0;
-
+
if (node->model != NULL)
return 0;
@@ -528,18 +528,18 @@ gtk_tree_list_model_expand_node (GtkTreeListModel *self,
if (model == NULL)
return 0;
-
+
gtk_tree_list_model_init_node (self, node, model);
tree_node_mark_dirty (node);
-
+
return tree_node_get_n_children (node);
}
static guint
gtk_tree_list_model_collapse_node (GtkTreeListModel *self,
TreeNode *node)
-{
+{
guint n_items;
if (node->model == NULL)
@@ -604,8 +604,8 @@ gtk_tree_list_model_model_init (GListModelInterface *iface)
iface->get_item = gtk_tree_list_model_get_item;
}
-G_DEFINE_TYPE_WITH_CODE (GtkTreeListModel, gtk_tree_list_model, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_tree_list_model_model_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkTreeListModel, gtk_tree_list_model, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_tree_list_model_model_init))
static void
gtk_tree_list_model_set_property (GObject *object,
@@ -631,7 +631,7 @@ gtk_tree_list_model_set_property (GObject *object,
}
}
-static void
+static void
gtk_tree_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
@@ -956,7 +956,7 @@ enum {
static GParamSpec *row_properties[NUM_ROW_PROPERTIES] = { NULL, };
-G_DEFINE_TYPE (GtkTreeListRow, gtk_tree_list_row, G_TYPE_OBJECT)
+G_DEFINE_FINAL_TYPE (GtkTreeListRow, gtk_tree_list_row, G_TYPE_OBJECT)
static void
gtk_tree_list_row_destroy (GtkTreeListRow *self)
@@ -993,7 +993,7 @@ gtk_tree_list_row_set_property (GObject *object,
}
}
-static void
+static void
gtk_tree_list_row_get_property (GObject *object,
guint prop_id,
GValue *value,
diff --git a/gtk/gtktreelistrowsorter.c b/gtk/gtktreelistrowsorter.c
index ee0a7d1e47..b7204515d8 100644
--- a/gtk/gtktreelistrowsorter.c
+++ b/gtk/gtktreelistrowsorter.c
@@ -60,7 +60,7 @@ enum {
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
-G_DEFINE_TYPE (GtkTreeListRowSorter, gtk_tree_list_row_sorter, GTK_TYPE_SORTER)
+G_DEFINE_FINAL_TYPE (GtkTreeListRowSorter, gtk_tree_list_row_sorter, GTK_TYPE_SORTER)
#define MAX_KEY_DEPTH (8)
@@ -155,7 +155,7 @@ gtk_tree_list_row_sort_keys_compare (gconstpointer a,
resa = unpack (keysa, &keysa, &sizea);
resb = unpack (keysb, &keysb, &sizeb);
if (!resa)
- return resb ? GTK_ORDERING_LARGER : (keysa[2] < keysb[2] ? GTK_ORDERING_SMALLER :
+ return resb ? GTK_ORDERING_LARGER : (keysa[2] < keysb[2] ? GTK_ORDERING_SMALLER :
(keysb[2] > keysa[2] ? GTK_ORDERING_LARGER : GTK_ORDERING_EQUAL));
else if (!resb)
return GTK_ORDERING_SMALLER;
@@ -329,7 +329,7 @@ gtk_tree_list_row_sort_keys_clear_key (GtkSortKeys *keys,
for (i = 0; i < max && key[i] != NULL; i++)
gtk_tree_list_row_sort_keys_unref_key (self, key[i]);
-
+
if (key[0] == NULL)
g_free (key[1]);
}
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c
index 22c232b53e..9481d92947 100644
--- a/gtk/gtkvideo.c
+++ b/gtk/gtkvideo.c
@@ -81,7 +81,7 @@ enum
N_PROPS
};
-G_DEFINE_TYPE (GtkVideo, gtk_video, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkVideo, gtk_video, GTK_TYPE_WIDGET)
static GParamSpec *properties[N_PROPS] = { NULL, };
diff --git a/gtk/gtkwidgetpaintable.c b/gtk/gtkwidgetpaintable.c
index 50ea1582fb..fcd9d72759 100644
--- a/gtk/gtkwidgetpaintable.c
+++ b/gtk/gtkwidgetpaintable.c
@@ -143,9 +143,9 @@ gtk_widget_paintable_paintable_init (GdkPaintableInterface *iface)
iface->get_intrinsic_height = gtk_widget_paintable_paintable_get_intrinsic_height;
}
-G_DEFINE_TYPE_EXTENDED (GtkWidgetPaintable, gtk_widget_paintable, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
- gtk_widget_paintable_paintable_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkWidgetPaintable, gtk_widget_paintable, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
+ gtk_widget_paintable_paintable_init))
static void
gtk_widget_paintable_set_property (GObject *object,
@@ -289,7 +289,7 @@ gtk_widget_paintable_snapshot_widget (GtkWidgetPaintable *self)
if (self->widget->priv->render_node == NULL)
return gdk_paintable_new_empty (bounds.size.width, bounds.size.height);
-
+
return gtk_render_node_paintable_new (self->widget->priv->render_node, &bounds);
}
diff --git a/gtk/gtkwindowcontrols.c b/gtk/gtkwindowcontrols.c
index 2efabb603c..d652fa1527 100644
--- a/gtk/gtkwindowcontrols.c
+++ b/gtk/gtkwindowcontrols.c
@@ -108,7 +108,7 @@ static GParamSpec *props[LAST_PROP] = { NULL, };
#define WINDOW_ICON_SIZE 16
-G_DEFINE_TYPE (GtkWindowControls, gtk_window_controls, GTK_TYPE_WIDGET)
+G_DEFINE_FINAL_TYPE (GtkWindowControls, gtk_window_controls, GTK_TYPE_WIDGET)
static char *
get_layout (GtkWindowControls *self)
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index d0ba7fe424..673f4b70fd 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -74,8 +74,8 @@ static GParamSpec *props[LAST_PROP] = { NULL, };
static void gtk_window_handle_buildable_iface_init (GtkBuildableIface *iface);
-G_DEFINE_TYPE_WITH_CODE (GtkWindowHandle, gtk_window_handle, GTK_TYPE_WIDGET,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_window_handle_buildable_iface_init))
+G_DEFINE_FINAL_TYPE_WITH_CODE (GtkWindowHandle, gtk_window_handle, GTK_TYPE_WIDGET,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
gtk_window_handle_buildable_iface_init))
static void
lower_window (GtkWindowHandle *self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]