Changeset 1794


Ignore:
Timestamp:
04/18/07 16:29:38 (6 years ago)
Author:
thomas
Message:
  • src/contacts-callbacks-ebook.c: (contacts_changed_cb):
  • src/contacts-contact-pane.c: (field_changed),

(contacts_contact_pane_class_init):

  • src/contacts-contact-pane.h:
  • src/contacts-omoko.c: (fullname_changed_cb),

(create_main_window):
Add a fullname-changed signal to the contact pane widget.

Location:
trunk/src/target/OM-2007/applications/openmoko-contacts
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007/applications/openmoko-contacts/ChangeLog

    r1787 r1794  
     12007-04-18  Thomas Wood  <thomas@openedhand.com> 
     2 
     3        * src/contacts-callbacks-ebook.c: (contacts_changed_cb): 
     4        * src/contacts-contact-pane.c: (field_changed), 
     5        (contacts_contact_pane_class_init): 
     6        * src/contacts-contact-pane.h: 
     7        * src/contacts-omoko.c: (fullname_changed_cb), 
     8        (create_main_window): 
     9        Add a fullname-changed signal to the contact pane widget. 
     10 
    1112007-04-17  Thomas Wood  <thomas@openedhand.com> 
    212 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-callbacks-ebook.c

    r1740 r1794  
    153153 
    154154                /* If contact is currently selected, update display */ 
     155                /* 
    155156                if (current_contact) { 
    156157                        if (strcmp (e_contact_get_const 
     
    159160                                        (current_contact, E_CONTACT_UID)) == 0) 
    160161                                contacts_display_summary (contact, data); 
    161                 } 
     162                }*/ 
    162163 
    163164                /* Check for groups and add them to group list */ 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.c

    r1787 r1794  
    2424#include "contacts-contact-pane.h" 
    2525#include "contacts-utils.h" 
     26#include "contacts-callbacks-ebook.h" 
    2627 
    2728G_DEFINE_TYPE (ContactsContactPane, contacts_contact_pane, GTK_TYPE_VBOX); 
     
    4041  GtkSizeGroup *size_group; /* used to sizing the labels */ 
    4142}; 
     43 
     44enum { 
     45  FULLNAME_CHANGED, 
     46  LAST_SIGNAL 
     47}; 
     48 
     49static guint contacts_contact_pane_signals [LAST_SIGNAL]; 
    4250 
    4351typedef struct { 
     
    204212  } 
    205213  g_strfreev (values); 
     214 
     215  if (info->vcard_field == EVC_FN) 
     216  { 
     217    /* update treeview */ 
     218    g_signal_emit (pane, contacts_contact_pane_signals[FULLNAME_CHANGED], 0, pane->priv->contact); 
     219  } 
    206220 
    207221  pane->priv->dirty = TRUE; 
     
    809823  entry_quark = g_quark_from_static_string("contact-pane-entry"); 
    810824 
     825 
     826    contacts_contact_pane_signals[FULLNAME_CHANGED] = g_signal_new (("fullname-changed"), 
     827      G_OBJECT_CLASS_TYPE (klass), 
     828      G_SIGNAL_RUN_LAST, 
     829      G_STRUCT_OFFSET (ContactsContactPaneClass, fullname_changed), 
     830      NULL, NULL, 
     831      g_cclosure_marshal_VOID__OBJECT, 
     832      G_TYPE_NONE, 1, 
     833      E_TYPE_CONTACT); 
     834 
    811835} 
    812836 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-contact-pane.h

    r846 r1794  
    5858typedef struct { 
    5959  GtkVBoxClass parent_class; 
     60  void (* fullname_changed) (ContactsContactPane *self, EContact *contact); 
    6061} ContactsContactPaneClass; 
    6162 
  • trunk/src/target/OM-2007/applications/openmoko-contacts/src/contacts-omoko.c

    r1783 r1794  
    2626#include "contacts-omoko.h" 
    2727#include "contacts-groups-editor.h" 
     28#include "contacts-callbacks-ebook.h" 
    2829 
    2930 
     
    3435static GtkMenu *filter_menu; 
    3536 
     37static void 
     38fullname_changed_cb (ContactsContactPane *pane, EContact *contact, ContactsData *data) 
     39{ 
     40        GList *l = g_list_prepend (NULL, contact); 
     41        contacts_changed_cb (data->book_view, l, data); 
     42        g_list_free (l); 
     43} 
    3644 
    3745GtkWidget * 
     
    204212        /*** view mode ****/ 
    205213        ui->contact_pane = contacts_contact_pane_new(); 
     214 
     215        g_signal_connect (ui->contact_pane, "fullname-changed", (GCallback) fullname_changed_cb, contacts_data); 
     216 
    206217        contacts_contact_pane_set_editable (CONTACTS_CONTACT_PANE (ui->contact_pane), FALSE); 
    207218        /* The book view is set later when we get it back */ 
Note: See TracChangeset for help on using the changeset viewer.