aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-12 19:57:03 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-14 20:26:54 +0800
commit66dbf2d87306d9ee4c5325c1c96628a70d8eac1a (patch)
tree37bda4a7b992f473739b2f19bf3505aa1f52948a /libempathy-gtk/empathy-contact-widget.c
parentc7524e25332d8f87115255fb8611b124e4aea4f6 (diff)
downloadgsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar.gz
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar.bz2
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar.lz
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar.xz
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.tar.zst
gsoc2013-empathy-66dbf2d87306d9ee4c5325c1c96628a70d8eac1a.zip
remove EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE
It's not used any more and this code was the last one using the contact manager. https://bugzilla.gnome.org/show_bug.cgi?id=660547
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 476fb6217..3a08b6f26 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -37,7 +37,6 @@
#include <telepathy-glib/interfaces.h>
#include <libempathy/empathy-tp-contact-factory.h>
-#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-location.h>
#include <libempathy/empathy-time.h>
@@ -81,7 +80,6 @@
typedef struct
{
- EmpathyContactManager *manager;
EmpathyContact *contact;
EmpathyContactWidgetFlags flags;
guint widget_id_timeout;
@@ -1336,19 +1334,6 @@ contact_widget_presence_notify_cb (EmpathyContactWidget *information)
}
static void
-contact_widget_favourites_changed_cb (EmpathyContactManager *manager,
- EmpathyContact *contact,
- gboolean is_favourite,
- EmpathyContactWidget *information)
-{
- if (contact != information->contact)
- return;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
- information->favourite_checkbox), is_favourite);
-}
-
-static void
contact_widget_remove_contact (EmpathyContactWidget *information)
{
if (information->contact)
@@ -1449,20 +1434,6 @@ contact_widget_contact_update (EmpathyContactWidget *information)
contact_widget_presence_notify_cb (information);
contact_widget_avatar_notify_cb (information);
- if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE)
- {
- FolksPersona *persona = empathy_contact_get_persona (
- information->contact);
-
- if (persona != NULL && FOLKS_IS_FAVOURITE_DETAILS (persona))
- {
- gboolean is_favourite = folks_favourite_details_get_is_favourite (
- FOLKS_FAVOURITE_DETAILS (persona));
- contact_widget_favourites_changed_cb (information->manager,
- information->contact, is_favourite, information);
- }
- }
-
gtk_widget_show (information->label_alias);
gtk_widget_show (information->widget_alias);
gtk_widget_show (information->hbox_presence);
@@ -1583,20 +1554,6 @@ contact_widget_id_focus_out_cb (GtkWidget *widget,
}
static void
-favourite_toggled_cb (GtkToggleButton *button,
- EmpathyContactWidget *information)
-{
- FolksPersona *persona = empathy_contact_get_persona (information->contact);
-
- if (persona != NULL && FOLKS_IS_FAVOURITE_DETAILS (persona))
- {
- gboolean active = gtk_toggle_button_get_active (button);
- folks_favourite_details_set_is_favourite (
- FOLKS_FAVOURITE_DETAILS (persona), active);
- }
-}
-
-static void
contact_widget_contact_setup (EmpathyContactWidget *information)
{
information->label_status = gtk_label_new ("");
@@ -1737,25 +1694,6 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
gtk_label_set_selectable (GTK_LABEL (information->label_status), FALSE);
}
gtk_widget_show (information->widget_alias);
-
- /* Favorite */
- if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE)
- {
- information->favourite_checkbox = gtk_check_button_new_with_label (
- _("Favorite"));
-
- g_signal_connect (information->favourite_checkbox, "toggled",
- G_CALLBACK (favourite_toggled_cb), information);
-
- gtk_grid_attach (GTK_GRID (information->grid_contact),
- information->favourite_checkbox, 0, 3, 1, 1);
-
- information->fav_sig_id = g_signal_connect (information->manager,
- "favourites-changed",
- G_CALLBACK (contact_widget_favourites_changed_cb), information);
-
- gtk_widget_show (information->favourite_checkbox);
- }
}
static void
@@ -1769,11 +1707,6 @@ contact_widget_destroy_cb (GtkWidget *widget,
g_source_remove (information->widget_id_timeout);
}
- if (information->fav_sig_id != 0)
- g_signal_handler_disconnect (information->manager, information->fav_sig_id);
-
- g_object_unref (information->manager);
-
g_slice_free (EmpathyContactWidget, information);
}
@@ -1834,8 +1767,6 @@ empathy_contact_widget_new (EmpathyContact *contact,
"EmpathyContactWidget",
information);
- information->manager = empathy_contact_manager_dup_singleton ();
-
/* Create widgets */
contact_widget_contact_setup (information);
contact_widget_details_setup (information);