diff options
author | Chris Toshok <toshok@helixcode.com> | 2001-01-10 07:08:08 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-01-10 07:08:08 +0800 |
commit | 289cbd41bc8c3bdfe417f3c78e5061bbed07dcfb (patch) | |
tree | e08629bc6de08c1bb1411e65963c757338aafd0d /addressbook/gui/widgets/e-minicard-view.c | |
parent | 70fe2fd985176bdcf7c8fcc433f0b640f2b52432 (diff) | |
download | gsoc2013-evolution-289cbd41bc8c3bdfe417f3c78e5061bbed07dcfb.tar.gz gsoc2013-evolution-289cbd41bc8c3bdfe417f3c78e5061bbed07dcfb.tar.zst gsoc2013-evolution-289cbd41bc8c3bdfe417f3c78e5061bbed07dcfb.zip |
register our status_message signal. (status_message): new function, emit
2001-01-09 Chris Toshok <toshok@helixcode.com>
* gui/widgets/e-minicard-view-widget.c
(e_minicard_view_widget_class_init): register our status_message
signal.
(status_message): new function, emit our status_message signal.
(e_minicard_view_widget_realize): connect to the EMinicardView's
status_message signal.
* gui/widgets/e-minicard-view-widget.h: add status_message signal.
* gui/widgets/e-minicard-view.c (e_minicard_view_class_init):
register our status_message signal.
(e_minicard_view_init): init status_message_id.
(status_message): new function, emit our status_message signal.
(book_view_loaded): connect to the EBookView's status_message
signal.
(disconnect_signals): disconnect status_message_id.
* gui/widgets/e-minicard-view.h: add status_mesage_id, and
status_message signal.
* gui/widgets/e-addressbook-model.c (status_message): new
function, emit our status_message.
(e_addressbook_model_class_init): register our "status_message"
signal.
(book_view_loaded): connect to the EBookView's status_message
signal, so we can chain it to our parent.
(e_addressbook_model_init): init status_message_id.
(remove_book_view): disconnect status_message_id.
* gui/widgets/e-addressbook-model.h: add status_message_id, and
status_message signal.
* backend/pas/pas-backend-ldap.c change the objectclass we create
objects with to "inetOrgPerson" as it encompasses the fields we
use.
(create_dn_from_ecard): remove the mail/org handling from
here. we just prepend cn=$cn onto the base dn.
(create_card_handler): remove the NULL that build_mods_from_ecards
adds at the end, and insert our objectClass.
(modify_card_handler): call search_for_dn to get the ECardSimple
of the old card, since it might (and does in the current code)
doing a brute force search.
(search_for_dn): new function, to search for an entry by its dn.
right now we brute force (objectclass=*) under the base dn and
compare dn's. going to add a first pass that explodes the dn and
searches that way, using (objectclass=*) as a last resort. also,
here's where we'd put the extensibleMatch code if we want to go
that route.
* backend/ebook/e-card.c (e_card_set_arg): if we're setting the
full name regenerate ecard->name.
svn path=/trunk/; revision=7345
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view.c')
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 7169e41542..d3f08b71ab 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -44,6 +44,13 @@ enum { ARG_QUERY }; +enum { + STATUS_MESSAGE, + LAST_SIGNAL +}; + +static guint e_minicard_view_signals [LAST_SIGNAL] = {0, }; + GtkType e_minicard_view_get_type (void) { @@ -84,6 +91,16 @@ e_minicard_view_class_init (EMinicardViewClass *klass) GTK_ARG_READWRITE, ARG_BOOK); gtk_object_add_arg_type ("EMinicardView::query", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_QUERY); + + e_minicard_view_signals [STATUS_MESSAGE] = + gtk_signal_new ("status_message", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EMinicardViewClass, status_message), + gtk_marshal_NONE__POINTER, + GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + + gtk_object_class_add_signals (object_class, e_minicard_view_signals, LAST_SIGNAL); object_class->set_arg = e_minicard_view_set_arg; object_class->get_arg = e_minicard_view_get_arg; @@ -104,6 +121,7 @@ e_minicard_view_init (EMinicardView *view) view->create_card_id = 0; view->remove_card_id = 0; view->modify_card_id = 0; + view->status_message_id = 0; view->canvas_destroy_id = 0; view->first_get_view = TRUE; @@ -145,6 +163,16 @@ modify_card(EBookView *book_view, const GList *cards, EMinicardView *view) } static void +status_message (EBookView *book_view, + char* status, + EMinicardView *view) +{ + gtk_signal_emit (GTK_OBJECT (view), + e_minicard_view_signals [STATUS_MESSAGE], + status); +} + +static void remove_card(EBookView *book_view, const char *id, EMinicardView *view) { e_reflow_sorted_remove_item(E_REFLOW_SORTED(view), id); @@ -181,6 +209,10 @@ book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointe "card_changed", GTK_SIGNAL_FUNC(modify_card), view); + view->status_message_id = gtk_signal_connect(GTK_OBJECT(view->book_view), + "status_message", + GTK_SIGNAL_FUNC(status_message), + view); g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_unref, NULL); g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_destroy, NULL); @@ -373,10 +405,14 @@ disconnect_signals(EMinicardView *view) if (view->book_view && view->modify_card_id) gtk_signal_disconnect(GTK_OBJECT (view->book_view), view->modify_card_id); + if (view->book_view && view->status_message_id) + gtk_signal_disconnect(GTK_OBJECT (view->book_view), + view->status_message_id); view->create_card_id = 0; view->remove_card_id = 0; view->modify_card_id = 0; + view->status_message_id = 0; } static void |