[gnome-calendar/ui-rewrite] gcal-day-view: clean up unneeded functions



commit bb041821ca97c793ea3c98afcec35634c956b83b
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Tue Jun 18 09:28:07 2013 -0400

    gcal-day-view: clean up unneeded functions

 src/gcal-day-view.c |   34 ++++++++++------------------------
 1 files changed, 10 insertions(+), 24 deletions(-)
---
diff --git a/src/gcal-day-view.c b/src/gcal-day-view.c
index a88e670..0d48176 100644
--- a/src/gcal-day-view.c
+++ b/src/gcal-day-view.c
@@ -209,18 +209,21 @@ gcal_day_view_finalize (GObject       *object)
 
 static void
 gcal_day_view_set_property (GObject       *object,
-                             guint          property_id,
-                             const GValue  *value,
-                             GParamSpec    *pspec)
+                            guint          property_id,
+                            const GValue  *value,
+                            GParamSpec    *pspec)
 {
-  g_return_if_fail (GCAL_IS_DAY_VIEW (object));
+  GcalDayViewPrivate *priv;
+
+  priv = GCAL_DAY_VIEW (object)->priv;
 
   switch (property_id)
     {
     case PROP_DATE:
-      gcal_day_view_set_date (
-          GCAL_DAY_VIEW (object),
-          g_value_dup_boxed (value));
+      if (priv->date != NULL)
+        g_free (priv->date);
+
+      priv->date = g_value_dup_boxed (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -236,7 +239,6 @@ gcal_day_view_get_property (GObject       *object,
 {
   GcalDayViewPrivate *priv;
 
-  g_return_if_fail (GCAL_IS_DAY_VIEW (object));
   priv = GCAL_DAY_VIEW (object)->priv;
 
   switch (property_id)
@@ -297,22 +299,6 @@ gcal_day_view_add (GtkContainer *container,
   g_free (summ);
 }
 
-
-static void
-gcal_day_view_set_date (GcalDayView  *view,
-                        icaltimetype *date)
-
-{
-  GcalDayViewPrivate *priv;
-
-  priv = view->priv;
-
-  if (priv->date != NULL)
-    g_free (priv->date);
-
-  priv->date = date;
-}
-
 /* GcalView API */
 static icaltimetype*
 gcal_day_view_get_initial_date (GcalView *view)


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