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>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<releases>
|
<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">
|
<release version="1.0.1" date="2018-10-30">
|
||||||
<description>
|
<description>
|
||||||
<p>New:</p>
|
<p>New:</p>
|
||||||
|
|
|
@ -488,7 +488,7 @@ namespace Webpin.Widgets.Views {
|
||||||
|
|
||||||
private void on_accept () {
|
private void on_accept () {
|
||||||
string icon = icon_name_entry.get_text ();
|
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);
|
var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
|
||||||
uint8[] content;
|
uint8[] content;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace Webpin.Widgets.Views {
|
||||||
scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
scrolled.hscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||||
|
|
||||||
web_items = new Gtk.FlowBox();
|
web_items = new Gtk.FlowBox();
|
||||||
|
web_items.set_sort_func (sort_func);
|
||||||
web_items.valign = Gtk.Align.START;
|
web_items.valign = Gtk.Align.START;
|
||||||
web_items.vexpand = false;
|
web_items.vexpand = false;
|
||||||
web_items.homogeneous = true;
|
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 {
|
namespace Webpin.Widgets {
|
||||||
public class WebItem : Gtk.FlowBoxChild {
|
public class WebItem : Gtk.FlowBoxChild {
|
||||||
|
|
||||||
|
public string title {
|
||||||
|
get {
|
||||||
|
return desktop_file.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Gtk.Image image;
|
Gtk.Image image;
|
||||||
Gtk.Label label;
|
Gtk.Label label;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue