diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-08-01 11:41:51 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-08-01 11:41:51 +0800 |
commit | 96d24f1297eaa5a6333b9fcfdf35420d273703af (patch) | |
tree | 7ee041b080dc6d9ae5f95bb61236ae0cff203663 /calendar/cal-client/cal-listener.h | |
parent | fe8112f64b3083648d9b0e127aaa0868f25e28fd (diff) | |
download | gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar.gz gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar.bz2 gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar.lz gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar.xz gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.tar.zst gsoc2013-evolution-96d24f1297eaa5a6333b9fcfdf35420d273703af.zip |
The Wombat now keeps track of which categories are present in the objects
2001-07-31 Federico Mena Quintero <federico@ximian.com>
The Wombat now keeps track of which categories are present in the
objects of a calendar. It will notify the clients of changes in
this set. This is to make the category drop-down menus in the
calendar/tasks views be always up to date.
* idl/evolution-calendar.idl (Listener): Added a
notifyCategoriesChanged() method. The Wombat now keeps track of
the categories within a calendar.
* cal-client/cal-listener.[ch]: Switched it to use BonoboXObject.
Also added the notifyCategoriesChanged implementation.
* cal-client/cal-client.[ch]: Added a "categories_changed" signal.
* pcs/cal-backend-file.c: Maintain a list of the live categories.
(update_categories_from_comp): New function to maintain the set of
live categories.
(add_component): Update the set of categories.
(remove_component): Likewise.
(open_cal): Notify about changes in the set of categories.
(create_cal): Likewise.
(cal_backend_file_update_objects): Likewise.
(cal_backend_file_remove_object): Likewise.
(notify_categories_changed): New function to notify the clients
about the current set of categories.
* pcs/cal.c (cal_notify_categories_changed): New function.
svn path=/trunk/; revision=11536
Diffstat (limited to 'calendar/cal-client/cal-listener.h')
-rw-r--r-- | calendar/cal-client/cal-listener.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/calendar/cal-client/cal-listener.h b/calendar/cal-client/cal-listener.h index fa9209cc79..4cbbd8b8c9 100644 --- a/calendar/cal-client/cal-listener.h +++ b/calendar/cal-client/cal-listener.h @@ -1,7 +1,6 @@ /* Evolution calendar listener * - * Copyright (C) 2000 Ximian, Inc. - * Copyright (C) 2000 Ximian, Inc. + * Copyright (C) 2001 Ximian, Inc. * * Author: Federico Mena-Quintero <federico@ximian.com> * @@ -24,7 +23,7 @@ #define CAL_LISTENER_H #include <libgnome/gnome-defs.h> -#include <bonobo/bonobo-object.h> +#include <bonobo/bonobo-xobject.h> #include "evolution-calendar.h" BEGIN_GNOME_DECLS @@ -38,21 +37,20 @@ BEGIN_GNOME_DECLS #define IS_CAL_LISTENER(obj) (GTK_CHECK_TYPE ((obj), CAL_LISTENER_TYPE)) #define IS_CAL_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_LISTENER_TYPE)) -typedef struct _CalListener CalListener; -typedef struct _CalListenerClass CalListenerClass; +typedef struct CalListenerPrivate CalListenerPrivate; -typedef struct _CalListenerPrivate CalListenerPrivate; - -struct _CalListener { - BonoboObject object; +typedef struct { + BonoboXObject xobject; /* Private data */ CalListenerPrivate *priv; -}; +} CalListener; + +typedef struct { + BonoboXObjectClass parent_class; -struct _CalListenerClass { - BonoboObjectClass parent_class; -}; + POA_GNOME_Evolution_Calendar_Listener__epv epv; +} CalListenerClass; /* Notification functions */ typedef void (* CalListenerCalOpenedFn) (CalListener *listener, @@ -67,25 +65,26 @@ typedef void (* CalListenerObjRemovedFn) (CalListener *listener, const GNOME_Evolution_Calendar_CalObjUID uid, gpointer data); +typedef void (* CalListenerCategoriesChangedFn) (CalListener *listener, + const GNOME_Evolution_Calendar_StringSeq *categories, + gpointer data); + GtkType cal_listener_get_type (void); CalListener *cal_listener_construct (CalListener *listener, - GNOME_Evolution_Calendar_Listener corba_listener, CalListenerCalOpenedFn cal_opened_fn, CalListenerObjUpdatedFn obj_updated_fn, CalListenerObjRemovedFn obj_removed_fn, + CalListenerCategoriesChangedFn categories_changed_fn, gpointer fn_data); -GNOME_Evolution_Calendar_Listener cal_listener_corba_object_create (BonoboObject *object); - CalListener *cal_listener_new (CalListenerCalOpenedFn cal_opened_fn, CalListenerObjUpdatedFn obj_updated_fn, CalListenerObjRemovedFn obj_removed_fn, + CalListenerCategoriesChangedFn categories_changed_fn, gpointer fn_data); -POA_GNOME_Evolution_Calendar_Listener__epv *cal_listener_get_epv (void); - END_GNOME_DECLS |