diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-07-08 20:01:12 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-07-08 20:01:12 +0800 |
commit | f1b8cb078f610e99084a62a6dbcdd63c6e4967b9 (patch) | |
tree | bbfa17bfe463d81ff6c1af7fefedaa9f4c1e16f0 /addressbook/gui/component | |
parent | b87e03a1bab02a5bafb73ae9b38fcd4cce46c142 (diff) | |
download | gsoc2013-evolution-f1b8cb078f610e99084a62a6dbcdd63c6e4967b9.tar.gz gsoc2013-evolution-f1b8cb078f610e99084a62a6dbcdd63c6e4967b9.tar.zst gsoc2013-evolution-f1b8cb078f610e99084a62a6dbcdd63c6e4967b9.zip |
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
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-bonobo.c | 26 |
1 files changed, 24 insertions, 2 deletions
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); |