From 4a78b9be9f990c1bf589778e8d7fbb00b65fe62c Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 3 Sep 2021 12:36:20 +0100 Subject: [PATCH] change labels, remove empty lines, show phishing warning on copy --- src/uri_opener.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/uri_opener.c b/src/uri_opener.c index f6e161792..0b68fb42e 100644 --- a/src/uri_opener.c +++ b/src/uri_opener.c @@ -127,7 +127,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); @@ -235,8 +235,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_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_box_pack_start(GTK_BOX(vbox1), label, FALSE, TRUE, 0); @@ -313,10 +312,10 @@ static void uri_opener_list_view_insert_uri(GtkWidget *list_view, label = g_markup_printf_escaped("%s\n%s", buf, visible, uri->uri); } else - label = g_markup_printf_escaped("%s\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 */ @@ -501,11 +500,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); } -- 2.11.4.GIT