summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-06 17:28:49 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:51 +0200
commit5347614b1dae2a8edad9f8cebc073c4a282de7b7 (patch)
tree2307eba0ce8555e5ec52c122b2705366cebb6160 /eel
parent9bb422fbed4667c1540889091960f7ee9ebd89ed (diff)
downloadcaja-5347614b1dae2a8edad9f8cebc073c4a282de7b7.tar.bz2
caja-5347614b1dae2a8edad9f8cebc073c4a282de7b7.tar.xz
[eel-debug-drawing] Don't use eel-gtk-macros
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-debug-drawing.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/eel/eel-debug-drawing.c b/eel/eel-debug-drawing.c
index 61a3aeb6..63706829 100644
--- a/eel/eel-debug-drawing.c
+++ b/eel/eel-debug-drawing.c
@@ -32,7 +32,6 @@
#include "eel-gdk-pixbuf-extensions.h"
#include "eel-gtk-extensions.h"
#include "eel-gtk-extensions.h"
-#include "eel-gtk-macros.h"
#include <gtk/gtk.h>
@@ -73,29 +72,7 @@ struct DebugPixbufViewerClass
GtkWidgetClass parent_class;
};
-/* GtkObjectClass methods */
-static void debug_pixbuf_viewer_class_init (DebugPixbufViewerClass *pixbuf_viewer_class);
-static void debug_pixbuf_viewer_init (DebugPixbufViewer *pixbuf_viewer);
-static void debug_pixbuf_viewer_finalize (GObject *object);
-
-/* GtkWidgetClass methods */
-static void debug_pixbuf_viewer_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static int debug_pixbuf_viewer_expose_event (GtkWidget *widget,
- GdkEventExpose *event);
-
-EEL_CLASS_BOILERPLATE (DebugPixbufViewer, debug_pixbuf_viewer, GTK_TYPE_WIDGET)
-
-static void
-debug_pixbuf_viewer_class_init (DebugPixbufViewerClass *pixbuf_viewer_class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (pixbuf_viewer_class);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (pixbuf_viewer_class);
-
- object_class->finalize = debug_pixbuf_viewer_finalize;
- widget_class->size_request = debug_pixbuf_viewer_size_request;
- widget_class->expose_event = debug_pixbuf_viewer_expose_event;
-}
+G_DEFINE_TYPE (DebugPixbufViewer, debug_pixbuf_viewer, GTK_TYPE_WIDGET)
static void
debug_pixbuf_viewer_init (DebugPixbufViewer *viewer)
@@ -113,7 +90,7 @@ debug_pixbuf_viewer_finalize (GObject *object)
eel_gdk_pixbuf_unref_if_not_null (viewer->pixbuf);
viewer->pixbuf = NULL;
- EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+ G_OBJECT_CLASS (debug_pixbuf_viewer_parent_class)->finalize (object);
}
static void
@@ -199,6 +176,17 @@ debug_pixbuf_viewer_expose_event (GtkWidget *widget, GdkEventExpose *event)
}
static void
+debug_pixbuf_viewer_class_init (DebugPixbufViewerClass *pixbuf_viewer_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (pixbuf_viewer_class);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (pixbuf_viewer_class);
+
+ object_class->finalize = debug_pixbuf_viewer_finalize;
+ widget_class->size_request = debug_pixbuf_viewer_size_request;
+ widget_class->expose_event = debug_pixbuf_viewer_expose_event;
+}
+
+static void
debug_pixbuf_viewer_set_pixbuf (DebugPixbufViewer *viewer, GdkPixbuf *pixbuf)
{
g_assert (DEBUG_IS_PIXBUF_VIEWER (viewer));