diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2024-03-07 21:50:58 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2024-03-07 21:50:58 +0100 |
commit | 1ff2ada87f38563d90676752703a93977befa9ab (patch) | |
tree | 7bb0e7317bc222b3dc05988d4157a022bbfa89de /src | |
parent | 798c135787208367ac394b55eb6cf9556b3636aa (diff) | |
download | messenger-gtk-1ff2ada87f38563d90676752703a93977befa9ab.tar.gz messenger-gtk-1ff2ada87f38563d90676752703a93977befa9ab.zip |
Fix blocking own contacts from UI
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/contact_info.c | 15 |
1 files changed, 15 insertions, 0 deletions
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, | |||
557 | key? TRUE : FALSE | 557 | key? TRUE : FALSE |
558 | ); | 558 | ); |
559 | 559 | ||
560 | gtk_widget_set_sensitive( | ||
561 | GTK_WIDGET(handle->block_button), | ||
562 | GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) | ||
563 | ); | ||
564 | |||
565 | gtk_widget_set_sensitive( | ||
566 | GTK_WIDGET(handle->unblock_button), | ||
567 | GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) | ||
568 | ); | ||
569 | |||
560 | gtk_stack_set_visible_child( | 570 | gtk_stack_set_visible_child( |
561 | handle->block_stack, | 571 | handle->block_stack, |
562 | GNUNET_YES == GNUNET_CHAT_contact_is_blocked(contact)? | 572 | GNUNET_YES == GNUNET_CHAT_contact_is_blocked(contact)? |
@@ -564,6 +574,11 @@ ui_contact_info_dialog_update(UI_CONTACT_INFO_Handle *handle, | |||
564 | GTK_WIDGET(handle->block_button) | 574 | GTK_WIDGET(handle->block_button) |
565 | ); | 575 | ); |
566 | 576 | ||
577 | gtk_widget_set_visible( | ||
578 | GTK_WIDGET(handle->block_stack), | ||
579 | GNUNET_YES != GNUNET_CHAT_contact_is_owned(contact) | ||
580 | ); | ||
581 | |||
567 | g_object_set_qdata( | 582 | g_object_set_qdata( |
568 | G_OBJECT(handle->block_stack), | 583 | G_OBJECT(handle->block_stack), |
569 | handle->app->quarks.data, | 584 | handle->app->quarks.data, |