[libhandy] window-handle: Make it final
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] window-handle: Make it final
- Date: Wed, 15 Jul 2020 11:28:27 +0000 (UTC)
commit 8c46bf06ae430c6796dd174af78f46483fbc8299
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Jul 14 21:52:00 2020 +0200
window-handle: Make it final
Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/193
src/hdy-window-handle.c | 15 +++++++--------
src/hdy-window-handle.h | 7 +------
2 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/src/hdy-window-handle.c b/src/hdy-window-handle.c
index c4e9ca8e..30cc855a 100644
--- a/src/hdy-window-handle.c
+++ b/src/hdy-window-handle.c
@@ -31,20 +31,21 @@
* Since: 1.0
*/
-typedef struct
+struct _HdyWindowHandle
{
+ GtkEventBox parent_instance;
+
HdyWindowHandleController *controller;
-} HdyWindowHandlePrivate;
+};
-G_DEFINE_TYPE_WITH_PRIVATE (HdyWindowHandle, hdy_window_handle, GTK_TYPE_EVENT_BOX)
+G_DEFINE_TYPE (HdyWindowHandle, hdy_window_handle, GTK_TYPE_EVENT_BOX)
static void
hdy_window_handle_finalize (GObject *object)
{
HdyWindowHandle *self = (HdyWindowHandle *)object;
- HdyWindowHandlePrivate *priv = hdy_window_handle_get_instance_private (self);
- g_clear_object (&priv->controller);
+ g_clear_object (&self->controller);
G_OBJECT_CLASS (hdy_window_handle_parent_class)->finalize (object);
}
@@ -63,9 +64,7 @@ hdy_window_handle_class_init (HdyWindowHandleClass *klass)
static void
hdy_window_handle_init (HdyWindowHandle *self)
{
- HdyWindowHandlePrivate *priv = hdy_window_handle_get_instance_private (self);
-
- priv->controller = hdy_window_handle_controller_new (GTK_WIDGET (self));
+ self->controller = hdy_window_handle_controller_new (GTK_WIDGET (self));
}
/**
diff --git a/src/hdy-window-handle.h b/src/hdy-window-handle.h
index 662a6daf..8877cbad 100644
--- a/src/hdy-window-handle.h
+++ b/src/hdy-window-handle.h
@@ -16,12 +16,7 @@ G_BEGIN_DECLS
#define HDY_TYPE_WINDOW_HANDLE (hdy_window_handle_get_type())
-G_DECLARE_DERIVABLE_TYPE (HdyWindowHandle, hdy_window_handle, HDY, WINDOW_HANDLE, GtkEventBox)
-
-struct _HdyWindowHandleClass
-{
- GtkEventBoxClass parent_class;
-};
+G_DECLARE_FINAL_TYPE (HdyWindowHandle, hdy_window_handle, HDY, WINDOW_HANDLE, GtkEventBox)
GtkWidget *hdy_window_handle_new (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]