diff options
author | JP Rosevear <jpr@ximian.com> | 2003-11-18 12:24:25 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2003-11-18 12:24:25 +0800 |
commit | 0931299f2341f04071311f07e8271db19d9ddc7d (patch) | |
tree | 93f115e5f5bbba965368182e643287f14aecc9ba /calendar | |
parent | 0a2c5b0c061ebdfe9837b165d9de7529050c2d76 (diff) | |
download | gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar.gz gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar.bz2 gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar.lz gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar.xz gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.tar.zst gsoc2013-evolution-0931299f2341f04071311f07e8271db19d9ddc7d.zip |
Cleanup some ref/unref calls
2003-11-17 JP Rosevear <jpr@ximian.com>
* Cleanup some ref/unref calls
svn path=/trunk/; revision=23412
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 4 | ||||
-rw-r--r-- | calendar/TODO.port | 12 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/config-data.c | 4 | ||||
-rw-r--r-- | calendar/gui/calendar-offline-handler.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-page.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 30 | ||||
-rw-r--r-- | calendar/gui/dialogs/e-delegate-dialog.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-editor.c | 12 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/meeting-page.c | 16 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/schedule-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-editor.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 4 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 2 |
18 files changed, 57 insertions, 65 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7a8b94098a..77f750d3e3 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,7 @@ +2003-11-17 JP Rosevear <jpr@ximian.com> + + * Cleanup some ref/unref calls + 2003-11-17 Rodrigo Moya <rodrigo@ximian.com> * gui/calendar-component.c (delete_calendar_cb, rename_calendar_cb): diff --git a/calendar/TODO.port b/calendar/TODO.port deleted file mode 100644 index 35233d35b9..0000000000 --- a/calendar/TODO.port +++ /dev/null @@ -1,12 +0,0 @@ -* gui/alarm-notify/alarm-notify-dialog.c: - replace missing gnome_win_hints_* calls. -* gui/dialogs/comp-editor-util.c - there's a comment in comp_editor_create_contacts_component about OAF being broken. - Check if it's true with BonoboActivation. -* pcs/cal-backend-file.c - remove usage of BonoboConf -* */* - remove the G_OBJECT macro in the calls to g_object_ref/_unref, since those functions - already do the type checking, and it's a heavy operation. -* */* - replace the signal handlers for "destroy" with weak references. diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index ce179c9b92..8737d0549f 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_CONFIOH #include <config.h> #endif @@ -49,7 +49,7 @@ locale_supports_12_hour_format (void) static void do_cleanup (void) { - g_object_unref (G_OBJECT (config)); + g_object_unref (config); config = NULL; inited = FALSE; } diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c index 231b7aab05..55bca89cc7 100644 --- a/calendar/gui/calendar-offline-handler.c +++ b/calendar/gui/calendar-offline-handler.c @@ -166,7 +166,7 @@ static void backend_cal_opened_online (ECal *client, ECalendarStatus status, gpointer data) { if (status != E_CALENDAR_STATUS_OK) { - g_object_unref (G_OBJECT (client)); + g_object_unref (client); return; } @@ -210,7 +210,7 @@ backend_go_online (gpointer data, gpointer user_data) success = e_cal_open (client, TRUE, &error); if (!success) { g_warning (_("backend_go_online(): %s"), error->message); - g_object_unref (G_OBJECT (client)); + g_object_unref (client); g_error_free (error); return; } diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c index f07df3c28f..db40dde2e7 100644 --- a/calendar/gui/dialogs/alarm-page.c +++ b/calendar/gui/dialogs/alarm-page.c @@ -861,7 +861,7 @@ alarm_page_new (void) apage = g_object_new (TYPE_ALARM_PAGE, NULL); if (!alarm_page_construct (apage)) { - g_object_unref ((apage)); + g_object_unref (apage); return NULL; } diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index bfb9c06112..83363a3ac0 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -323,7 +323,7 @@ config_control_destroy_callback (GtkObject *object, dialog_data = (DialogData *) data; - g_object_unref((dialog_data->xml)); + g_object_unref (dialog_data->xml); g_free (dialog_data); } diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 1a6611b017..64771bebed 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -273,11 +273,11 @@ comp_editor_page_set_e_cal (CompEditorPage *page, ECal *client) g_return_if_fail (IS_COMP_EDITOR_PAGE (page)); if (page->client) - g_object_unref((client)); + g_object_unref (client); page->client = client; if (page->client) - g_object_ref((client)); + g_object_ref (client); } /** diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 5e88774ae5..3b2b32f17a 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -273,10 +273,10 @@ comp_editor_finalize (GObject *object) since they have lots of signal handlers connected to the widgets with the pages as the data. */ for (l = priv->pages; l != NULL; l = l->next) - g_object_unref((l->data)); + g_object_unref (l->data); if (priv->comp) { - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = NULL; } @@ -306,7 +306,7 @@ save_comp (CompEditor *editor) clone = e_cal_component_clone (priv->comp); for (l = priv->pages; l != NULL; l = l->next) { if (!comp_editor_page_fill_component (l->data, clone)) { - g_object_unref((clone)); + g_object_unref (clone); comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data)); return FALSE; } @@ -318,7 +318,7 @@ save_comp (CompEditor *editor) else e_cal_component_abort_sequence (clone); - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = clone; priv->updating = TRUE; @@ -627,7 +627,7 @@ comp_editor_append_page (CompEditor *editor, priv = editor->priv; - g_object_ref((page)); + g_object_ref (page); /* If we are editing something, fill the widgets with current info */ if (priv->comp != NULL) { @@ -635,7 +635,7 @@ comp_editor_append_page (CompEditor *editor, comp = comp_editor_get_current_comp (editor); comp_editor_page_fill_widgets (page, comp); - g_object_unref((comp)); + g_object_unref (comp); } page_widget = comp_editor_page_get_widget (page); @@ -703,7 +703,7 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page) gtk_notebook_remove_page (priv->notebook, page_num); priv->pages = g_list_remove (priv->pages, page); - g_object_unref((page)); + g_object_unref (page); } /** @@ -935,13 +935,13 @@ real_set_e_cal (CompEditor *editor, ECal *client) g_return_if_fail (E_IS_CAL (client)); g_return_if_fail (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED); - g_object_ref((client)); + g_object_ref (client); } if (priv->client) { gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), editor); - g_object_unref((priv->client)); + g_object_unref (priv->client); } priv->client = client; @@ -968,7 +968,7 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp) priv = editor->priv; if (priv->comp) { - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = NULL; } @@ -998,9 +998,9 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method) if (itip_send_comp (method, priv->comp, priv->client, NULL)) { tmp_comp = priv->comp; - g_object_ref((tmp_comp)); + g_object_ref (tmp_comp); comp_editor_edit_comp (editor, tmp_comp); - g_object_unref((tmp_comp)); + g_object_unref (tmp_comp); comp_editor_set_changed (editor, TRUE); save_comp (editor); @@ -1325,7 +1325,7 @@ print_cmd (GtkWidget *widget, gpointer data) comp = comp_editor_get_current_comp (editor); print_comp (comp, editor->priv->client, FALSE); - g_object_unref((comp)); + g_object_unref (comp); } static void @@ -1338,7 +1338,7 @@ print_preview_cmd (GtkWidget *widget, gpointer data) comp = comp_editor_get_current_comp (editor); print_comp (comp, editor->priv->client, TRUE); - g_object_unref((comp)); + g_object_unref (comp); } static void @@ -1458,7 +1458,7 @@ obj_updated_cb (ECal *client, const char *uid, gpointer data) icalcomponent_free (icalcomp); } - g_object_unref((comp)); + g_object_unref (comp); } else { GtkWidget *dlg; diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c index 3abda1a420..546f95a499 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.c +++ b/calendar/gui/dialogs/e-delegate-dialog.c @@ -187,7 +187,7 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char str = eab_destination_exportv(destv); bonobo_widget_set_property (BONOBO_WIDGET (priv->entry), "destinations", TC_CORBA_string, str, NULL); g_free(str); - g_object_unref((dest)); + g_object_unref (dest); g_signal_connect((priv->addressbook), "clicked", G_CALLBACK (addressbook_clicked_cb), edd); @@ -196,7 +196,7 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char error: - g_object_unref((edd)); + g_object_unref (edd); return NULL; } diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index c3ba39aada..9b3a00e6cc 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -368,7 +368,7 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) client = e_meeting_store_get_e_cal (priv->model); result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL); - g_object_unref((comp)); + g_object_unref (comp); if (!result) return FALSE; @@ -394,11 +394,11 @@ event_editor_finalize (GObject *object) ee = EVENT_EDITOR (object); priv = ee->priv; - g_object_unref((priv->event_page)); - g_object_unref((priv->alarm_page)); - g_object_unref((priv->recur_page)); - g_object_unref((priv->meet_page)); - g_object_unref((priv->sched_page)); + g_object_unref (priv->event_page); + g_object_unref (priv->alarm_page); + g_object_unref (priv->recur_page); + g_object_unref (priv->meet_page); + g_object_unref (priv->sched_page); g_object_unref (priv->model); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index c883174c1f..9bede0f4b5 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -184,7 +184,7 @@ event_page_finalize (GObject *object) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } @@ -1344,7 +1344,7 @@ event_page_new (void) epage = g_object_new (TYPE_EVENT_PAGE, NULL); if (!event_page_construct (epage)) { - g_object_unref ((epage)); + g_object_unref (epage); return NULL; } diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 311ff6c879..4c7edeebfe 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -225,7 +225,7 @@ cleanup_attendees (GPtrArray *attendees) int i; for (i = 0; i < attendees->len; i++) - g_object_unref((g_ptr_array_index (attendees, i))); + g_object_unref (g_ptr_array_index (attendees, i)); } /* Destroy handler for the task page */ @@ -242,7 +242,7 @@ meeting_page_finalize (GObject *object) priv = mpage->priv; if (priv->comp != NULL) - g_object_unref((priv->comp)); + g_object_unref (priv->comp); cleanup_attendees (priv->deleted_attendees); g_ptr_array_free (priv->deleted_attendees, TRUE); @@ -250,13 +250,13 @@ meeting_page_finalize (GObject *object) if (priv->ia != NULL) g_object_unref (priv->ia); - g_object_unref((priv->model)); + g_object_unref (priv->model); if (priv->main) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } @@ -332,7 +332,7 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) /* Clean out old data */ if (priv->comp != NULL) - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = NULL; cleanup_attendees (priv->deleted_attendees); @@ -611,7 +611,7 @@ popup_delete_cb (GtkWidget *widget, gpointer data) while (ia != NULL) { EMeetingAttendee *ib = NULL; - g_object_ref((ia)); + g_object_ref (ia); g_ptr_array_add (priv->deleted_attendees, ia); e_meeting_store_remove_attendee (priv->model, ia); @@ -759,7 +759,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems, g_list_free (address_strings); /* The etable displaying attendees and their status */ - g_object_ref((ems)); + g_object_ref (ems); priv->model = ems; btn = gtk_button_new_with_label ("Add Attendee"); @@ -803,7 +803,7 @@ meeting_page_new (EMeetingStore *ems, ECal *client) mpage = g_object_new (TYPE_MEETING_PAGE, NULL); if (!meeting_page_construct (mpage, ems, client)) { - g_object_unref((mpage)); + g_object_unref (mpage); return NULL; } diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index d00cd03f9c..5eadb2925a 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -309,12 +309,12 @@ recurrence_page_finalize (GObject *object) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } if (priv->comp) { - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = NULL; } @@ -1518,7 +1518,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) */ if (priv->comp) - g_object_unref((priv->comp)); + g_object_unref (priv->comp); priv->comp = e_cal_component_clone (comp); @@ -2393,7 +2393,7 @@ recurrence_page_new (void) rpage = g_object_new (TYPE_RECURRENCE_PAGE, NULL); if (!recurrence_page_construct (rpage)) { - g_object_unref((rpage)); + g_object_unref (rpage); return NULL; } diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 7ed42cb707..50969e2511 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -160,7 +160,7 @@ schedule_page_finalize (GObject *object) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } @@ -460,7 +460,7 @@ schedule_page_new (EMeetingStore *ems) spage = g_object_new (TYPE_SCHEDULE_PAGE, NULL); if (!schedule_page_construct (spage, ems)) { - g_object_unref((spage)); + g_object_unref (spage); return NULL; } diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 938a9ec1fe..ebd4b17f85 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -177,7 +177,7 @@ task_details_page_finalize (GObject *object) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } @@ -760,7 +760,7 @@ task_details_page_new (void) tdpage = g_object_new (TYPE_TASK_DETAILS_PAGE, NULL); if (!task_details_page_construct (tdpage)) { - g_object_unref ((tdpage)); + g_object_unref (tdpage); return NULL; } diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 5c796df3a3..c30704e3cf 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -339,7 +339,7 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) client = e_meeting_store_get_e_cal (priv->model); result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL); - g_object_unref((comp)); + g_object_unref (comp); if (!result) return FALSE; diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index e691c8de92..46c35b70db 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -174,7 +174,7 @@ task_page_finalize (GObject *object) gtk_widget_unref (priv->main); if (priv->xml) { - g_object_unref((priv->xml)); + g_object_unref (priv->xml); priv->xml = NULL; } @@ -906,7 +906,7 @@ task_page_new (void) tpage = gtk_type_new (TYPE_TASK_PAGE); if (!task_page_construct (tpage)) { - g_object_unref((tpage)); + g_object_unref (tpage); return NULL; } diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 8c8f07f18c..7ecabf8c46 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1142,7 +1142,7 @@ gnome_calendar_destroy (GtkObject *object) for (l = priv->dn_queries; l != NULL; l = l->next) { g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, gcal); - g_object_unref ((ECalView *) l->data); + g_object_unref (l->data); } g_list_free (priv->dn_queries); |