[Evolution-hackers] some trivial e-d-s patches
- From: Mark McLoughlin <mark skynet ie>
- To: evolution-hackers lists ximian com
- Subject: [Evolution-hackers] some trivial e-d-s patches
- Date: Tue, 13 Jan 2004 17:40:20 +0000
Hi,
These changes were sitting in my tree:
+ Remove debugging messages
+ Remove unused backend_died_cb()[1]
+ Fix a leak in ESourceList
+ Don't write out a source <properties> tag if there
are no sources.
Okay to commit ?
Thanks,
Mark.
[1] - Now that I look at it, the signal should be removed completely -
unless this is just an oversight.
Index: calendar/libecal/e-cal-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-listener.c,v
retrieving revision 1.4
diff -u -p -r1.4 e-cal-listener.c
--- calendar/libecal/e-cal-listener.c 15 Dec 2003 22:02:51 -0000 1.4
+++ calendar/libecal/e-cal-listener.c 13 Jan 2004 17:33:56 -0000
@@ -610,8 +610,6 @@ impl_notifyCalSetMode (PortableServer_Se
if (!priv->notify)
return;
- g_message ("notify_set_mode");
-
g_assert (priv->cal_set_mode_fn != NULL);
(* priv->cal_set_mode_fn) (listener, status, mode, priv->fn_data);
}
@@ -632,8 +630,6 @@ impl_notifyErrorOccurred (PortableServer
if (!priv->notify)
return;
- g_message ("notify_error");
-
g_assert (priv->error_occurred_fn != NULL);
(* priv->error_occurred_fn) (listener, message, priv->fn_data);
}
@@ -653,8 +649,6 @@ impl_notifyCategoriesChanged (PortableSe
if (!priv->notify)
return;
- g_message ("notify_categories");
-
g_assert (priv->categories_changed_fn != NULL);
(* priv->categories_changed_fn) (listener, categories, priv->fn_data);
}
Index: calendar/libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.25
diff -u -p -r1.25 e-cal.c
--- calendar/libecal/e-cal.c 9 Jan 2004 20:05:31 -0000 1.25
+++ calendar/libecal/e-cal.c 13 Jan 2004 17:33:56 -0000
@@ -321,17 +321,6 @@ free_timezone (gpointer key, gpointer va
-static void
-backend_died_cb (EComponentListener *cl, gpointer user_data)
-{
- ECalPrivate *priv;
- ECal *ecal = (ECal *) user_data;
-
- priv = ecal->priv;
- priv->load_state = E_CAL_LOAD_NOT_LOADED;
- g_signal_emit (G_OBJECT (ecal), e_cal_signals[BACKEND_DIED], 0);
-}
-
/* Signal handlers for the listener's signals */
/* Handle the cal_opened notification from the listener */
@@ -971,7 +960,6 @@ get_factories (const char *str_uri, GLis
info = servers->_buffer + i;
- g_message (G_STRLOC ": Activating calendar factory (%s)", info->iid);
factory = bonobo_activation_activate_from_id (info->iid, 0, NULL, NULL);
if (factory == CORBA_OBJECT_NIL)
Index: libedataserver/e-source-list.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source-list.c,v
retrieving revision 1.8
diff -u -p -r1.8 e-source-list.c
--- libedataserver/e-source-list.c 9 Jan 2004 17:56:49 -0000 1.8
+++ libedataserver/e-source-list.c 13 Jan 2004 17:33:57 -0000
@@ -85,16 +85,26 @@ load_from_gconf (ESourceList *list)
for (p = conf_list, pos = 0; p != NULL; p = p->next, pos++) {
const char *xml = p->data;
- xmlDocPtr xmldoc = xmlParseDoc ((char *) xml);
- char *group_uid = e_source_group_uid_from_xmldoc (xmldoc);
+ xmlDocPtr xmldoc;
+ char *group_uid;
ESourceGroup *existing_group;
- if (group_uid == NULL)
+ xmldoc = xmlParseDoc ((char *) xml);
+ if (xmldoc == NULL)
continue;
+ group_uid = e_source_group_uid_from_xmldoc (xmldoc);
+ if (group_uid == NULL) {
+ xmlFreeDoc (xmldoc);
+ continue;
+ }
+
existing_group = e_source_list_peek_group_by_uid (list, group_uid);
- if (g_hash_table_lookup (new_groups_hash, existing_group) != NULL)
+ if (g_hash_table_lookup (new_groups_hash, existing_group) != NULL) {
+ xmlFreeDoc (xmldoc);
+ g_free (group_uid);
continue;
+ }
if (existing_group == NULL) {
ESourceGroup *new_group = e_source_group_new_from_xmldoc (xmldoc);
@@ -124,6 +134,7 @@ load_from_gconf (ESourceList *list)
list->priv->ignore_group_changed --;
}
+ xmlFreeDoc (xmldoc);
g_free (group_uid);
}
Index: libedataserver/e-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source.c,v
retrieving revision 1.11
diff -u -p -r1.11 e-source.c
--- libedataserver/e-source.c 9 Jan 2004 20:05:34 -0000 1.11
+++ libedataserver/e-source.c 13 Jan 2004 17:33:57 -0000
@@ -622,7 +622,7 @@ dump_common_to_xml_node (ESource *source
ESourcePrivate *priv;
gboolean has_color;
guint32 color;
- xmlNodePtr node, properties_node;
+ xmlNodePtr node;
priv = source->priv;
@@ -642,8 +642,12 @@ dump_common_to_xml_node (ESource *source
g_free (color_string);
}
- properties_node = xmlNewChild (node, NULL, "properties", NULL);
- g_hash_table_foreach (priv->properties, (GHFunc) property_dump_cb, properties_node);
+ if (g_hash_table_size (priv->properties) != 0) {
+ xmlNodePtr properties_node;
+
+ properties_node = xmlNewChild (node, NULL, "properties", NULL);
+ g_hash_table_foreach (priv->properties, (GHFunc) property_dump_cb, properties_node);
+ }
return node;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]