build: remove unneeded code
GObject type system zeroing instance private data, so initialization to NULL and FALSE is not needed. Misc code styles fixes.
This commit is contained in:
@@ -487,12 +487,7 @@ gcal_edit_dialog_init (GcalEditDialog *self)
|
|||||||
|
|
||||||
priv = gcal_edit_dialog_get_instance_private (self);
|
priv = gcal_edit_dialog_get_instance_private (self);
|
||||||
|
|
||||||
priv->source_uid = NULL;
|
|
||||||
priv->event_uid = NULL;
|
|
||||||
priv->writable = TRUE;
|
priv->writable = TRUE;
|
||||||
|
|
||||||
priv->setting_event = FALSE;
|
|
||||||
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (self));
|
gtk_widget_init_template (GTK_WIDGET (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -207,12 +207,6 @@ gcal_event_widget_class_init(GcalEventWidgetClass *klass)
|
|||||||
static void
|
static void
|
||||||
gcal_event_widget_init(GcalEventWidget *self)
|
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_has_window (GTK_WIDGET (self), FALSE);
|
||||||
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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->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->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->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);
|
priv->hidden_as_overflow = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||||
|
|
||||||
|
|||||||
@@ -161,14 +161,7 @@ gcal_time_selector_class_init (GcalTimeSelectorClass *klass)
|
|||||||
static void
|
static void
|
||||||
gcal_time_selector_init (GcalTimeSelector *self)
|
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
|
static void
|
||||||
|
|||||||
+1
-17
@@ -554,24 +554,8 @@ gcal_week_view_class_init (GcalWeekViewClass *klass)
|
|||||||
static void
|
static void
|
||||||
gcal_week_view_init (GcalWeekView *self)
|
gcal_week_view_init (GcalWeekView *self)
|
||||||
{
|
{
|
||||||
GcalWeekViewPrivate *priv;
|
|
||||||
gint i;
|
|
||||||
|
|
||||||
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
|
||||||
|
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "calendar-view");
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -1204,23 +1204,6 @@ gcal_window_class_init(GcalWindowClass *klass)
|
|||||||
static void
|
static void
|
||||||
gcal_window_init (GcalWindow *self)
|
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));
|
gtk_widget_init_template (GTK_WIDGET (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,14 +192,7 @@ gcal_year_view_init (GcalYearView *self)
|
|||||||
priv->start_mark_cell = -1;
|
priv->start_mark_cell = -1;
|
||||||
priv->end_mark_cell = -1;
|
priv->end_mark_cell = -1;
|
||||||
|
|
||||||
for (i = 0; i < 12; i++)
|
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), "calendar-view");
|
||||||
{
|
|
||||||
priv->months[i] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_style_context_add_class (
|
|
||||||
gtk_widget_get_style_context (GTK_WIDGET (self)),
|
|
||||||
"calendar-view");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user