static void peacock_file_control_load_ui (BonoboControl *control, PeacockFileControlData *cd) { BonoboUIComponent *uic; bonobo_control_set_automerge (cd->control, TRUE); uic = bonobo_control_get_ui_component (cd->control); bonobo_ui_component_add_verb_list_with_data (uic, peacock_file_control_ui_verbs, (gpointer) cd); g_signal_connect (control, "activate", G_CALLBACK (peacock_file_control_activate_cb), NULL); return; }
BonoboControl * itip_bonobo_control_new (void) { BonoboControl *control; BonoboPropertyBag *prop_bag; BonoboPersistStream *stream; GtkWidget *itip; itip = e_itip_control_new (); gtk_widget_show (itip); control = bonobo_control_new (itip); /* create a property bag */ prop_bag = bonobo_property_bag_new (get_prop, set_prop, itip); bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL, "from_address", 0 ); bonobo_property_bag_add (prop_bag, "view_only", VIEW_ONLY_ARG_ID, BONOBO_ARG_INT, NULL, "view_only", 0 ); bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (prop_bag)), NULL); bonobo_object_unref (BONOBO_OBJECT (prop_bag)); bonobo_control_set_automerge (control, TRUE); stream = bonobo_persist_stream_new (pstream_load, pstream_save, pstream_get_content_types, "OAFIID:GNOME_Evolution_Calendar_iTip_Control:" BASE_VERSION, itip); if (stream == NULL) { bonobo_object_unref (BONOBO_OBJECT (control)); return NULL; } bonobo_object_add_interface (BONOBO_OBJECT (control), BONOBO_OBJECT (stream)); return control; }