[gnome-calendar] week-view: modernize Gobject boilerplate code
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] week-view: modernize Gobject boilerplate code
- Date: Thu, 4 Dec 2014 22:31:44 +0000 (UTC)
commit ee1d760398f97326b15d0629f11bbfc21d06fdd8
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Sep 25 23:35:45 2014 -0400
week-view: modernize Gobject boilerplate code
src/gcal-week-view.c | 6 ++----
src/gcal-week-view.h | 4 ----
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c
index 814a095..f1fed93 100644
--- a/src/gcal-week-view.c
+++ b/src/gcal-week-view.c
@@ -54,7 +54,7 @@ struct _GcalWeekViewChild
typedef struct _GcalWeekViewChild GcalWeekViewChild;
-struct _GcalWeekViewPrivate
+typedef struct
{
/**
* This is where we keep the refs of the child widgets.
@@ -75,7 +75,7 @@ struct _GcalWeekViewPrivate
GdkWindow *event_window;
gint clicked_cell;
-};
+} GcalWeekViewPrivate;
static void gcal_view_interface_init (GcalViewIface *iface);
@@ -192,8 +192,6 @@ gcal_week_view_class_init (GcalWeekViewClass *klass)
object_class->get_property = gcal_week_view_get_property;
g_object_class_override_property (object_class, PROP_DATE, "active-date");
-
- g_type_class_add_private ((gpointer)klass, sizeof (GcalWeekViewPrivate));
}
diff --git a/src/gcal-week-view.h b/src/gcal-week-view.h
index 3666197..ee67f50 100644
--- a/src/gcal-week-view.h
+++ b/src/gcal-week-view.h
@@ -33,14 +33,10 @@ G_BEGIN_DECLS
typedef struct _GcalWeekView GcalWeekView;
typedef struct _GcalWeekViewClass GcalWeekViewClass;
-typedef struct _GcalWeekViewPrivate GcalWeekViewPrivate;
struct _GcalWeekView
{
GtkContainer parent;
-
- /* add your public declarations here */
- GcalWeekViewPrivate *priv;
};
struct _GcalWeekViewClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]