Remove Gee.TreeSet workaround: Closes #7304
Now require Gee 0.8.5 or better.
This commit is contained in:
parent
ca71a64447
commit
cb1421a52b
8 changed files with 13 additions and 28 deletions
4
debian/control
vendored
4
debian/control
vendored
|
|
@ -3,7 +3,7 @@ Section: gnome
|
|||
Priority: optional
|
||||
Maintainer: Jim Nelson <jim@yorba.org>
|
||||
Build-Depends: debhelper (>= 8),
|
||||
libgee-0.8-dev (>= 0.8.0),
|
||||
libgee-0.8-dev (>= 0.8.5),
|
||||
libglib2.0-dev (>= 2.32.0),
|
||||
libgtk-3-dev (>= 3.6.0),
|
||||
libunique-3.0-dev (>= 3.0.0),
|
||||
|
|
@ -27,7 +27,7 @@ Homepage: http://www.yorba.org
|
|||
Package: geary
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
libgee-0.8-2 (>= 0.8.0),
|
||||
libgee-0.8-2 (>= 0.8.5),
|
||||
libglib2.0-0 (>= 2.32.0),
|
||||
libgtk-3-0 (>= 3.6.0),
|
||||
libunique-3.0-0 (>= 3.0.0),
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ pkg_check_modules(DEPS REQUIRED
|
|||
glib-2.0>=${TARGET_GLIB}.0
|
||||
gio-2.0>=2.28.0
|
||||
gtk+-3.0>=3.6.0
|
||||
gee-0.8>=0.8.0
|
||||
gee-0.8>=0.8.5
|
||||
unique-3.0>=3.0.0
|
||||
libnotify>=0.7.5
|
||||
libcanberra>=0.28
|
||||
|
|
|
|||
|
|
@ -192,8 +192,7 @@ public class ConversationListStore : Gtk.ListStore {
|
|||
|
||||
// sort the conversations so the previews are fetched from the newest to the oldest, matching
|
||||
// the user experience
|
||||
Gee.TreeSet<Geary.App.Conversation> sorted_conversations
|
||||
= new Geary.Collection.FixedTreeSet<Geary.App.Conversation>(
|
||||
Gee.TreeSet<Geary.App.Conversation> sorted_conversations = new Gee.TreeSet<Geary.App.Conversation>(
|
||||
compare_conversation_descending);
|
||||
sorted_conversations.add_all(conversation_monitor.get_conversations());
|
||||
foreach (Geary.App.Conversation conversation in sorted_conversations) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class Sidebar.Branch : Object {
|
|||
child.parent = this;
|
||||
|
||||
if (children == null)
|
||||
children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
|
||||
children = new Gee.TreeSet<Node>(comparator_wrapper);
|
||||
|
||||
bool added = children.add(child);
|
||||
assert(added);
|
||||
|
|
@ -74,7 +74,7 @@ public class Sidebar.Branch : Object {
|
|||
public void remove_child(Node child) {
|
||||
assert(children != null);
|
||||
|
||||
Gee.SortedSet<Node> new_children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
|
||||
Gee.SortedSet<Node> new_children = new Gee.TreeSet<Node>(comparator_wrapper);
|
||||
|
||||
// For similar reasons as in reorder_child(), can't rely on TreeSet to locate this
|
||||
// node because we need reference equality.
|
||||
|
|
@ -143,7 +143,7 @@ public class Sidebar.Branch : Object {
|
|||
// called or the set is manually iterated over and removed via the Iterator -- a
|
||||
// tree search is performed and the child will not be found. Only easy solution is
|
||||
// to rebuild a new SortedSet and see if the child has moved.
|
||||
Gee.SortedSet<Node> new_children = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
|
||||
Gee.SortedSet<Node> new_children = new Gee.TreeSet<Node>(comparator_wrapper);
|
||||
bool added = new_children.add_all(children);
|
||||
assert(added);
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ public class Sidebar.Branch : Object {
|
|||
if (children == null)
|
||||
return;
|
||||
|
||||
Gee.SortedSet<Node> reordered = new Geary.Collection.FixedTreeSet<Node>(comparator_wrapper);
|
||||
Gee.SortedSet<Node> reordered = new Gee.TreeSet<Node>(comparator_wrapper);
|
||||
reordered.add_all(children);
|
||||
children = reordered;
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ public class ConversationViewer : Gtk.Box {
|
|||
|
||||
// List of emails in this view.
|
||||
public Gee.TreeSet<Geary.Email> messages { get; private set; default =
|
||||
new Geary.Collection.FixedTreeSet<Geary.Email>(Geary.Email.compare_date_ascending); }
|
||||
new Gee.TreeSet<Geary.Email>(Geary.Email.compare_date_ascending); }
|
||||
|
||||
// The HTML viewer to view the emails.
|
||||
public ConversationWebView web_view { get; private set; }
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ public class Geary.App.Conversation : BaseObject {
|
|||
|
||||
// this isn't ideal but the cost of adding an email to multiple sorted sets once versus
|
||||
// the number of times they're accessed makes it worth it
|
||||
private Gee.SortedSet<Email> date_ascending = new Collection.FixedTreeSet<Email>(
|
||||
private Gee.SortedSet<Email> date_ascending = new Gee.TreeSet<Email>(
|
||||
Geary.Email.compare_date_ascending);
|
||||
private Gee.SortedSet<Email> date_descending = new Collection.FixedTreeSet<Email>(
|
||||
private Gee.SortedSet<Email> date_descending = new Gee.TreeSet<Email>(
|
||||
Geary.Email.compare_date_descending);
|
||||
|
||||
// by storing all paths for each EmailIdentifier, can lookup without blocking
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ private class Geary.ImapEngine.EmailPrefetcher : Object {
|
|||
private unowned ImapEngine.GenericFolder folder;
|
||||
private int start_delay_sec;
|
||||
private Nonblocking.Mutex mutex = new Nonblocking.Mutex();
|
||||
private Gee.TreeSet<Geary.Email> prefetch_emails = new Collection.FixedTreeSet<Geary.Email>(
|
||||
private Gee.TreeSet<Geary.Email> prefetch_emails = new Gee.TreeSet<Geary.Email>(
|
||||
Email.compare_date_received_descending);
|
||||
private uint schedule_id = 0;
|
||||
private Cancellable cancellable = new Cancellable();
|
||||
|
|
@ -169,7 +169,7 @@ private class Geary.ImapEngine.EmailPrefetcher : Object {
|
|||
private async void do_prefetch_batch_async() throws Error {
|
||||
// snarf up all requested Emails for this round
|
||||
Gee.TreeSet<Geary.Email> emails = prefetch_emails;
|
||||
prefetch_emails = new Collection.FixedTreeSet<Geary.Email>(Email.compare_date_received_descending);
|
||||
prefetch_emails = new Gee.TreeSet<Geary.Email>(Email.compare_date_received_descending);
|
||||
|
||||
if (emails.size == 0)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -135,18 +135,4 @@ public static uint hash_memory(void *ptr, size_t bytes) {
|
|||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* This *must* be used in place of Gee,TreeSet until the fix for this bug is widely distributed:
|
||||
* [[https://bugzilla.gnome.org/show_bug.cgi?id=695045]]
|
||||
*/
|
||||
public class FixedTreeSet<G> : Gee.TreeSet<G> {
|
||||
public FixedTreeSet(owned GLib.CompareDataFunc<G>? compare_func = null) {
|
||||
base ( (owned) compare_func);
|
||||
}
|
||||
|
||||
~FixedTreeSet() {
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue