diff options
author | Damon Chaplin <damon@helixcode.com> | 2000-05-06 18:43:14 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2000-05-06 18:43:14 +0800 |
commit | 10ee8953e2d461f3164cbc32784af1ab887aa0c7 (patch) | |
tree | e4604f9a32f3e0b569e566216d4d2a969734a23d /calendar/gui/gncal-todo.c | |
parent | 154973985a05b17e29e1588adccaee0c17dd11d5 (diff) | |
download | gsoc2013-evolution-10ee8953e2d461f3164cbc32784af1ab887aa0c7.tar.gz gsoc2013-evolution-10ee8953e2d461f3164cbc32784af1ab887aa0c7.tar.zst gsoc2013-evolution-10ee8953e2d461f3164cbc32784af1ab887aa0c7.zip |
added guint ref_count to iCalObject struct, and ical_object_ref/unref()
2000-05-06 Damon Chaplin <damon@helixcode.com>
* cal-util/calobj.[hc]: added guint ref_count to iCalObject struct,
and ical_object_ref/unref() functions. I've updated all the gui/
stuff to use ref_counts but I haven't touched the pcs/ stuff. Maybe
just using ical_object_destroy() is OK there.
* gui/gncal-todo.c:
* gui/calendar-commands.c:
* gui/eventedit.c:
* gui/e-week-view.c:
* gui/e-day-view.c: use refcounting for iCalObjects.
* gui/e-day-view-main-item.c:
* gui/e-day-view-top-item.c:
* gui/e-day-view.c: try not to ever draw outside the event, even when
the event is very small.
2000-05-05 Damon Chaplin <damon@helixcode.com>
* gui/e-day-view.c: don't allow recurring events to be resized or
dragged, and don't show the resize/drag cursors. Actually it may be
better to let the user do the resize/drag and then ask them what they
want to do - change the single occurrence or the entire series.
* gui/e-day-view-time-item.c (e_day_view_time_item_show_popup_menu):
use e_auto_kill_popup_menu_on_hide() to destroy the popup menu.
* gui/popup-menu.c: include e-gui-utils.h
svn path=/trunk/; revision=2823
Diffstat (limited to 'calendar/gui/gncal-todo.c')
-rw-r--r-- | calendar/gui/gncal-todo.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c index e9ec433076..a7c54e6086 100644 --- a/calendar/gui/gncal-todo.c +++ b/calendar/gui/gncal-todo.c @@ -88,6 +88,8 @@ ok_button (GtkWidget *widget, GnomeDialog *dialog) } else gnome_calendar_object_changed (todo->calendar, ico, CHANGE_ALL); /* ok, summary only... */ + ical_object_unref (ico); + gtk_widget_destroy (GTK_WIDGET (dialog)); } @@ -100,8 +102,7 @@ cancel_button (GtkWidget *widget, GnomeDialog *dialog) ico->user_data = NULL; - if (ico->new) - ical_object_destroy (ico); + ical_object_unref (ico); gtk_widget_destroy (GTK_WIDGET (dialog)); @@ -227,6 +228,7 @@ simple_todo_editor (GncalTodo *todo, iCalObject *ico) ico->user_data = dialog; gtk_object_set_user_data (GTK_OBJECT (dialog), ico); + ical_object_ref (ico); gtk_object_set_data (GTK_OBJECT (dialog), "gncal_todo", todo); gtk_object_set_data (GTK_OBJECT (dialog), "summary_entry", entry); @@ -272,6 +274,7 @@ add_todo (GncalTodo *todo) ico->new = TRUE; simple_todo_editor (todo, ico); + ical_object_unref (ico); } static void @@ -762,7 +765,9 @@ insert_in_clist (GncalTodo *todo, iCalObject *ico) i = gtk_clist_append (todo->clist, text); - gtk_clist_set_row_data (todo->clist, i, ico); + gtk_clist_set_row_data_full (todo->clist, i, ico, + (GtkDestroyNotify) ical_object_unref); + ical_object_ref (ico); /* * determine if the task is overdue.. @@ -872,6 +877,7 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags) g_free (obj_string); insert_in_clist (todo, obj); + ical_object_unref (obj); g_free (uid); } g_list_free (uids); |