[epiphany/wip/exalm/cleanups: 5/14] notification: Stop subclassing GtkFrame




commit 1adf4af36766b0d197e8122d25ab64ac80e213ff
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Nov 29 13:48:03 2021 +0500

    notification: Stop subclassing GtkFrame
    
    While it is derivable in GTK4, it will have an unwanted style.
    
    Also fix the type in G_DEFINE_TYPE().
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>

 lib/ephy-notification.c | 8 ++------
 lib/ephy-notification.h | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/lib/ephy-notification.c b/lib/ephy-notification.c
index fe11153e2..da4f42ebe 100644
--- a/lib/ephy-notification.c
+++ b/lib/ephy-notification.c
@@ -24,7 +24,7 @@
 #include "ephy-notification-container.h"
 
 struct _EphyNotification {
-  GtkFrame parent_instance;
+  GtkBin parent_instance;
 
   GtkWidget *grid;
 
@@ -36,17 +36,13 @@ struct _EphyNotification {
   char *body_msg;
 };
 
-struct _EphyNotificationClass {
-  GtkFrameClass parent_class;
-};
-
 enum {
   PROP_0,
   PROP_HEAD,
   PROP_BODY
 };
 
-G_DEFINE_TYPE (EphyNotification, ephy_notification, GTK_TYPE_GRID);
+G_DEFINE_TYPE (EphyNotification, ephy_notification, GTK_TYPE_BIN);
 
 static void
 ephy_notification_constructed (GObject *object)
diff --git a/lib/ephy-notification.h b/lib/ephy-notification.h
index fa91569a3..d3226cb68 100644
--- a/lib/ephy-notification.h
+++ b/lib/ephy-notification.h
@@ -27,7 +27,7 @@ G_BEGIN_DECLS
 
 #define EPHY_TYPE_NOTIFICATION (ephy_notification_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyNotification, ephy_notification, EPHY, NOTIFICATION, GtkFrame)
+G_DECLARE_FINAL_TYPE (EphyNotification, ephy_notification, EPHY, NOTIFICATION, GtkBin)
 
 EphyNotification *ephy_notification_new  (const char *head,
                                           const char *body);


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