aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names-manager.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-03-06 18:00:44 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-03-06 18:00:44 +0800
commite6e1655f31dca8aceb4c97c966d44bac23eb7200 (patch)
treee3334cea315a90e669d0d16144ede3ba67cf9ab4 /addressbook/gui/component/select-names/e-select-names-manager.c
parent10d0e730eccccf34fc53dc8c1d6145fca1f52f57 (diff)
downloadgsoc2013-evolution-e6e1655f31dca8aceb4c97c966d44bac23eb7200.tar.gz
gsoc2013-evolution-e6e1655f31dca8aceb4c97c966d44bac23eb7200.tar.zst
gsoc2013-evolution-e6e1655f31dca8aceb4c97c966d44bac23eb7200.zip
Fix a reference counting bug.
2001-03-06 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-model.c (e_select_names_model_replace): Fix a reference counting bug. * gui/component/select-names/e-select-names-manager.c (popup_cb): A callback for creating the appropriate popup by calling e_select_names_popup. (e_select_names_manager_create_entry): Connect popup_cb to the entry's popup signal * gui/component/select-names/e-select-names-popup.c: Added. Code for popup right-click menus for recipient entries. Still a bit incomplete. * backend/ebook/e-destination.c (e_destination_get_email_num): Added. * contact-editor/e-contact-quick-add.c: Added. Some code and a dialog for very quickly adding entries to the address book. Still not fully working. svn path=/trunk/; revision=8567
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-manager.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c
index e1c8d80276..e1718cf3a7 100644
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ b/addressbook/gui/component/select-names/e-select-names-manager.c
@@ -17,6 +17,7 @@
#include "e-select-names-text-model.h"
#include "e-select-names.h"
#include "e-select-names-completion.h"
+#include "e-select-names-popup.h"
#include <gal/e-text/e-entry.h>
#include <addressbook/backend/ebook/e-destination.h>
@@ -289,6 +290,12 @@ completion_handler (EEntry *entry, const gchar *text, gpointer user_data)
e_entry_set_position (entry, start_pos+len);
}
+static void
+popup_cb (EEntry *entry, GdkEventButton *ev, gint pos, ESelectNamesModel *model)
+{
+ e_select_names_popup (model, ev, pos);
+}
+
GtkWidget *
e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *id)
{
@@ -304,7 +311,12 @@ e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *i
eentry = E_ENTRY (e_entry_new ());
gtk_object_set_data (GTK_OBJECT (eentry), "select_names_model", section->model);
-
+
+ gtk_signal_connect (GTK_OBJECT (eentry),
+ "popup",
+ GTK_SIGNAL_FUNC (popup_cb),
+ section->model);
+
entry = g_new (ESelectNamesManagerEntry, 1);
entry->entry = eentry;
entry->id = (char *)id;