From e6e1655f31dca8aceb4c97c966d44bac23eb7200 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 6 Mar 2001 10:00:44 +0000 Subject: Fix a reference counting bug. 2001-03-06 Jon Trowbridge * 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 --- .../gui/component/select-names/e-select-names-manager.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'addressbook/gui/component/select-names/e-select-names-manager.c') 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 #include @@ -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; -- cgit