talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4a36d09999e50fc238592d90e5041516753e1b33
parent f621772662b9dd24243f7d732b143c52b420d7de
Author: paul <paul@claws-mail.org>
Date:   Fri,  3 Sep 2021 12:04:36 +0100

change labels, remove empty lines, show phishing warning on copy

Diffstat:
Msrc/uri_opener.c | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/uri_opener.c b/src/uri_opener.c @@ -126,7 +126,7 @@ static void uri_opener_create_list_view_columns(GtkWidget *list_view) renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes - (_("Available URLs:"), + (_("Included URLs:"), renderer, "markup", URI_OPENER_URL, NULL); @@ -234,8 +234,7 @@ static void uri_opener_create(void) urilist = uri_opener_list_view_create(); - label = gtk_label_new(_("Please select the URL to open.\n" - "Possible phishing attempts are shown in red, if any.")); + label = gtk_label_new(_("Any phishing URLs are shown in red, followed by the actual URL.")); gtk_label_set_xalign(GTK_LABEL(label), 0.0); gtk_box_pack_start(GTK_BOX(vbox1), label, FALSE, TRUE, 0); @@ -308,10 +307,10 @@ static void uri_opener_list_view_insert_uri(GtkWidget *list_view, label = g_markup_printf_escaped("<span color=\"%s\"><b>%s</b></span>\n%s", gtkut_gdk_rgba_to_string(&prefs_common.color[COL_LOG_ERROR]), visible, uri->uri); } else - label = g_markup_printf_escaped("<b>%s</b>\n%s", visible, uri->uri); + label = g_markup_printf_escaped("%s", uri->uri); } else - label = g_markup_printf_escaped("\n%s", uri->uri); + label = g_markup_printf_escaped("%s", uri->uri); if (row_iter == NULL) { /* append new */ @@ -496,11 +495,13 @@ static void uri_opener_list_copy_cb(gpointer action, gpointer data) if (uri_list_str) { GtkClipboard *clip, *clip2; - clip = gtk_widget_get_clipboard (opener.window, GDK_SELECTION_PRIMARY); - clip2 = gtk_widget_get_clipboard (opener.window, GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_text (clip, uri_list_str->str, uri_list_str->len); - gtk_clipboard_set_text (clip2, uri_list_str->str, uri_list_str->len); - + if (textview_uri_security_check(opener.msgview->mimeview->textview, uri, + TRUE) == TRUE) { + clip = gtk_widget_get_clipboard (opener.window, GDK_SELECTION_PRIMARY); + clip2 = gtk_widget_get_clipboard (opener.window, GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_text (clip, uri_list_str->str, uri_list_str->len); + gtk_clipboard_set_text (clip2, uri_list_str->str, uri_list_str->len); + } g_string_free(uri_list_str, TRUE); }