[empathy: 3/4] Make 'Favourite' only appear when EMPATHY_CONTACT_FEATURE_FAVOURITE set
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 3/4] Make 'Favourite' only appear when EMPATHY_CONTACT_FEATURE_FAVOURITE set
- Date: Thu, 1 Apr 2010 09:01:28 +0000 (UTC)
commit c36eb1e8df169da9691acf730a9cd1996aed5d76
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Thu Apr 1 14:28:37 2010 +1100
Make 'Favourite' only appear when EMPATHY_CONTACT_FEATURE_FAVOURITE set
libempathy-gtk/empathy-contact-menu.c | 11 +++++++----
libempathy-gtk/empathy-contact-menu.h | 3 ++-
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 23522d4..fbcd8dc 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -114,7 +114,8 @@ empathy_contact_menu_new (EmpathyContact *contact,
/* Separator */
if (features & (EMPATHY_CONTACT_FEATURE_EDIT |
- EMPATHY_CONTACT_FEATURE_INFO)) {
+ EMPATHY_CONTACT_FEATURE_INFO |
+ EMPATHY_CONTACT_FEATURE_FAVOURITE)) {
item = gtk_separator_menu_item_new ();
gtk_menu_shell_append (shell, item);
gtk_widget_show (item);
@@ -136,9 +137,11 @@ empathy_contact_menu_new (EmpathyContact *contact,
#if HAVE_FAVOURITE_CONTACTS
/* Favorite checkbox */
- item = empathy_contact_favourite_menu_item_new (contact);
- gtk_menu_shell_append (shell, item);
- gtk_widget_show (item);
+ if (features & EMPATHY_CONTACT_FEATURE_FAVOURITE) {
+ item = empathy_contact_favourite_menu_item_new (contact);
+ gtk_menu_shell_append (shell, item);
+ gtk_widget_show (item);
+ }
#endif
return menu;
diff --git a/libempathy-gtk/empathy-contact-menu.h b/libempathy-gtk/empathy-contact-menu.h
index 25f18e0..4c6d62f 100644
--- a/libempathy-gtk/empathy-contact-menu.h
+++ b/libempathy-gtk/empathy-contact-menu.h
@@ -35,7 +35,8 @@ typedef enum {
EMPATHY_CONTACT_FEATURE_LOG = 1 << 2,
EMPATHY_CONTACT_FEATURE_EDIT = 1 << 3,
EMPATHY_CONTACT_FEATURE_INFO = 1 << 4,
- EMPATHY_CONTACT_FEATURE_ALL = (1 << 5) - 1,
+ EMPATHY_CONTACT_FEATURE_FAVOURITE = 1 << 5,
+ EMPATHY_CONTACT_FEATURE_ALL = (1 << 6) - 1,
} EmpathyContactFeatureFlags;
GtkWidget * empathy_contact_menu_new (EmpathyContact *contact,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]