From f1b8cb078f610e99084a62a6dbcdd63c6e4967b9 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sat, 8 Jul 2000 12:01:12 +0000 Subject: Added code for initializing the values of the fields in the message composer. Unfortunately the ESelectNames crashes when you do this... svn path=/trunk/; revision=3975 --- .../component/select-names/e-select-names-bonobo.c | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c index bacba26df3..a7b8f5b11f 100644 --- a/addressbook/gui/component/select-names/e-select-names-bonobo.c +++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c @@ -74,6 +74,27 @@ entry_get_property_fn (BonoboPropertyBag *bag, } } +static void +entry_set_property_fn (BonoboPropertyBag *bag, + const BonoboArg *arg, + guint arg_id, + gpointer user_data) +{ + GtkWidget *widget; + const char *text; + + widget = GTK_WIDGET (user_data); + + switch (arg_id) { + case ENTRY_PROPERTY_ID_TEXT: + text = BONOBO_ARG_GET_STRING (arg); + gtk_object_set (GTK_OBJECT (widget), "text", text, NULL); + break; + default: + break; + } +} + /* CORBA interface implementation. */ @@ -148,9 +169,10 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant, control = bonobo_control_new (entry_widget); - property_bag = bonobo_property_bag_new (entry_get_property_fn, NULL, entry_widget); + property_bag = bonobo_property_bag_new (entry_get_property_fn, entry_set_property_fn, entry_widget); bonobo_property_bag_add (property_bag, "text", ENTRY_PROPERTY_ID_TEXT, - BONOBO_ARG_STRING, NULL, NULL, BONOBO_PROPERTY_READABLE); + BONOBO_ARG_STRING, NULL, NULL, + BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE); bonobo_control_set_property_bag (control, property_bag); -- cgit v1.2.3