From 4b9ac3879d25d14cbaaab9237626257c3561f7ff Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 14 Feb 2011 19:15:36 +0100 Subject: Fix few memory leaks --- calendar/gui/e-cal-list-view.c | 3 +++ calendar/gui/e-memo-table.c | 4 ++++ calendar/gui/e-task-table.c | 10 ++++++++++ 3 files changed, 17 insertions(+) (limited to 'calendar') diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index 010de9590b..27a11787ae 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -183,6 +183,7 @@ setup_e_table (ECalListView *cal_list_view) NULL); e_table_extras_add_cell (extras, "calstring", cell); + g_object_unref (cell); /* Date fields */ @@ -214,6 +215,7 @@ setup_e_table (ECalListView *cal_list_view) G_BINDING_SYNC_CREATE); e_table_extras_add_cell (extras, "dateedit", popup_cell); + g_object_unref (popup_cell); cal_list_view->dates_cell = E_CELL_DATE_EDIT (popup_cell); gtk_widget_hide (E_CELL_DATE_EDIT (popup_cell)->none_button); @@ -243,6 +245,7 @@ setup_e_table (ECalListView *cal_list_view) g_list_free (strings); e_table_extras_add_cell (extras, "classification", popup_cell); + g_object_unref (popup_cell); /* Sorting */ diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 24c68905b4..9260c65411 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -347,6 +347,7 @@ memo_table_constructed (GObject *object) cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); g_object_set (cell, "bg_color_column", E_CAL_MODEL_FIELD_COLOR, NULL); e_table_extras_add_cell (extras, "calstring", cell); + g_object_unref (cell); /* * Date fields. @@ -377,6 +378,7 @@ memo_table_constructed (GObject *object) G_BINDING_SYNC_CREATE); e_table_extras_add_cell (extras, "dateedit", popup_cell); + g_object_unref (popup_cell); memo_table->dates_cell = E_CELL_DATE_EDIT (popup_cell); e_cell_date_edit_set_get_time_callback ( @@ -391,6 +393,8 @@ memo_table_constructed (GObject *object) cell = e_cell_toggle_new (icon_names, G_N_ELEMENTS (icon_names)); e_table_extras_add_cell (extras, "icon", cell); + g_object_unref (cell); + e_table_extras_add_icon_name (extras, "icon", "stock_notes"); /* set proper format component for a default 'date' cell renderer */ diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c index 60c5d50e0c..1af19e0ce6 100644 --- a/calendar/gui/e-task-table.c +++ b/calendar/gui/e-task-table.c @@ -432,6 +432,7 @@ task_table_constructed (GObject *object) NULL); e_table_extras_add_cell (extras, "calstring", cell); + g_object_unref (cell); /* * Date fields. @@ -466,6 +467,8 @@ task_table_constructed (GObject *object) G_BINDING_SYNC_CREATE); e_table_extras_add_cell (extras, "dateedit", popup_cell); + g_object_unref (popup_cell); + task_table->dates_cell = E_CELL_DATE_EDIT (popup_cell); e_cell_date_edit_set_get_time_callback ( @@ -498,6 +501,7 @@ task_table_constructed (GObject *object) g_list_free (strings); e_table_extras_add_cell (extras, "classification", popup_cell); + g_object_unref (popup_cell); /* Priority field. */ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); @@ -522,6 +526,7 @@ task_table_constructed (GObject *object) g_list_free (strings); e_table_extras_add_cell (extras, "priority", popup_cell); + g_object_unref (popup_cell); /* Percent field. */ cell = e_cell_percent_new (NULL, GTK_JUSTIFY_LEFT); @@ -550,6 +555,7 @@ task_table_constructed (GObject *object) g_list_free (strings); e_table_extras_add_cell (extras, "percent", popup_cell); + g_object_unref (popup_cell); /* Transparency field. */ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); @@ -572,6 +578,7 @@ task_table_constructed (GObject *object) g_list_free (strings); e_table_extras_add_cell (extras, "transparency", popup_cell); + g_object_unref (popup_cell); /* Status field. */ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT); @@ -596,6 +603,7 @@ task_table_constructed (GObject *object) g_list_free (strings); e_table_extras_add_cell (extras, "calstatus", popup_cell); + g_object_unref (popup_cell); e_table_extras_add_compare (extras, "date-compare", e_cell_date_edit_compare_cb); @@ -610,6 +618,8 @@ task_table_constructed (GObject *object) cell = e_cell_toggle_new (icon_names, G_N_ELEMENTS (icon_names)); e_table_extras_add_cell (extras, "icon", cell); + g_object_unref (cell); + e_table_extras_add_icon_name (extras, "icon", "stock_task"); e_table_extras_add_icon_name (extras, "complete", "stock_check-filled"); -- cgit v1.2.3