messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

commit 1ff2ada87f38563d90676752703a93977befa9ab
parent 798c135787208367ac394b55eb6cf9556b3636aa
Author: TheJackiMonster <thejackimonster@gmail.com>
Date:   Thu,  7 Mar 2024 21:50:58 +0100

Fix blocking own contacts from UI

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>

Diffstat:
Msrc/ui/contact_info.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git 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,