Skip to content

Commit

Permalink
fixed grabing page icon
Browse files Browse the repository at this point in the history
  • Loading branch information
artemanufrij committed Oct 19, 2018
1 parent c7d74f2 commit 1b1d5fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/com.github.artemanufrij.webpin.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<p>Fixed:</p>
<ul>
<li>Restore correct window size</li>
<li>Grabing page icon</li>
</ul>
<p>Translation:</p>
<ul>
Expand Down
8 changes: 7 additions & 1 deletion src/Widgets/Views/Editor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,13 @@ namespace Webpin.Widgets.Views {
string icon = icon_name_entry.get_text ();
if (tmp_icon_file != "") {
var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
FileUtils.rename (tmp_icon_file, new_icon);
uint8[] content;
try {
FileUtils.get_data (tmp_icon_file, out content);
FileUtils.set_data (new_icon, content);
} catch (Error err) {
warning (err.message);
}
FileUtils.remove (tmp_icon_file);
icon = new_icon;
}
Expand Down

0 comments on commit 1b1d5fd

Please sign in to comment.