[geary/pantheon_mail: 20/32] use new icon mail-mark-important
- From: Javier Jardón Cabezas <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/pantheon_mail: 20/32] use new icon mail-mark-important
- Date: Wed, 25 Nov 2015 19:52:26 +0000 (UTC)
commit b876e6e35165a8b991970293307014f2d0e0edbb
Author: Daniel Foré <daniel elementary io>
Date: Mon Nov 23 21:29:04 2015 -0800
use new icon mail-mark-important
.../folder-list/folder-list-folder-entry.vala | 38 ++++++++++----------
1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/src/client/folder-list/folder-list-folder-entry.vala
b/src/client/folder-list/folder-list-folder-entry.vala
index f772b12..069b885 100644
--- a/src/client/folder-list/folder-list-folder-entry.vala
+++ b/src/client/folder-list/folder-list-folder-entry.vala
@@ -8,7 +8,7 @@
public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.InternalDropTargetEntry,
Sidebar.EmphasizableEntry {
private bool has_new;
-
+
public FolderEntry(Geary.Folder folder) {
base(folder);
has_new = false;
@@ -16,35 +16,35 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].connect(on_counts_changed);
folder.display_name_changed.connect(on_display_name_changed);
}
-
+
~FolderEntry() {
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_TOTAL].disconnect(on_counts_changed);
folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].disconnect(on_counts_changed);
folder.display_name_changed.disconnect(on_display_name_changed);
}
-
+
public override string get_sidebar_name() {
return folder.get_display_name();
}
-
+
public override string? get_sidebar_tooltip() {
// Label displaying total number of email messages in a folder
string total_msg = ngettext("%d message", "%d messages", folder.properties.email_total).
printf(folder.properties.email_total);
-
+
if (folder.properties.email_unread == 0)
return total_msg;
-
+
/// Label displaying number of unread email messages in a folder
string unread_msg = ngettext("%d unread", "%d unread", folder.properties.email_unread).
printf(folder.properties.email_unread);
-
+
/// This string represents the divider between two messages: "n messages" and "n unread",
/// shown in the folder list as a tooltip. Please use your languages conventions for
/// combining the two, i.e. a comma (",") for English; "6 messages, 3 unread"
return _("%s, %s").printf(total_msg, unread_msg);
}
-
+
public override string? get_sidebar_icon() {
switch (folder.special_folder_type) {
@@ -64,7 +64,7 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
return "starred";
case Geary.SpecialFolderType.IMPORTANT:
- return "task-due";
+ return "mail-mark-important";
case Geary.SpecialFolderType.ALL_MAIL:
case Geary.SpecialFolderType.ARCHIVE:
@@ -83,23 +83,23 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
assert_not_reached();
}
}
-
+
public override string to_string() {
return "FolderEntry: " + get_sidebar_name();
}
-
+
public bool is_emphasized() {
return has_new;
}
-
+
public void set_has_new(bool has_new) {
if (this.has_new == has_new)
return;
-
+
this.has_new = has_new;
is_emphasized_changed(has_new);
}
-
+
public bool internal_drop_received(Gdk.DragContext context, Gtk.SelectionData data) {
// Copy or move?
Gdk.ModifierType mask;
@@ -114,29 +114,29 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
return true;
}
-
+
private void on_counts_changed() {
sidebar_count_changed(get_count());
sidebar_tooltip_changed(get_sidebar_tooltip());
}
-
+
private void on_display_name_changed() {
sidebar_name_changed(folder.get_display_name());
}
-
+
public override int get_count() {
switch (folder.special_folder_type) {
// for Drafts and Outbox, interested in showing total count, not unread count
case Geary.SpecialFolderType.DRAFTS:
case Geary.SpecialFolderType.OUTBOX:
return folder.properties.email_total;
-
+
// only show counts for Inbox, Spam, and user folders
case Geary.SpecialFolderType.INBOX:
case Geary.SpecialFolderType.SPAM:
case Geary.SpecialFolderType.NONE:
return folder.properties.email_unread;
-
+
// otherwise, to avoid clutter, no counts displayed (but are available in tooltip)
default:
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]