fix#80
This commit is contained in:
parent
5fbf3556cf
commit
5a74722c39
4 changed files with 27 additions and 1 deletions
|
@ -33,6 +33,18 @@
|
|||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="1.0.2" date="2018-11-02">
|
||||
<description>
|
||||
<p>New:</p>
|
||||
<ul>
|
||||
<li>Sort items inside app overview</li>
|
||||
</ul>
|
||||
<p>Fixed:</p>
|
||||
<ul>
|
||||
<li>Custom icon was replaced by default one</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.0.1" date="2018-10-30">
|
||||
<description>
|
||||
<p>New:</p>
|
||||
|
|
|
@ -488,7 +488,7 @@ namespace Webpin.Widgets.Views {
|
|||
|
||||
private void on_accept () {
|
||||
string icon = icon_name_entry.get_text ();
|
||||
if (tmp_icon_file != "") {
|
||||
if (tmp_icon_file != "" && tmp_icon_file == icon) {
|
||||
var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
|
||||
uint8[] content;
|
||||
try {
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace Webpin.Widgets.Views {
|
|||
scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||
|
||||
web_items = new Gtk.FlowBox();
|
||||
web_items.set_sort_func (sort_func);
|
||||
web_items.valign = Gtk.Align.START;
|
||||
web_items.vexpand = false;
|
||||
web_items.homogeneous = true;
|
||||
|
@ -108,5 +109,12 @@ namespace Webpin.Widgets.Views {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int sort_func (Gtk.FlowBoxChild child1, Gtk.FlowBoxChild child2) {
|
||||
var item1 = (WebItem)child1;
|
||||
var item2 = (WebItem)child2;
|
||||
|
||||
return item1.title.collate (item2.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
namespace Webpin.Widgets {
|
||||
public class WebItem : Gtk.FlowBoxChild {
|
||||
|
||||
public string title {
|
||||
get {
|
||||
return desktop_file.name;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Image image;
|
||||
Gtk.Label label;
|
||||
|
||||
|
|
Loading…
Reference in a new issue