From b152949a3102c150af0c99fb84e8fecf2c69191f Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 9 Oct 2007 18:07:57 +0000 Subject: More flexible API for EmpathyContactWidget, we now have flags to set 2007-10-09 Xavier Claessens * libempathy-gtk/empathy-main-window.c: * libempathy-gtk/empathy-contact-dialogs.c: * libempathy-gtk/empathy-contact-list-view.c: * libempathy-gtk/empathy-contact-dialogs.h: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-contact-widget.h: * libempathy-gtk/empathy-chat-window.c: * megaphone/src/megaphone-applet.c: More flexible API for EmpathyContactWidget, we now have flags to set editable each fields. Implement personal information menu item in main window. svn path=/trunk/; revision=365 --- libempathy-gtk/empathy-contact-widget.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'libempathy-gtk/empathy-contact-widget.h') diff --git a/libempathy-gtk/empathy-contact-widget.h b/libempathy-gtk/empathy-contact-widget.h index 71fc06acb..3a2aed996 100644 --- a/libempathy-gtk/empathy-contact-widget.h +++ b/libempathy-gtk/empathy-contact-widget.h @@ -30,16 +30,17 @@ G_BEGIN_DECLS typedef enum { - CONTACT_WIDGET_TYPE_SHOW, /* used to show contact information */ - CONTACT_WIDGET_TYPE_EDIT, /* used to edit contact information */ - CONTACT_WIDGET_TYPE_ADD, /* used to add a new contact */ - CONTACT_WIDGET_TYPE_SUBSCRIPTION, /* used to accepte/reject a new contact */ - CONTACT_WIDGET_TYPE_EDIT_USER /* used to edit our own information */ -} EmpathyContactWidgetType; + EMPATHY_CONTACT_WIDGET_EDIT_ALIAS = 1 << 0, + EMPATHY_CONTACT_WIDGET_EDIT_AVATAR = 1 << 1, + EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT = 1 << 2, + EMPATHY_CONTACT_WIDGET_EDIT_ID = 1 << 3, + EMPATHY_CONTACT_WIDGET_EDIT_GROUPS = 1 << 4, +} EmpathyContactWidgetFlags; -GtkWidget * empathy_contact_widget_new (EmpathyContact *contact, - EmpathyContactWidgetType type); -EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget); +GtkWidget * empathy_contact_widget_new (EmpathyContact *contact, + EmpathyContactWidgetFlags flags); +EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget); G_END_DECLS + #endif /* __EMPATHY_CONTACT_WIDGET_H__ */ -- cgit v1.2.3