Re: [evolution-patches] Re: the patch for building the sunone-connector



Hi Rodrigo:
Could you export the function notify_categories_changed to the hydrogen?
I find the hydrogen need the same function with evolution.
I can use cal_backend_notify_update to replace some code in the notify_update but I can not delete the "clients" in the notify_categories_changed, so, if hope you can
export the notify_categories_changed in the cal-backed.c to hydrogen.

           I hope you can accept this patch.

Rodrigo Moya wrote:notify_categories_changed

On Thu, 2003-03-27 at 02:31, jack wrote:notify_categories_changed
   In the evolution-1-2.2
   There is a structure in the cal-backend.h
           struct _CalBackend {
                 GtkObject object;
                 GList *clients;
           };
   But in the evolution-1.3 the structure was changed to
           struct _CalBackend {
                 GObject object;
                 CalBackendPrivate *priv;
           };

When we build the hydrogen(cal-backend-wcap.c), a error will take place

     static void
     notify_update (CalBackendWCAP *wcap, const char *uid)
    {
          GList *l;
           ....

/*      for (l = CAL_BACKEND (wcap)->clients; l != NULL; l = l->next) {
*       a error take place ,FIXUS
*/
// so, I need change wcap->clients to wcap->priv->clients, but the priv's structure defined in // the cal-backen.c file , so, it can not be built in the cal-backend-wcap.c
//      I want to move it's definition to the cal-backen.h file.

well, moving a *Private structure to a public header file does not seem
a good idea to me, since by its name it implies it is private, not
public. If you need access to the 'clients' member, there are two
possible solutions:

* add 'clients' to CalBackend structure, as it was before.
* add a 'cal_backend_get_clients' call that just returns the 'clients'
GList in the private structure.

Also, if you just want to send notifications to clients, you can just
use cal_backend_notify_update, which does exactly that.

cheers


--
------------------------------------------ Jack Jia Software Engineer Sun China Engineering & Research Institute jack jia sun com 86-10-82618200 ext.82866 ------------------------------------------

Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1689
diff -u -r1.1689 ChangeLog
--- calendar/ChangeLog	26 Mar 2003 18:27:19 -0000	1.1689
+++ calendar/ChangeLog	28 Mar 2003 07:07:34 -0000
@@ -1,3 +1,7 @@
+2003-03-27  Jack Jia <jack jia sun com>
+
+	* calendar/pcs/cal-backend.c: export the function notify_categories_changed
+
 2003-03-26  Rodrigo Moya <rodrigo ximian com>
 
 	* importers/icalendar-importer.c (gnome_calendar_import_data_fn): use
Index: calendar/pcs/cal-backend.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/pcs/cal-backend.c,v
retrieving revision 1.90
diff -u -r1.90 cal-backend.c
--- calendar/pcs/cal-backend.c	4 Mar 2003 22:02:01 -0000	1.90
+++ calendar/pcs/cal-backend.c	28 Mar 2003 07:07:40 -0000
@@ -72,8 +72,6 @@
 
 static char *get_object (CalBackend *backend, const char *uid);
 
-static void notify_categories_changed (CalBackend *backend);
-
 #define CLASS(backend) (CAL_BACKEND_CLASS (G_OBJECT_GET_CLASS (backend)))
 
 static GObjectClass *parent_class;
@@ -1104,7 +1102,7 @@
 	seq->_buffer[seq->_length++] = CORBA_string_dup (name);
 }
 
-static void
+void
 notify_categories_changed (CalBackend *backend)
 {
 	CalBackendPrivate *priv = backend->priv;
Index: calendar/pcs/cal-backend.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/pcs/cal-backend.h,v
retrieving revision 1.58
diff -u -r1.58 cal-backend.h
--- calendar/pcs/cal-backend.h	4 Mar 2003 22:02:01 -0000	1.58
+++ calendar/pcs/cal-backend.h	28 Mar 2003 07:07:40 -0000
@@ -153,6 +153,7 @@
 };
 
 GType cal_backend_get_type (void);
+void notify_categories_changed (CalBackend *backend);
 
 const char *cal_backend_get_uri (CalBackend *backend);
 


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