aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@ximian.com>2001-03-17 10:29:29 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2001-03-17 10:29:29 +0800
commitdfb396395e6ee5e847a82f8ad1d78fabb2628f9f (patch)
treedfcab77a9d5e263aae04394c017e6b7cf69d782c /calendar
parent6b65efddc7830da7375ee3a860401f01d5256ec6 (diff)
downloadgsoc2013-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')
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.oaf.in6
-rw-r--r--calendar/gui/control-factory.c30
3 files changed, 46 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e1ef3c8da2..3afb72d381 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
2001-03-15 Dan Winship <danw@ximian.com>
* gui/e-week-view.c (e_week_view_start_editing_event):
diff --git a/calendar/gui/GNOME_Evolution_Calendar.oaf.in b/calendar/gui/GNOME_Evolution_Calendar.oaf.in
index 0f74743a38..70924677f7 100644
--- a/calendar/gui/GNOME_Evolution_Calendar.oaf.in
+++ b/calendar/gui/GNOME_Evolution_Calendar.oaf.in
@@ -105,6 +105,12 @@
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:BonoboControl/calendar-control:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Bonobo/PersistFile:1.0"/>
+ <item value="IDL:Bonobo/PropertyBag:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
+ <item value="text/calendar"/>
</oaf_attribute>
<oaf_attribute name="description" type="string"
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);