~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/folder-list/folder-list-folder-entry.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-10-10 17:40:37 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131010174037-5p5o4dlsoewek2kg
Tags: 0.4.0-0ubuntu1
New stable version

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    }
45
45
    
46
46
    public override Icon? get_sidebar_icon() {
 
47
        bool rtl = Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL;
 
48
        
47
49
        switch (folder.special_folder_type) {
48
50
            case Geary.SpecialFolderType.NONE:
49
 
                return IconFactory.instance.get_custom_icon("tag-symbolic", IconFactory.ICON_SIDEBAR);
 
51
                return IconFactory.instance.get_custom_icon(rtl ? "tag-rtl-symbolic" : "tag-symbolic", IconFactory.ICON_SIDEBAR);
50
52
            
51
53
            case Geary.SpecialFolderType.INBOX:
52
54
                return new ThemedIcon("inbox-symbolic");
55
57
                return new ThemedIcon("accessories-text-editor-symbolic");
56
58
            
57
59
            case Geary.SpecialFolderType.SENT:
58
 
                return new ThemedIcon("sent-symbolic");
 
60
                return new ThemedIcon(rtl ? "sent-rtl-symbolic" : "sent-symbolic");
59
61
            
60
62
            case Geary.SpecialFolderType.FLAGGED:
61
63
                return new ThemedIcon("star-symbolic");
67
69
                return IconFactory.instance.get_custom_icon("archive-symbolic", IconFactory.ICON_SIDEBAR);
68
70
            
69
71
            case Geary.SpecialFolderType.SPAM:
70
 
                return new ThemedIcon("spam-symbolic");
 
72
                return new ThemedIcon(rtl ? "spam-rtl-symbolic" : "spam-symbolic");
71
73
            
72
74
            case Geary.SpecialFolderType.TRASH:
73
75
                return new ThemedIcon("user-trash-symbolic");
117
119
    }
118
120
    
119
121
    public override int get_count() {
120
 
        return folder.properties.email_unread;
 
122
        if (folder.special_folder_type == Geary.SpecialFolderType.DRAFTS ||
 
123
            folder.special_folder_type == Geary.SpecialFolderType.OUTBOX)
 
124
            return folder.properties.email_total;
 
125
        else
 
126
            return folder.properties.email_unread;
121
127
    }
122
128
}