[balsa/wip/gtk4: 145/351] mime-widget-image: No longer a subclass



commit 2cb7e8bbf22551a77a28ea9fc04f458898661d64
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Feb 6 17:21:10 2018 -0500

    mime-widget-image: No longer a subclass
    
    BalsaMimeWidgetImage no longer needs to subclass BalsaMimeWidget, as
    neither the class nor the object add any members.

 src/balsa-mime-widget-image.c |   39 +--------------------------------------
 src/balsa-mime-widget-image.h |   14 --------------
 2 files changed, 1 insertions(+), 52 deletions(-)
---
diff --git a/src/balsa-mime-widget-image.c b/src/balsa-mime-widget-image.c
index bcbcf16..3fcc835 100644
--- a/src/balsa-mime-widget-image.c
+++ b/src/balsa-mime-widget-image.c
@@ -28,43 +28,6 @@
 #include "balsa-mime-widget-callbacks.h"
 #include <glib/gi18n.h>
 
-/*
- * GObject class definitions
- */
-struct _BalsaMimeWidgetImage {
-    BalsaMimeWidget  parent;
-};
-
-struct _BalsaMimeWidgetImageClass {
-    BalsaMimeWidgetClass parent;
-};
-
-G_DEFINE_TYPE(BalsaMimeWidgetImage,
-              balsa_mime_widget_image,
-              BALSA_TYPE_MIME_WIDGET);
-
-static void
-balsa_mime_widget_image_init(BalsaMimeWidgetImage * mwi)
-{
-}
-
-static void
-balsa_mime_widget_image_dispose(GObject * obj)
-{
-    (*G_OBJECT_CLASS(balsa_mime_widget_image_parent_class)->
-          dispose) (obj);
-}
-
-static void
-balsa_mime_widget_image_class_init(BalsaMimeWidgetImageClass * klass)
-{
-    GObjectClass *object_class = G_OBJECT_CLASS(klass);
-
-    object_class->dispose = balsa_mime_widget_image_dispose;
-}
-/*
- * End of GObject class definitions
- */
 
 static void balsa_mime_widget_image_gesture_pressed_cb(GtkGestureMultiPress *multi_press,
                                                        gint                  n_press,
@@ -108,7 +71,7 @@ balsa_mime_widget_new_image(BalsaMessage * bm,
     g_signal_connect(gesture, "pressed",
                      G_CALLBACK(balsa_mime_widget_image_gesture_pressed_cb), data);
 
-    mw = (BalsaMimeWidget *) g_object_new(BALSA_TYPE_MIME_WIDGET_IMAGE, NULL);
+    mw = (BalsaMimeWidget *) g_object_new(BALSA_TYPE_MIME_WIDGET, NULL);
     balsa_mime_widget_set_widget(mw, image);
 
     return mw;
diff --git a/src/balsa-mime-widget-image.h b/src/balsa-mime-widget-image.h
index 228ce89..11a6bd0 100644
--- a/src/balsa-mime-widget-image.h
+++ b/src/balsa-mime-widget-image.h
@@ -20,25 +20,11 @@
 #ifndef __BALSA_MIME_WIDGET_IMAGE_H__
 #define __BALSA_MIME_WIDGET_IMAGE_H__
 
-#include <glib-object.h>
 #include "balsa-message.h"
 #include "balsa-mime-widget.h"
 
 G_BEGIN_DECLS
 
-/*
- * GObject class definitions
- */
-
-#define BALSA_TYPE_MIME_WIDGET_IMAGE balsa_mime_widget_image_get_type()
-
-G_DECLARE_FINAL_TYPE(BalsaMimeWidgetImage, balsa_mime_widget_image,
-                     BALSA, MIME_WIDGET_IMAGE, BalsaMimeWidget)
-
-/*
- * End of GObject class definitions
- */
-
 BalsaMimeWidget *balsa_mime_widget_new_image(BalsaMessage * bm,
                                             LibBalsaMessageBody * mime_body,
                                             const gchar * content_type, gpointer data);


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