aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-05-04 23:44:17 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-05-04 23:44:17 +0800
commit562717e70a312939a8c9e828f587cb2f1e4a3b24 (patch)
tree61c344a024a30c94de6ccea0750927d5bb1cca8b
parentce2456dde6a985319c6fb27d26e4f5cfbd9f0a88 (diff)
downloadgsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar.gz
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar.bz2
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar.lz
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar.xz
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.tar.zst
gsoc2013-evolution-562717e70a312939a8c9e828f587cb2f1e4a3b24.zip
unref the calcomponent when we're done with it
2001-05-04 JP Rosevear <jpr@ximian.com> * gui/calendar-model.c (calendar_model_append_row): unref the calcomponent when we're done with it * cal-util/cal-component.c (cal_component_gen_uid): free the iso date string when we finish with it svn path=/trunk/; revision=9670
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/cal-util/cal-component.c20
-rw-r--r--calendar/gui/calendar-model.c2
3 files changed, 22 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2dd696c344..2c8ef1d3e4 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-04 JP Rosevear <jpr@ximian.com>
+
+ * gui/calendar-model.c (calendar_model_append_row): unref the
+ calcomponent when we're done with it
+
+ * cal-util/cal-component.c (cal_component_gen_uid): free the iso
+ date string when we finish with it
+
2001-04-27 JP Rosevear <jpr@ximian.com>
* gui/e-meeting-edit.c (put_property_in_list): remove hardcoded
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c
index b7aeef7a8c..237bf56842 100644
--- a/calendar/cal-util/cal-component.c
+++ b/calendar/cal-util/cal-component.c
@@ -331,6 +331,7 @@ cal_component_destroy (GtkObject *object)
char *
cal_component_gen_uid (void)
{
+ char *iso, *ret;
static char *hostname;
time_t t = time (NULL);
static int serial;
@@ -345,14 +346,17 @@ cal_component_gen_uid (void)
hostname = "localhost";
}
- return g_strdup_printf (
- "%s-%d-%d-%d-%d@%s",
- isodate_from_time_t (t),
- getpid (),
- getgid (),
- getppid (),
- serial++,
- hostname);
+ iso = isodate_from_time_t (t);
+ ret = g_strdup_printf ("%s-%d-%d-%d-%d@%s",
+ iso,
+ getpid (),
+ getgid (),
+ getppid (),
+ serial++,
+ hostname);
+ g_free (iso);
+
+ return ret;
}
/**
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index b9c11e16ef..d3b95e5054 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -1365,6 +1365,8 @@ calendar_model_append_row (ETableModel *etm, ETableModel *source, gint row)
/* FIXME: Show error dialog. */
g_message ("calendar_model_append_row(): Could not add new object!");
}
+
+ gtk_object_unref (GTK_OBJECT (comp));
}
/* Duplicates a string value */