[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 to the 

Re: [Evolution-hackers] ORBit performance tweak

2002-04-22 Thread Ettore Perazzoli

On Mon, 2002-04-22 at 01:22, Not Zed wrote:
 Yeah i did something similar when purifying and quantifying on the
 Solaris box - I thought 20% of total cpu for initialising 64 objects
 was a bit much, I guess the timing/scheduling is different enough on
 solaris to make the algorithm really not work well.

I think on Linux we just use /dev/random, that's why you don't need the
patch.

 I wonder who this should go to ...

Michael Meeks, who now maintains ORBit.  Unfortunately (for us :)) he is
on his honey moon now, so we should probably just try to get the patch
into the Ximian packages for now.

-- 
Ettore

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



Re: [Evolution-hackers] Patch to add interpolation to calendaralarms

2002-04-22 Thread Ettore Perazzoli

On Wed, 2002-04-17 at 11:30, Russell Steinthal wrote:
 Glib2 has g_shell_quote, which seems to be exactly what I'm looking
 for.  Since I assume Evolution isn't going to depend on glib2 for at
 least a few versions, is there any objection to my doing a cut-and-paste
 port to, say, e_shell_quote()?

Yeah that's fine.

-- 
Ettore

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



Re: [Evolution-hackers] ORBit performance tweak

2002-04-22 Thread Mike Gerdts

Starting with Solaris 9, /dev/random and /dev/urandom will be
available.  Many sites may also have installed ANDIrand on older
releases of Solaris.  ANDIrand provides /dev/*random that is compatible
with the Linux implementation.  Perhaps it would be worthwhile to try
out /dev/urandom on Solaris, then use the slow code if reading from
/dev/urandom fails.  I would suggest a non-blocking read in case someone
has mistakenly put a blocking entropy (such as the one with SUNWski)
daemon on /dev/urandom.

ANDIrand is available from http://www.cosy.sbg.ac.at/~andi/.  It is
dual-licensed, with one of the licenses being the GPL.

Mike


On Mon, 2002-04-22 at 11:28, Ettore Perazzoli wrote:
 On Mon, 2002-04-22 at 01:22, Not Zed wrote:
  Yeah i did something similar when purifying and quantifying on the
  Solaris box - I thought 20% of total cpu for initialising 64 objects
  was a bit much, I guess the timing/scheduling is different enough on
  solaris to make the algorithm really not work well.
 
 I think on Linux we just use /dev/random, that's why you don't need the
 patch.
 
  I wonder who this should go to ...
 
 Michael Meeks, who now maintains ORBit.  Unfortunately (for us :)) he is
 on his honey moon now, so we should probably just try to get the patch
 into the Ximian packages for now.
 
 -- 
 Ettore
 
 ___
 evolution-hackers maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/evolution-hackers
-- 
Mike Gerdts  (919) 850-5284
Unix Systems Administrator   [EMAIL PROTECTED]


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



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

2002-04-22 Thread Jeffrey Stedfast

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.

Jeff

 
  So my question is: why do we need to have mail_session_init() called
  before owner_set()?  Can we still make the summary work without making
  this a requirement?
 
 I've no idea, but mail_tool_uri_to_folder was failing because the
 session wasn't initialised, if the summary got started before the
 mailer.
 
 iain
 -- 
 No offence to them, but forty years from now,
  who's going to remember the Chemical Brothers? - Steve Vai
 
 
 ___
 evolution-hackers maillist  -  [EMAIL PROTECTED]
 http://lists.ximian.com/mailman/listinfo/evolution-hackers
 
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
[EMAIL PROTECTED]  - www.ximian.com


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



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