From 045c3ffbeab912e8fb0eda1c455004c372ed3eee Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 13 Apr 2001 13:01:25 +0000 Subject: Get the ESelectNamesModel from the widget's text model instead of storing 2001-04-13 Christopher James Lahey * gui/component/select-names/e-select-names-bonobo.c (entry_get_property_fn): Get the ESelectNamesModel from the widget's text model instead of storing it as a gtk_object_set_data since it may change. svn path=/trunk/; revision=9299 --- .../component/select-names/e-select-names-bonobo.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 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 013ab23538..98c235c067 100644 --- a/addressbook/gui/component/select-names/e-select-names-bonobo.c +++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c @@ -25,6 +25,8 @@ #include #endif +#include "e-select-names-bonobo.h" + #include #include @@ -34,7 +36,9 @@ #include "Evolution-Addressbook-SelectNames.h" #include "e-select-names-manager.h" -#include "e-select-names-bonobo.h" + +#include "e-select-names-model.h" +#include "e-select-names-text-model.h" @@ -69,7 +73,15 @@ entry_get_property_fn (BonoboPropertyBag *bag, switch (arg_id) { case ENTRY_PROPERTY_ID_TEXT: { - ESelectNamesModel *model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "bonobo_select_names_model")); + ESelectNamesTextModel *text_model; + ESelectNamesModel *model; + + gtk_object_get(GTK_OBJECT(w), + "model", &text_model, + NULL); + gtk_object_get(GTK_OBJECT(text_model), + "source", &model, + NULL); text = e_select_names_model_get_address_text (model); BONOBO_ARG_SET_STRING (arg, text); } @@ -177,10 +189,6 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant, entry_widget = e_select_names_manager_create_entry (priv->manager, section_id); gtk_widget_show (entry_widget); - gtk_object_set_data (GTK_OBJECT (entry_widget), - "bonobo_select_names_model", - e_select_names_manager_get_source (priv->manager, section_id)); - if (entry_widget == NULL) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, -- cgit