[evolution-patches] about calendar factory!



JP & other calendar guys:
When I used the evolution (with hydrogen), I was confused by the alarm-notify. when I exit the evolution, the hydrogen exit too, but the evolution-alarm-notify did not exit.
wehn i run evolution and hydrogen again, all the alarm i set can not work.

        I checked the src code, i found in the get_factories (cal-client.c)

static GList *
get_factories (void)
{
       static GList *factories = NULL;
// The factories was a *static* variable, and when i run evolution(and hydrogen), the factory keeped the value that the previous hydrogen (now had exit) left. // so, when i wanted to new a calendar client, it will register in the factory that had been destroyed, so, all the alarm related with hydrogen could not work // i hoped the evolution could free the old factory and set up a new factory every time.

       GNOME_Evolution_Calendar_CalFactory factory;
       Bonobo_ServerInfoList *servers;
       CORBA_Environment ev;
       int i;

//        if (factories != NULL)
//                return factories;
        if (factories != NULL)
        {
                  g_list_free (factories);
                  factories = NULL;
         }

// I hope you can accept the modification. i believe this modification can not affect the evolution-wombat.
//     or give us some suggestion.

        ........

If you can commit this patch, I will modified some code in hydrogen, remove calendar hydrogen created when hydrogen exit. all is ok! If you can not accept, we must kill the evolution-alarm-notify before we run evolution(with hydrogen);


Thanks
jack
Index: calendar/cal-client/cal-client.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/cal-client/cal-client.c,v
retrieving revision 1.118
diff -u -r1.118 cal-client.c
--- calendar/cal-client/cal-client.c	4 Jun 2003 15:07:15 -0000	1.118
+++ calendar/cal-client/cal-client.c	19 Jun 2003 03:50:41 -0000
@@ -735,8 +735,10 @@
 	CORBA_Environment ev;
 	int i;
 
-	if (factories != NULL)
-		return factories;
+	if (factories != NULL) {
+		g_list_free (factories);
+		factories = NULL;
+	}
 
 	CORBA_exception_init (&ev);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]