[Evolution-hackers] mail_tool_uri_to_folder failing on uris it used to handle

2002-04-22 Thread iain

Hi guys,

mail_tool_uri_to_folder has started failing on uris that it used to
handle. Doing mail_tool_uri_to_folder
(file:///home/iain/evolution/local/Inbox, 0, ex); fails with the
exception No provider available for protocol `file'

Has this stuff changed recently?

iain

-- 
I think what we don't need is this worldwide apathy where people wait
for a leader. It shouldn't be like that, especially after Spetember 11.
England feels a bit like Germany before Adolf Hitler came along. There's
more unemployment, more crime and people are wondering, `Who is going to
get us out of this shit?` It's very dangerous. -- Alec Empire


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers



[Evolution-hackers] Patch for shell and mail to make the summary work

2002-04-22 Thread iain

Hi guys,

This is a patch I need to apply to shell and mail to allow the mailer to
be ready to handle the summary's requests for folder info.

Basically, the shell now sets the evolution directory in bonoboconf, and
on startup the mailer reads that directory instead of waiting for the
owner_set callback to set it. This allows mail_session_init to be called
at startup rather than at owner_set.

May I commit?

iain
-- 
No offence to them, but forty years from now,
 who's going to remember the Chemical Brothers? - Steve Vai


Index: shell//e-corba-storage-registry.c
===
RCS file: /cvs/gnome/evolution/shell/e-corba-storage-registry.c,v
retrieving revision 1.17
diff -U2 -r1.17 e-corba-storage-registry.c
--- shell//e-corba-storage-registry.c	9 Apr 2002 14:59:26 -	1.17
+++ shell//e-corba-storage-registry.c	22 Apr 2002 14:11:12 -
 -108,5 +108,6 
 	EStorage *storage;
 	GNOME_Evolution_StorageListener listener_interface;
-
+	GSList *iter;
+	
 	bonobo_object = bonobo_object_from_servant (servant);
 	storage_registry = E_CORBA_STORAGE_REGISTRY (bonobo_object);
 -125,4 +126,14 
 	gtk_object_unref (GTK_OBJECT (storage));
 
+
+   /* FIXME: if we remove a listener while looping through the list we can
+* crash. Yay CORBA reentrancy. */
+	g_print (Added name: %s\n, name);
+	for (iter = priv-listeners; iter; iter = iter-next) {
+		listener_notify (iter-data,
+ GNOME_Evolution_StorageRegistry_STORAGE_CREATED,
+ name);
+	}
+	
 	listener_interface = CORBA_Object_duplicate (e_corba_storage_get_StorageListener
 		 (E_CORBA_STORAGE (storage)), ev);
Index: shell//e-shell.c
===
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.158
diff -U2 -r1.158 e-shell.c
--- shell//e-shell.c	18 Apr 2002 18:57:45 -	1.158
+++ shell//e-shell.c	22 Apr 2002 14:11:13 -
 -1205,4 +1205,5 
 	gchar *shortcut_path;
 	gboolean start_online;
+	char *evo_path;
 
 	g_return_val_if_fail (shell != NULL, E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
 -1255,4 +1256,12 
 	CORBA_exception_free (ev);
 
+	/* Set the evolution directory */
+	evo_path = gnome_util_prepend_user_home (evolution);
+	bonobo_config_set_string (priv-db, shell/evolution_path, evo_path, NULL);
+	g_free (evo_path);
+	CORBA_exception_init (ev);
+	Bonobo_ConfigDatabase_sync (priv-db, ev);
+	CORBA_exception_free (ev);
+	
 	/* Now we can register into OAF.  Notice that we shouldn't be
 	   registering into OAF until we are sure we can complete.  */
Index: mail/component-factory.c
===
RCS file: /cvs/gnome/evolution/mail/component-factory.c,v
retrieving revision 1.248
diff -U2 -r1.248 component-factory.c
--- mail/component-factory.c	9 Apr 2002 15:00:57 -	1.248
+++ mail/component-factory.c	22 Apr 2002 14:11:30 -
 -26,4 +26,5 
 
 #include bonobo/bonobo-generic-factory.h
+#include bonobo/bonobo-exception.h
 #include gal/widgets/e-gui-utils.h
 
 -65,5 +66,5 
 char *default_outbox_folder_uri;
 CamelFolder *outbox_folder = NULL;
-char *evolution_dir;
+char *evolution_dir = NULL;
 
 EvolutionShellClient *global_shell_client = NULL;
 -710,7 +711,8 
 	gtk_signal_connect (GTK_OBJECT (shell_client), destroy,
 			shell_client_destroy, NULL);
-	
-	evolution_dir = g_strdup (evolution_homedir);
-	mail_session_init ();
+
+	if (evolution_dir == NULL) {
+		evolution_dir = g_strdup (evolution_homedir);
+	}
 
 	async_event = mail_async_event_new();
 -936,8 +938,28 
 create_component (void)
 {
+	Bonobo_ConfigDatabase db;
+	CORBA_Environment ev;
 	EvolutionShellComponentDndDestinationFolder *destination_interface;
 	MailOfflineHandler *offline_handler;
 	GdkPixbuf *new_mail_icon;
 	int i;
+
+	/* Get evolution path out of the config */
+	CORBA_exception_init (ev);
+	db = bonobo_get_object (wombat:, Bonobo/ConfigDatabase, ev);
+	if (BONOBO_EX (ev) || db == CORBA_OBJECT_NIL) {
+		char *err;
+		g_error (Very serious error, cannot activate config database '%s',
+			 (err = bonobo_exception_get_text (ev)));
+		g_free (ev);
+		CORBA_exception_free (ev);
+	}
+
+	evolution_dir = bonobo_config_get_string (db, shell/evolution_path, NULL);
+	g_print (Evolution dir: %s\n, evolution_dir);
+	bonobo_object_release_unref (db, NULL);
+
+	/* Now we know the directory, init the session code */
+	mail_session_init ();
 	
 	shell_component = evolution_shell_component_new (folder_types,
Index: mail/folder-info.c
===
RCS file: /cvs/gnome/evolution/mail/folder-info.c,v
retrieving revision 1.8
diff -U2 -r1.8 folder-info.c
--- mail/folder-info.c	30 Oct 2001 11:10:48 -	1.8
+++ mail/folder-info.c	22 Apr 2002 14:11:30 -
 -71,45 +71,4 
 	CamelFolder *folder;
 	CamelException *ex;
-#if 0
-	char *uri_dup;
-	char *foldername, *start, *end;
-	char *storage, *protocol, *uri;
-	/* Fixme: Do other stuff. Different stuff

Re: [Evolution-hackers] Patch for shell and mail to make thesummary work

2002-04-22 Thread iain

On Mon, 2002-04-22 at 19:38, Ettore Perazzoli wrote:
 On Mon, 2002-04-22 at 14:44, Jeffrey Stedfast wrote:
  On Mon, 2002-04-22 at 15:35, iain wrote:
In the current framework this is not possible -- but the patch moves us
even further away from the objective.  :-)
   
   Well, the shell could change the setting each time...
  
  Correct me if I'm wrong, but I think there'd be a race condition here.
 
 Besides that, it's just plain wrong.  ;-)

I wasn't 100% serious :)
iain
-- 
Everybody thinks of changing humanity and nobody thinks of changing
himself
- Leo Tolstoy.


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers



Re: [Evolution-hackers] Re: CVS bootstrap problem

2002-04-01 Thread iain


 OK, I just installed automake 1.6, this was very interesting. Besides 
 tons of weird warnings, this error still shows up, though automake 
 seems to go on working anyway... I wonder, what automake version are 
 you guys using? Still one of the 1.4x ones?

1.4 generally. I remember having huge problems with 1.5

iain
-- 
Everybody thinks of changing humanity and nobody thinks of changing
himself
- Leo Tolstoy.


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers



[Evolution-hackers] Soup

2002-01-03 Thread iain

So, hmm, soup then.
I've been having many issues with gnome-vfs, and so I thought I'd look
into Libsoup for doing the http stuff. Here's a patch that uses soup,
and as you can see it
a) Simplifies the code considerably
b) Doesn't use threads, so we no longer have like 3 million
evolution-executive-summary threads.
c) Means we'll be able to stop answering questions like why are there 6
evolution-executive-summary processes taking up 60meg?
d) No more random gnome-vfs trying to obtain weather data from localhost
(?)

I've only done it for the summary. The other places gnome-vfs is used to
download files are:
mail-display.c: It uses it synchronously, which I'm not sure how to
change. It'd probably not be hard, but I don't know if it's worth it.
Mailer guys?
e-meeting-model.c: JP says that the url can be things other than http so
soup is not a valid option here.

Do we want to add a soup dependancy?

iain
-- 
but tv says surface irony is funny...don't you watch saturday night
live, man?


Index: ChangeLog
===
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1019
diff -U2 -r1.1019 ChangeLog
--- ChangeLog	2001/12/17 17:59:40	1.1019
+++ ChangeLog	2002/01/03 18:39:28
@@ -1,2 +1,7 @@
+2002-01-03  Iain Holmes  [EMAIL PROTECTED]
+
+	* configure.in: Add a check for libsoup. Define SOUP_CFLAGS and 
+	SOUP_LIBS
+
 2001-12-17  Dan Winship  [EMAIL PROTECTED]
 
Index: configure.in
===
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.437
diff -U2 -r1.437 configure.in
--- configure.in	2001/12/17 17:59:41	1.437
+++ configure.in	2002/01/03 18:39:29
@@ -582,4 +582,5 @@
 EVO_CHECK_LIB(GAL, gal, 0.18.1)
 EVO_CHECK_LIB(GtkHTML, gtkhtml, 1.0)
+EVO_CHECK_LIB(Libsoup, soup, 0.6)
 
 dnl *
@@ -656,4 +657,9 @@
 AC_SUBST(MAILER_CFLAGS)
 AC_SUBST(MAILER_LIBS)
+
+SOUP_CFLAGS=`gnome-config --cflags soup`
+SOUP_LIBS=`gnome-config --libs soup`
+AC_SUBST(SOUP_CFLAGS)
+AC_SUBST(SOUP_LIBS)
 
 dnl **
Index: my-evolution/ChangeLog
===
RCS file: /cvs/gnome/evolution/my-evolution/ChangeLog,v
retrieving revision 1.161
diff -U2 -r1.161 ChangeLog
--- my-evolution/ChangeLog	2001/12/20 06:15:52	1.161
+++ my-evolution/ChangeLog	2002/01/03 18:39:30
@@ -1,2 +1,43 @@
+2002-01-03  Iain Holmes [EMAIL PROTECTED]
+
+	* Makefile.am: Use SOUP_CFLAGS and SOUP_LIBS
+
+	* e-summary-rdf.c: Include soup.h
+	(close_callback): Remove.
+	(message_finished): Generate the cache and other stuff and redraw.
+	(read_callback): Remove.
+	(open_callback): Remove.
+	(e_summary_rdf_update): Replace gnome-vfs with Soup stuff.
+	(e_summary_rdf_count): Replace gnome-vfs with soup.
+	(rdf_free): ditto
+	(e_summary_rdf_set_online): Ditto
+
+	* e-summary-weather.c: Include soup.h
+	(close_callback): Remove.
+	(message_finished): Parse all the downloaded html.
+	(read_callback): Remove.
+	(open_callback): Remove.
+	(e_summary_weather_update): Use soup instead of gnome-vfs
+	(weather_free): Ditto.
+	(e_summary_weather_count): Ditto.
+	(e_summary_weather_add): ditto;
+	(e_summary_weather_set_online): Ditto.
+
+	* e-summary.c (close_callback): Remove.
+	(read_callback): Remove.
+	(open_callback): Remove.
+	(e_read_file_with_length): Read a file.
+	(e_summary_url_requested): Create the images cache. Load the image
+	with e_read_file_with_length instead of gnome-vfs.
+
+	* main.c (main): Remove gnome_vfs_init.
+
+	* weather.h: Replace gnome-vfs stuff.
+
+2002-01-03  Iain Holmes [EMAIL PROTECTED]
+
+	* e-summary-offline-handler.c (impl_prepareForOffline): Create an
+	empty list if the summary == NULL. Fixes bug 18025
+
 2001-12-20  Ettore Perazzoli  [EMAIL PROTECTED]
 
Index: my-evolution/Makefile.am
===
RCS file: /cvs/gnome/evolution/my-evolution/Makefile.am,v
retrieving revision 1.18
diff -U2 -r1.18 Makefile.am
--- my-evolution/Makefile.am	2001/12/17 12:19:54	1.18
+++ my-evolution/Makefile.am	2002/01/03 18:39:30
@@ -14,4 +14,5 @@
 	$(BONOBO_CONF_CFLAGS)	\
 	$(BONOBO_GNOME_CFLAGS)	\
+	$(SOUP_CFLAGS)		\
 	-DEVOLUTION_GLADEDIR=\$(gladedir)\			\
 	-DEVOLUTION_LOCALEDIR=\$(localedir)\		\
@@ -70,7 +71,8 @@
 	$(top_builddir)/libical/src/libical/libical-evolution.la	\
 	$(top_builddir)/libwombat/libwombat.la		\
-	$(BONOBO_VFS_GNOME_LIBS)			\
+	$(BONOBO_GNOME_LIBS)			\
 	$(BONOBO_CONF_LIBS)\
 	$(EXTRA_GNOME_LIBS)\
+	$(SOUP_LIBS)	\
 	-lgal		\
 	$(GTKHTML_LIBS)
Index: my-evolution/e-summary-offline-handler.c
===
RCS file: /cvs/gnome/evolution/my-evolution/e-summary-offline-handler.c,v
retrieving revision 1.7
diff -U2 -r1.7 e-summary-offline-handler.c
--- my-evolution/e-summary-offline-handler.c	2001/12/17 12:19:54	1.7
+++ my-evolution/e-summary-offline-handler.c	2002/01/03

Re: [Evolution-hackers] 1.2 default folders / summary / etc

2001-12-11 Thread iain


 This is exactly what we do in the select names dialog.  If you want to
 try this and need any help with it, let me know.

Execpt as Dan pointed out we can't do this with the Folder lists (or the
weather for that matter) because you can remove a parent but not want
the children.

iain


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers



Re: [Evolution-hackers] 1.2 default folders / summary / etc

2001-12-11 Thread iain

[Trimmed CC list]

 By the way, have you dealt with not being able to select parents in
 weather?  My solution would be to switch to an ECellToggle with 3
 pixmaps.  The two checkboxes and an empty pixmap.  Then you would have
 the model be smart about always returning the empty pixmap on parent
 paths and about properly bumping the underlying value in the set
 function.

Yeah, that was my plan for when I got the underlying idea working
correctly.

iain


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers



Re: [Evolution-hackers] 1.2 default folders / summary / etc

2001-12-09 Thread iain


 I'd rather have an interface where you click on folders and add them
   with an add button.  That's simpler, doesn't require as much hackery,
   and (most importantly) allows you to re-order the folders in the
   summary.
  
  I don't like the add button
  there's many cases in which it doesnt make sense, and if implemented
  with gtkclist, is very hard to do nicely.
 
 This can still be implemented with ETree.  We could even write
 ETreeWithout so that the folders disappear from the tree once they're
 added to the list on the right.  And the list on the right could pretty
 easily be ETable.

The thing is, the only things that people want to be able to sort is the
RDFs. No-one has complained that they can't sort their mail summaries in
a funny order, or the weather. The weather and mail are done in a tree,
which is harder to make reorderable with up and down arrows, but the
RDFs are all in a flat table, which means that it's simple to reorder
them with one table.

iain


___
evolution-hackers maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/evolution-hackers