aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-02-11 12:27:05 +0800
committerChandni Verma <chandniverma2112@gmail.com>2011-03-08 12:04:56 +0800
commit1e15d1b253163c98064997aabe6b127acbecc64b (patch)
tree7caa52892d9ac93a881c9e7200c4f4cdaaab9902 /libempathy-gtk
parent95283d6bffb0b907ec1741c6c685e7fe67d701a0 (diff)
downloadgsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar.gz
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar.bz2
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar.lz
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar.xz
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.tar.zst
gsoc2013-empathy-1e15d1b253163c98064997aabe6b127acbecc64b.zip
Add block confirmation to the authorise publication dialog
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 8408ed6ca..73a458cb9 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -80,19 +80,31 @@ subscription_dialog_response_cb (GtkDialog *dialog,
empathy_contact_set_alias (contact,
empathy_contact_widget_get_alias (contact_widget));
}
- else if (response == GTK_RESPONSE_NO ||
- response == GTK_RESPONSE_REJECT) {
+ else if (response == GTK_RESPONSE_NO) {
empathy_contact_list_remove (EMPATHY_CONTACT_LIST (manager),
contact, "");
-
- if (response == GTK_RESPONSE_REJECT) {
+ }
+ else if (response == GTK_RESPONSE_REJECT) {
+ /* confirm the blocking */
+ if (empathy_block_contact_dialog_show (GTK_WINDOW (dialog),
+ contact, NULL)) {
+ empathy_contact_list_remove (
+ EMPATHY_CONTACT_LIST (manager),
+ contact, "");
empathy_contact_list_set_blocked (
- EMPATHY_CONTACT_LIST (manager), contact, TRUE);
+ EMPATHY_CONTACT_LIST (manager),
+ contact, TRUE);
+ } else {
+ /* if they don't confirm, return back to the
+ * first dialog */
+ goto finally;
}
}
subscription_dialogs = g_list_remove (subscription_dialogs, dialog);
gtk_widget_destroy (GTK_WIDGET (dialog));
+
+finally:
g_object_unref (manager);
}