[Evolution-hackers] libecal problem

2007-08-02 Thread sandipan.chakravarty
Hi,
I am trying to write a libecal program , when I use it in a standalone program 
the code works fine but when the code is put as a plugin to another gtk program 
(kiba-dock) the dock crashes(SEGV) on exit .

ESource *source = NULL;
ESourceList *sources = NULL;
GError *gerror = NULL;

e_cal_get_sources(sources,E_CAL_SOURCE_TYPE_TODO,gerror)
ECal *abcd;
abcd = e_cal_new_system_tasks();

GDB backtrace:

(gdb) where
#0  0x044b16a0 in ?? ()
#1  0x0414843c in ?? () from /usr/lib/libbonobo-2.so.0
#2  0x009fc500 in ?? () from /usr/lib/libORBit-2.so.0
#3  0x00c446c6 in g_hash_table_foreach () from /lib/libglib-2.0.so.0
#4  0x009ffe20 in ORBit_POA_deactivate () from /usr/lib/libORBit-2.so.0
#5  0x00a0008e in ?? () from /usr/lib/libORBit-2.so.0
#6  0x00a00153 in ?? () from /usr/lib/libORBit-2.so.0
#7  0x00a002ac in PortableServer_POA_destroy () from /usr/lib/libORBit-2.so.0
#8  0x009eb556 in CORBA_ORB_shutdown () from /usr/lib/libORBit-2.so.0
#9  0x009eb6cd in CORBA_ORB_destroy () from /usr/lib/libORBit-2.so.0
#10 0x009ecdef in ?? () from /usr/lib/libORBit-2.so.0
#11 0x00277c5e in exit () from /lib/libc.so.6
#12 0x00261f78 in __libc_start_main () from /lib/libc.so.6
#13 0x08053a81 in _start ()

Any pointers as to how to fix this ?

Thanks,
sandic

___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] Please comment on patch for evolution contacts access in deskbar-applet

2007-08-02 Thread Karl Relton
Hi friends

The deskbar-applet utility uses e-d-s to search through evo
addressbooks. However the code used wasn't working on evo-ldap
addressbooks.

On investigation, I found the code was using e_book_new_from_uri when it
could have simply been using e_book_new. Changing as per the attached
patch fixes the problem.

The maintainer of deskbar applet would like an Evo guru to just give a
nod or thumbs up that this makes sense, before he commits.

Can someone please take a look - I've included the whole function in the
2nd attachment to give the overall context.

Thanks
Karl
--- evolution.c.orig	2007-08-02 21:45:02.0 +0100
+++ evolution.c	2007-08-02 21:47:14.0 +0100
@@ -215,13 +215,11 @@ init (void)
 			p = e_source_get_property (source, completion);
 
 			if (p != NULL  strcmp (p, true) == 0) {
-char *uri = g_strdup_printf (%s/%s, e_source_group_peek_base_uri (group), e_source_peek_relative_uri (source));
-EBook *book = e_book_new_from_uri (uri, NULL);
+EBook *book = e_book_new (source, NULL);
 if (book != NULL) {
 	books = g_slist_prepend (books, book);
 	e_book_open(book, TRUE, NULL);
 }
-g_free (uri);
 			}
 		}
 	}

void
init (void)
{
	GSList *list, *l;
	ESourceList *source_list;

	source_list = e_source_list_new_for_gconf_default (/apps/evolution/addressbook/sources);
	if (source_list == NULL) {
		return;
	}

	list = e_source_list_peek_groups (source_list);

	for (l = list; l != NULL; l = l-next) {
		ESourceGroup *group = l-data;
		GSList *sources = NULL, *m;
		sources = e_source_group_peek_sources (group);
		for (m = sources; m != NULL; m = m-next) {
			ESource *source = m-data;
			const char *p;

			p = e_source_get_property (source, completion);

			if (p != NULL  strcmp (p, true) == 0) {
EBook *book = e_book_new (source, NULL);
if (book != NULL) {
	books = g_slist_prepend (books, book);
	e_book_open(book, TRUE, NULL);
}
			}
		}
	}

	g_object_unref (source_list);
}
___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers