diff options
author | Miguel de Icaza <miguel@ximian.com> | 2001-03-17 10:29:29 +0800 |
---|---|---|
committer | Miguel de Icaza <miguel@src.gnome.org> | 2001-03-17 10:29:29 +0800 |
commit | dfb396395e6ee5e847a82f8ad1d78fabb2628f9f (patch) | |
tree | dfcab77a9d5e263aae04394c017e6b7cf69d782c /calendar/gui/control-factory.c | |
parent | 6b65efddc7830da7375ee3a860401f01d5256ec6 (diff) | |
download | gsoc2013-evolution-dfb396395e6ee5e847a82f8ad1d78fabb2628f9f.tar.gz gsoc2013-evolution-dfb396395e6ee5e847a82f8ad1d78fabb2628f9f.tar.zst gsoc2013-evolution-dfb396395e6ee5e847a82f8ad1d78fabb2628f9f.zip |
New function: inits the BonoboPersistFile server.
2001-03-07 Miguel de Icaza <miguel@ximian.com>
* gui/control-factory.c (calendar_persist_init): New function:
inits the BonoboPersistFile server.
* gui/GNOME_Evolution_Calendar.oaf.in: Added BonoboPropertyBag to
the list of supported interfaces that were supported but not
reported. Add the new PersistFile.
Add text/calendar mime type attribute.
svn path=/trunk/; revision=8771
Diffstat (limited to 'calendar/gui/control-factory.c')
-rw-r--r-- | calendar/gui/control-factory.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index 678870da91..c00e10d35a 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -158,6 +158,33 @@ control_factory_init (void) g_error ("I could not register a Calendar control factory."); } +static int +load_calendar (BonoboPersistFile *pf, const CORBA_char *filename, CORBA_Environment *ev, void *closure) +{ + GnomeCalendar *gcal = closure; + + calendar_set_uri (gcal, filename); + + return 0; +} + +static int +save_calendar (BonoboPersistFile *pf, const CORBA_char *filename, CORBA_Environment *ev, void *closure) +{ + /* Do not know how to save stuff yet */ + return -1; +} + +void +calendar_persist_init (GnomeCalendar *gcal, BonoboControl *control) +{ + BonoboPersistFile *f; + + f = bonobo_persist_file_new (load_calendar, save_calendar, gcal); + bonobo_object_add_interface ( + BONOBO_OBJECT (control), + BONOBO_OBJECT (f)); +} BonoboControl * control_factory_new_control (void) @@ -178,7 +205,8 @@ control_factory_new_control (void) } calendar_properties_init (gcal, control); - + calendar_persist_init (gcal, control); + gtk_signal_connect (GTK_OBJECT (control), "activate", GTK_SIGNAL_FUNC (control_activate_cb), gcal); |