[gnome-calendar] build: remove unneeded code



commit 4eabc0223b61511fd067d728153d8582cc570544
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Mon Dec 22 21:52:35 2014 -0500

    build: remove unneeded code
    
    GObject type system zeroing instance private data, so initialization to
    NULL and FALSE is not needed.
    Misc code styles fixes.

 src/gcal-edit-dialog.c   |    5 -----
 src/gcal-event-widget.c  |    6 ------
 src/gcal-month-view.c    |    1 -
 src/gcal-time-selector.c |    9 +--------
 src/gcal-week-view.c     |   18 +-----------------
 src/gcal-window.c        |   17 -----------------
 src/gcal-year-view.c     |    9 +--------
 7 files changed, 3 insertions(+), 62 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 7b54148..d4c19f8 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -487,12 +487,7 @@ gcal_edit_dialog_init (GcalEditDialog *self)
 
   priv = gcal_edit_dialog_get_instance_private (self);
 
-  priv->source_uid = NULL;
-  priv->event_uid = NULL;
   priv->writable = TRUE;
-
-  priv->setting_event = FALSE;
-
   gtk_widget_init_template (GTK_WIDGET (self));
 }
 
diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c
index 9673fe4..93970a2 100644
--- a/src/gcal-event-widget.c
+++ b/src/gcal-event-widget.c
@@ -207,12 +207,6 @@ gcal_event_widget_class_init(GcalEventWidgetClass *klass)
 static void
 gcal_event_widget_init(GcalEventWidget *self)
 {
-  GcalEventWidgetPrivate *priv;
-
-  priv = gcal_event_widget_get_instance_private (self);
-  priv->button_pressed = FALSE;
-  priv->color = NULL;
-
   gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
   gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
 }
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index d67ee86..b8abcbd 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -616,7 +616,6 @@ gcal_month_view_init (GcalMonthView *self)
 
   priv->children = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_list_free);
   priv->single_day_children = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) 
g_list_free);
-  priv->multiday_children = NULL;
   priv->overflow_cells = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) 
g_list_free);
   priv->hidden_as_overflow = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
diff --git a/src/gcal-time-selector.c b/src/gcal-time-selector.c
index 2bd625e..7abea5e 100644
--- a/src/gcal-time-selector.c
+++ b/src/gcal-time-selector.c
@@ -161,14 +161,7 @@ gcal_time_selector_class_init (GcalTimeSelectorClass *klass)
 static void
 gcal_time_selector_init (GcalTimeSelector *self)
 {
-  GcalTimeSelectorPrivate *priv;
-
-  priv = gcal_time_selector_get_instance_private (self);
-
-  priv->time_label = NULL;
-  priv->popover = NULL;
-  priv->hour_spin = NULL;
-  priv->minute_spin = NULL;
+  ;
 }
 
 static void
diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c
index a2e0ff8..e0416a5 100644
--- a/src/gcal-week-view.c
+++ b/src/gcal-week-view.c
@@ -554,24 +554,8 @@ gcal_week_view_class_init (GcalWeekViewClass *klass)
 static void
 gcal_week_view_init (GcalWeekView *self)
 {
-  GcalWeekViewPrivate *priv;
-  gint i;
-
   gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
-
-  priv = gcal_week_view_get_instance_private (self);
-
-  for (i = 0; i < 7; i++)
-    {
-      priv->days[i] = NULL;
-    }
-
-  priv->view_window = NULL;
-  priv->grid_window = NULL;
-
-  gtk_style_context_add_class (
-      gtk_widget_get_style_context (GTK_WIDGET (self)),
-      "calendar-view");
+  gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "calendar-view");
 }
 
 static void
diff --git a/src/gcal-window.c b/src/gcal-window.c
index aa1aeb9..5e31e6c 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1204,23 +1204,6 @@ gcal_window_class_init(GcalWindowClass *klass)
 static void
 gcal_window_init (GcalWindow *self)
 {
-  GcalWindowPrivate *priv;
-
-  priv = gcal_window_get_instance_private (self);
-
-  /* states */
-  priv->search_mode = FALSE;
-
-  priv->event_creation_data = NULL;
-
-  /* calendar management */
-  priv->calendar_menu = NULL;
-
-  /* FIXME: Review real need of this */
-  priv->save_geometry_timeout_id = 0;
-  priv->event_to_delete = NULL;
-  priv->open_edit_dialog = FALSE;
-
   gtk_widget_init_template (GTK_WIDGET (self));
 }
 
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 709c0b8..2ec3a72 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -192,14 +192,7 @@ gcal_year_view_init (GcalYearView *self)
   priv->start_mark_cell = -1;
   priv->end_mark_cell = -1;
 
-  for (i = 0; i < 12; i++)
-    {
-      priv->months[i] = NULL;
-    }
-
-  gtk_style_context_add_class (
-      gtk_widget_get_style_context (GTK_WIDGET (self)),
-      "calendar-view");
+  gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "calendar-view");
 }
 
 static void


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