From 88f318cde91a9dc149fe8a1fd59008bf36577306 Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Tue, 17 Nov 2020 22:51:28 +0100 Subject: [PATCH] fixed icon and color fetching --- src/Widgets/Views/Editor.vala | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/Widgets/Views/Editor.vala b/src/Widgets/Views/Editor.vala index fe7bea8..ca25f52 100644 --- a/src/Widgets/Views/Editor.vala +++ b/src/Widgets/Views/Editor.vala @@ -232,17 +232,17 @@ namespace Webpin.Widgets.Views { if (msg.status_code == 200) { var body = (string)msg.response_body.data; - Regex regex = null; try { - regex = new Regex ("(?<= { @@ -363,6 +363,9 @@ namespace Webpin.Widgets.Views { tmp_icon_file = GLib.Path.build_filename (Environment.get_tmp_dir (), Random.next_int ().to_string () + tmp_icon_ext); + stdout.printf("source: %s\n", url); + stdout.printf("destination: %s\n", tmp_icon_file); + var s_file = File.new_for_uri (url); var d_file = File.new_for_path (tmp_icon_file); @@ -370,7 +373,7 @@ namespace Webpin.Widgets.Views { try { copy_done = s_file.copy (d_file, FileCopyFlags.OVERWRITE); } catch (Error err) { - warning (err.message); + stdout.printf ("%s\n", err.message); } if (copy_done && tmp_icon_ext != ".svg") { try {