]> git.0d.be Git - empathy.git/commitdiff
remove unused EMPATHY_CONTACT_FEATURE_FAVOURITE
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 14 Oct 2011 18:09:23 +0000 (14:09 -0400)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 14 Oct 2011 20:49:48 +0000 (16:49 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=661489

libempathy-gtk/empathy-contact-menu.c
libempathy-gtk/empathy-contact-menu.h

index 030ab8290fd3b25373917a01b9597b0036444639..07def6078ea9d50d4f39f1e12370525893673f0b 100644 (file)
@@ -107,8 +107,7 @@ empathy_contact_menu_new (EmpathyContact             *contact,
 
        /* Separator */
        if (features & (EMPATHY_CONTACT_FEATURE_EDIT |
-                       EMPATHY_CONTACT_FEATURE_INFO |
-                       EMPATHY_CONTACT_FEATURE_FAVOURITE)) {
+                       EMPATHY_CONTACT_FEATURE_INFO)) {
                item = gtk_separator_menu_item_new ();
                gtk_menu_shell_append (shell, item);
                gtk_widget_show (item);
@@ -135,13 +134,6 @@ empathy_contact_menu_new (EmpathyContact             *contact,
                gtk_widget_show (item);
        }
 
-       /* Favorite checkbox */
-       if (features & EMPATHY_CONTACT_FEATURE_FAVOURITE) {
-               item = empathy_contact_favourite_menu_item_new (contact);
-               gtk_menu_shell_append (shell, item);
-               gtk_widget_show (item);
-       }
-
        /* Separator & Block */
        if (features & EMPATHY_CONTACT_FEATURE_BLOCK &&
            (item = empathy_contact_block_menu_item_new (contact)) != NULL) {
@@ -497,46 +489,6 @@ empathy_contact_share_my_desktop_menu_item_new (EmpathyContact *contact)
        return item;
 }
 
-static void
-favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
-       EmpathyContact *contact)
-{
-       EmpathyContactManager *manager;
-       EmpathyContactList *list;
-
-       manager = empathy_contact_manager_dup_singleton ();
-       list = EMPATHY_CONTACT_LIST (manager);
-
-       if (gtk_check_menu_item_get_active (item)) {
-               empathy_contact_list_add_to_favourites (list, contact);
-       } else {
-               empathy_contact_list_remove_from_favourites (list, contact);
-       }
-
-       g_object_unref (manager);
-}
-
-GtkWidget *
-empathy_contact_favourite_menu_item_new (EmpathyContact *contact)
-{
-       GtkWidget *item;
-       EmpathyContactManager *manager;
-
-       item = gtk_check_menu_item_new_with_label (_("Favorite"));
-
-       manager = empathy_contact_manager_dup_singleton ();
-       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
-               empathy_contact_list_is_favourite (EMPATHY_CONTACT_LIST (manager),
-                                                  contact));
-
-       g_signal_connect (item, "toggled",
-                         G_CALLBACK (favourite_menu_item_toggled_cb),
-                         contact);
-
-       g_object_unref (manager);
-       return item;
-}
-
 static void
 contact_info_menu_item_activate_cb (EmpathyContact *contact)
 {
index 35d6479e6cf865634c83a9ae5f2e54b191a77b1d..b99e1410a77e6c65aef01a3d0cc26e9703714877 100644 (file)
@@ -35,7 +35,6 @@ typedef enum {
        EMPATHY_CONTACT_FEATURE_LOG = 1 << 2,
        EMPATHY_CONTACT_FEATURE_EDIT = 1 << 3,
        EMPATHY_CONTACT_FEATURE_INFO = 1 << 4,
-       EMPATHY_CONTACT_FEATURE_FAVOURITE = 1 << 5,
        EMPATHY_CONTACT_FEATURE_FT = 1 << 6,
        EMPATHY_CONTACT_FEATURE_BLOCK = 1 << 7,
        EMPATHY_CONTACT_FEATURE_ALL = (1 << 8) - 1,
@@ -53,7 +52,6 @@ GtkWidget * empathy_contact_edit_menu_item_new (EmpathyContact             *cont
 GtkWidget * empathy_contact_invite_menu_item_new (EmpathyContact *contact);
 GtkWidget * empathy_contact_file_transfer_menu_item_new (EmpathyContact    *contact);
 GtkWidget * empathy_contact_share_my_desktop_menu_item_new (EmpathyContact *contact);
-GtkWidget * empathy_contact_favourite_menu_item_new (EmpathyContact *contact);
 
 G_END_DECLS