From 1ff2ada87f38563d90676752703a93977befa9ab Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Thu, 7 Mar 2024 21:50:58 +0100 Subject: Fix blocking own contacts from UI Signed-off-by: TheJackiMonster --- src/ui/contact_info.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/ui/contact_info.c b/src/ui/contact_info.c index 874c4e4..d785e82 100644 --- a/src/ui/contact_info.c +++ b/src/ui/contact_info.c @@ -557,6 +557,16 @@ ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle, key? TRUE : FALSE ); + gtk_widget_set_sensitive( + GTK_WIDGET(handle->block_button), + GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) + ); + + gtk_widget_set_sensitive( + GTK_WIDGET(handle->unblock_button), + GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) + ); + gtk_stack_set_visible_child( handle->block_stack, GNUNET_YES == GNUNET_CHAT_contact_is_blocked(contact)? @@ -564,6 +574,11 @@ ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle, GTK_WIDGET(handle->block_button) ); + gtk_widget_set_visible( + GTK_WIDGET(handle->block_stack), + GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) + ); + g_object_set_qdata( G_OBJECT(handle->block_stack), handle->app->quarks.data, -- cgit v1.2.3