diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-02-14 09:00:56 +0800 |
---|---|---|
committer | Chandni Verma <chandniverma2112@gmail.com> | 2011-03-11 13:10:17 +0800 |
commit | 103b4d5da19bf7ebf648658b8ff0ccab88aa24bd (patch) | |
tree | 28dd101a3ea24b525fa3e4d492803a6d80986940 /libempathy-gtk | |
parent | 0a9fd8a0a7517f099ca1b908679ab7935513cd9a (diff) | |
download | gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar.gz gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar.bz2 gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar.lz gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar.xz gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.tar.zst gsoc2013-empathy-103b4d5da19bf7ebf648658b8ff0ccab88aa24bd.zip |
Hook up abusive argument into TpContactList backend
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-dialogs.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-contact-menu.c | 6 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 7 |
3 files changed, 12 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index 73a458cb9..737a449d2 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -85,15 +85,17 @@ subscription_dialog_response_cb (GtkDialog *dialog, contact, ""); } else if (response == GTK_RESPONSE_REJECT) { + gboolean abusive; + /* confirm the blocking */ if (empathy_block_contact_dialog_show (GTK_WINDOW (dialog), - contact, NULL)) { + contact, &abusive)) { empathy_contact_list_remove ( EMPATHY_CONTACT_LIST (manager), contact, ""); empathy_contact_list_set_blocked ( EMPATHY_CONTACT_LIST (manager), - contact, TRUE); + contact, TRUE, abusive); } else { /* if they don't confirm, return back to the * first dialog */ diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c index 7f3091a9b..9f36cf552 100644 --- a/libempathy-gtk/empathy-contact-menu.c +++ b/libempathy-gtk/empathy-contact-menu.c @@ -234,7 +234,7 @@ empathy_contact_block_menu_item_toggled (GtkCheckMenuItem *item, { static guint block_signal = 0; EmpathyContactManager *manager; - gboolean blocked; + gboolean blocked, abusive; if (block_signal > 0) return; @@ -252,13 +252,13 @@ empathy_contact_block_menu_item_toggled (GtkCheckMenuItem *item, "window"); if (!empathy_block_contact_dialog_show (GTK_WINDOW (parent), - contact, NULL)) + contact, &abusive)) return; } manager = empathy_contact_manager_dup_singleton (); empathy_contact_list_set_blocked (EMPATHY_CONTACT_LIST (manager), - contact, blocked); + contact, blocked, abusive); g_object_unref (manager); /* update the toggle with the blocked status */ diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index cea55a200..172b1facd 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -2448,11 +2448,14 @@ individual_view_remove_activate_cb (GtkMenuItem *menuitem, if (res == GTK_RESPONSE_YES || res == GTK_RESPONSE_REJECT) { + gboolean abusive; + if (res == GTK_RESPONSE_REJECT && - empathy_block_individual_dialog_show (parent, individual, NULL)) + empathy_block_individual_dialog_show (parent, individual, + &abusive)) { empathy_individual_manager_set_blocked (manager, individual, - TRUE); + TRUE, abusive); } else { |