aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-03-02 10:21:55 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-03-02 10:21:55 +0800
commitba0d7abd390268b2e370f179018885a6067a67f1 (patch)
tree6f62c38a8b9d22e950393b3510860486743924ef
parent50ef074887b43f43dad3edb120d9abf30092c681 (diff)
downloadgsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar.gz
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar.bz2
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar.lz
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar.xz
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.tar.zst
gsoc2013-evolution-ba0d7abd390268b2e370f179018885a6067a67f1.zip
Oops, we do need to be able to write to "text" after all (for things like
2001-03-01 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-bonobo.c (entry_set_property_fn): Oops, we do need to be able to write to "text" after all (for things like Reply-to: to work properly). Fixed. (impl_SelectNames_get_entry_for_section): Made "text" a writeable property again. * gui/component/select-names/e-select-names-text-model.c (e_select_names_text_model_insert_length): Increment pos so that we don't reverse strings when length > 1 (a particularly amusing bug). * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_destroy): Check for NULL before calling gtk_object_unref (GTK_OBJECT (---)), to get rid of annoying error messages. svn path=/trunk/; revision=8512
-rw-r--r--addressbook/ChangeLog19
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c7
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c9
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.c3
4 files changed, 33 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 15dccabefa..4df49f96e6 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,4 +1,23 @@
2001-03-01 Jon Trowbridge <trow@ximian.com>
+
+ * gui/component/select-names/e-select-names-bonobo.c
+ (entry_set_property_fn): Oops, we do need to be able to write to
+ "text" after all (for things like Reply-to: to work properly).
+ Fixed.
+ (impl_SelectNames_get_entry_for_section): Made "text" a writeable
+ property again.
+
+ * gui/component/select-names/e-select-names-text-model.c
+ (e_select_names_text_model_insert_length): Increment pos so that
+ we don't reverse strings when length > 1 (a particularly amusing
+ bug).
+
+ * gui/component/select-names/e-select-names-completion.c
+ (e_select_names_completion_destroy): Check for NULL before calling
+ gtk_object_unref (GTK_OBJECT (---)), to get rid of annoying error
+ messages.
+
+2001-03-01 Jon Trowbridge <trow@ximian.com>
* gui/component/select-names/e-select-names-completion.c: I am an
idiot.
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 1d34c4198f..f21e33361f 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -33,6 +33,7 @@
#include "Evolution-Addressbook-SelectNames.h"
#include <gal/util/e-util.h>
+#include <gal/e-text/e-entry.h>
#include "e-select-names-manager.h"
#include "e-select-names-bonobo.h"
@@ -92,6 +93,10 @@ entry_set_property_fn (BonoboPropertyBag *bag,
switch (arg_id) {
+ case ENTRY_PROPERTY_ID_TEXT:
+ e_entry_set_text (E_ENTRY (widget), BONOBO_ARG_GET_STRING (arg));
+ break;
+
case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
gtk_object_set_data (GTK_OBJECT (widget), "entry_property_id_changed", GUINT_TO_POINTER (1));
break;
@@ -190,7 +195,7 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
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_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
bonobo_property_bag_add (property_bag, "entry_changed", ENTRY_PROPERTY_ID_ENTRY_CHANGED,
BONOBO_ARG_BOOLEAN, NULL, NULL,
BONOBO_PROPERTY_WRITEABLE);
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c
index e388851ded..5f87144510 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -529,10 +529,13 @@ e_select_names_completion_destroy (GtkObject *object)
{
ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (object);
- gtk_object_unref (GTK_OBJECT (comp->priv->model));
- gtk_object_unref (GTK_OBJECT (comp->priv->book));
+ if (comp->priv->model)
+ gtk_object_unref (GTK_OBJECT (comp->priv->model));
- if (GTK_OBJECT (comp->priv->book_view)) {
+ if (comp->priv->book)
+ gtk_object_unref (GTK_OBJECT (comp->priv->book));
+
+ if (comp->priv->book_view) {
gtk_signal_disconnect (GTK_OBJECT (comp->priv->book_view), comp->priv->card_added_id);
gtk_signal_disconnect (GTK_OBJECT (comp->priv->book_view), comp->priv->seq_complete_id);
gtk_object_unref (GTK_OBJECT (comp->priv->book_view));
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c
index 62e1676d20..71bb4b3533 100644
--- a/addressbook/gui/component/select-names/e-select-names-text-model.c
+++ b/addressbook/gui/component/select-names/e-select-names-text-model.c
@@ -408,11 +408,12 @@ e_select_names_text_model_insert_length (ETextModel *model, gint pos, const gcha
repos.pos = pos;
repos.len = this_length;
e_text_model_reposition (model, e_repos_insert_shift, &repos);
+
+ pos += this_length;
}
g_free (new_str);
}
-
}
}