Closes #7100 Fixes search folder tooltip
This commit is contained in:
commit
b7f48c2418
4 changed files with 14 additions and 3 deletions
|
|
@ -12,12 +12,12 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
|
|||
public FolderEntry(Geary.Folder folder) {
|
||||
base(folder);
|
||||
has_new = false;
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNDREAD].connect(
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].connect(
|
||||
on_email_unread_count_changed);
|
||||
}
|
||||
|
||||
~FolderEntry() {
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNDREAD].disconnect(
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].disconnect(
|
||||
on_email_unread_count_changed);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,15 @@ public class FolderList.SearchEntry : FolderList.AbstractFolderEntry {
|
|||
|
||||
Geary.Engine.instance.account_available.connect(on_accounts_changed);
|
||||
Geary.Engine.instance.account_unavailable.connect(on_accounts_changed);
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_TOTAL].connect(
|
||||
on_email_total_changed);
|
||||
}
|
||||
|
||||
~SearchEntry() {
|
||||
Geary.Engine.instance.account_available.disconnect(on_accounts_changed);
|
||||
Geary.Engine.instance.account_unavailable.disconnect(on_accounts_changed);
|
||||
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_TOTAL].disconnect(
|
||||
on_email_total_changed);
|
||||
}
|
||||
|
||||
public override string get_sidebar_name() {
|
||||
|
|
@ -49,6 +53,11 @@ public class FolderList.SearchEntry : FolderList.AbstractFolderEntry {
|
|||
|
||||
private void on_accounts_changed() {
|
||||
sidebar_name_changed(get_sidebar_name());
|
||||
sidebar_tooltip_changed(get_sidebar_tooltip());
|
||||
}
|
||||
|
||||
private void on_email_total_changed() {
|
||||
sidebar_tooltip_changed(get_sidebar_tooltip());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
public abstract class Geary.FolderProperties : BaseObject {
|
||||
public const string PROP_NAME_EMAIL_TOTAL = "email-total";
|
||||
public const string PROP_NAME_EMAIL_UNDREAD = "email-unread";
|
||||
public const string PROP_NAME_EMAIL_UNREAD = "email-unread";
|
||||
public const string PROP_NAME_HAS_CHILDREN = "has-children";
|
||||
public const string PROP_NAME_SUPPORTS_CHILDREN = "supports-children";
|
||||
public const string PROP_NAME_IS_OPENABLE = "is-openable";
|
||||
|
|
|
|||
|
|
@ -148,6 +148,8 @@ public class Geary.SearchFolder : Geary.AbstractLocalFolder {
|
|||
search_results.remove_all(to_remove);
|
||||
search_results.add_all(to_add);
|
||||
|
||||
_properties.set_total(search_results.size);
|
||||
|
||||
Geary.Folder.CountChangeReason reason = CountChangeReason.NONE;
|
||||
|
||||
if (to_add.size > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue