messenger-gtk

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

commit 6869b17f7ce4bb3690639eb0754d1660787191ec
parent 77918e6263fea358dd033621e1159eb473fec910
Author: Jacki <jacki@thejackimonster.de>
Date:   Thu,  1 Feb 2024 21:58:40 +0100

Remove whisper messages

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Mresources/ui/message_content.ui | 47++---------------------------------------------
Mresources/ui/settings.ui | 41-----------------------------------------
Msrc/application.h | 1-
Msrc/chat/messenger.c | 1-
Msrc/event.c | 10----------
Msrc/ui/message.c | 11+----------
Msrc/ui/message.h | 2--
Msrc/ui/settings.c | 16----------------
Msrc/ui/settings.h | 1-
9 files changed, 3 insertions(+), 127 deletions(-)

diff --git a/resources/ui/message_content.ui b/resources/ui/message_content.ui @@ -178,48 +178,6 @@ Author: Tobias Frisch </packing> </child> <child> - <object class="GtkBox" id="whisper_box"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="spacing">4</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="valign">end</property> - <property name="icon-name">face-shutmouth-symbolic</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes">whispering...</property> - <property name="xalign">0</property> - <property name="yalign">1</property> - <attributes> - <attribute name="style" value="italic"/> - </attributes> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="pack-type">end</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="name">whisper_page</property> - <property name="position">3</property> - </packing> - </child> - <child> <object class="GtkRevealer" id="media_revealer"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -320,9 +278,8 @@ Author: Tobias Frisch </child> </object> <packing> - <property name="name">page0</property> - <property name="title" translatable="yes">page0</property> - <property name="position">4</property> + <property name="name">media_page</property> + <property name="position">3</property> </packing> </child> </object> diff --git a/resources/ui/settings.ui b/resources/ui/settings.ui @@ -341,47 +341,6 @@ Author: Tobias Frisch </child> </object> </child> - <child> - <object class="HdyPreferencesRow"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="title" translatable="yes">Show whispering</property> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes">Show whispering</property> - <property name="ellipsize">end</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkSwitch" id="whispering_switch"> - <property name="visible">True</property> - <property name="can-focus">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack-type">end</property> - <property name="position">1</property> - </packing> - </child> - <style> - <class name="settings-entry"/> - </style> - </object> - </child> - </object> - </child> </object> </child> <child> diff --git a/src/application.h b/src/application.h @@ -140,7 +140,6 @@ typedef struct MESSENGER_Application gboolean disable_notifications; gboolean send_read_receipts; - gboolean show_whispering; gulong auto_delete_delay; diff --git a/src/chat/messenger.c b/src/chat/messenger.c @@ -157,7 +157,6 @@ _chat_messenger_message(void *cls, } case GNUNET_CHAT_KIND_TEXT: case GNUNET_CHAT_KIND_FILE: - case GNUNET_CHAT_KIND_WHISPER: { application_call_message_event( app, diff --git a/src/event.c b/src/event.c @@ -603,18 +603,8 @@ event_receive_message(MESSENGER_Application *app, app->settings.auto_delete_delay )); - const gboolean whispering = ( - GNUNET_CHAT_KIND_WHISPER == GNUNET_CHAT_message_get_kind(msg) - ); - - if ((whispering) && (!(app->settings.show_whispering))) - return; - const gchar *text = GNUNET_CHAT_message_get_text(msg); - if (whispering) - text = _("whispers..."); - if ((text) && (!(*text))) goto skip_message; diff --git a/src/ui/message.c b/src/ui/message.c @@ -419,10 +419,6 @@ ui_message_new(MESSENGER_Application *app, handle ); - handle->whisper_box = GTK_WIDGET( - gtk_builder_get_object(handle->builder[1], "whisper_box") - ); - handle->media_revealer = GTK_REVEALER( gtk_builder_get_object(handle->builder[1], "media_revealer") ); @@ -698,12 +694,7 @@ ui_message_update(UI_MESSAGE_Handle *handle, if (msg) { - if (GNUNET_CHAT_KIND_WHISPER == GNUNET_CHAT_message_get_kind(msg)) - gtk_stack_set_visible_child( - handle->content_stack, - GTK_WIDGET(handle->whisper_box) - ); - else if (GNUNET_YES == GNUNET_CHAT_message_is_private(msg)) + if (GNUNET_YES == GNUNET_CHAT_message_is_private(msg)) gtk_widget_show(GTK_WIDGET(handle->private_image)); invitation = GNUNET_CHAT_message_get_invitation(msg); diff --git a/src/ui/message.h b/src/ui/message.h @@ -76,8 +76,6 @@ typedef struct UI_MESSAGE_Handle GtkDrawingArea *preview_drawing_area; - GtkWidget *whisper_box; - GtkRevealer *media_revealer; GtkImage *media_type_image; GtkLabel *media_label; diff --git a/src/ui/settings.c b/src/ui/settings.c @@ -342,22 +342,6 @@ ui_settings_dialog_init(MESSENGER_Application *app, &(app->settings.send_read_receipts) ); - handle->whispering_switch = GTK_SWITCH( - gtk_builder_get_object(handle->builder, "whispering_switch") - ); - - gtk_switch_set_active( - handle->whispering_switch, - app->settings.show_whispering - ); - - g_signal_connect( - handle->whispering_switch, - "state-set", - G_CALLBACK(handle_general_switch_state), - &(app->settings.show_whispering) - ); - handle->auto_delete_combo_box = GTK_COMBO_BOX( gtk_builder_get_object(handle->builder, "auto_delete_combo_box") ); diff --git a/src/ui/settings.h b/src/ui/settings.h @@ -39,7 +39,6 @@ typedef struct UI_SETTINGS_Handle GtkLabel *blocked_label; GtkSwitch *read_receipts_switch; - GtkSwitch *whispering_switch; GtkComboBox *auto_delete_combo_box;