aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-13 21:01:25 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-13 21:01:25 +0800
commit045c3ffbeab912e8fb0eda1c455004c372ed3eee (patch)
treea2289d4e208e01e1984bd099c79f6a9265d1c934
parent68f8aa3465d51df263bc41489a985dc916c92577 (diff)
downloadgsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar.gz
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar.bz2
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar.lz
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar.xz
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.tar.zst
gsoc2013-evolution-045c3ffbeab912e8fb0eda1c455004c372ed3eee.zip
Get the ESelectNamesModel from the widget's text model instead of storing
2001-04-13 Christopher James Lahey <clahey@ximian.com> * 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
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c20
2 files changed, 21 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 14019f3613..7068f7039e 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-13 Christopher James Lahey <clahey@ximian.com>
+
+ * 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.
+
2001-04-12 Jason Leach <jasonleach@usa.net>
* backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the Voice
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 <config.h>
#endif
+#include "e-select-names-bonobo.h"
+
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-control.h>
@@ -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,