diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-02 18:18:50 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-08 20:23:16 +0800 |
commit | 6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1 (patch) | |
tree | 709e88a7070c5b2c6b406def6e81b12a1be33b5e /libempathy-gtk | |
parent | c627b58b275f7b018ddcf4ea59509207a72f3a2e (diff) | |
download | gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar.gz gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar.bz2 gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar.lz gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar.xz gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.tar.zst gsoc2013-empathy-6cb1836a97f35a92e9535e08c7eeeee1bb6ea4e1.zip |
individual dialog: use tp-glib blocking API
https://bugzilla.gnome.org/show_bug.cgi?id=661805
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-dialogs.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-individual-dialogs.c b/libempathy-gtk/empathy-individual-dialogs.c index e1bd6f11f..ed566329d 100644 --- a/libempathy-gtk/empathy-individual-dialogs.c +++ b/libempathy-gtk/empathy-individual-dialogs.c @@ -182,8 +182,6 @@ empathy_block_individual_dialog_show (GtkWindow *parent, GdkPixbuf *avatar, gboolean *abusive) { - EmpathyContactManager *contact_manager = - empathy_contact_manager_dup_singleton (); GtkWidget *dialog; GtkWidget *abusive_check = NULL; GeeSet *personas; @@ -214,9 +212,9 @@ empathy_block_individual_dialog_show (GtkWindow *parent, { TpfPersona *persona = gee_iterator_get (iter); TpContact *contact; - EmpathyContactListFlags flags; GString *s; char *str; + TpConnection *conn; if (!TPF_IS_PERSONA (persona)) goto while_finish; @@ -225,10 +223,10 @@ empathy_block_individual_dialog_show (GtkWindow *parent, if (contact == NULL) goto while_finish; - flags = empathy_contact_manager_get_flags_for_connection ( - contact_manager, tp_contact_get_connection (contact)); + conn = tp_contact_get_connection (contact); - if (flags & EMPATHY_CONTACT_LIST_CAN_BLOCK) + if (tp_proxy_has_interface_by_id (conn, + TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_BLOCKING)) { s = blocked_str; npersonas_blocked++; @@ -239,7 +237,7 @@ empathy_block_individual_dialog_show (GtkWindow *parent, npersonas_notblocked++; } - if (flags & EMPATHY_CONTACT_LIST_CAN_REPORT_ABUSIVE) + if (tp_connection_can_report_abusive (conn)) can_report_abuse = TRUE; str = contact_pretty_name (contact); @@ -291,7 +289,6 @@ while_finish: gtk_widget_show (abusive_check); } - g_object_unref (contact_manager); g_string_free (text, TRUE); g_string_free (blocked_str, TRUE); g_string_free (notblocked_str, TRUE); |