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

« back to all changes in this revision

Viewing changes to src/client/ui/folder-menu.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:
17
17
    }
18
18
    
19
19
    public void add_folder(Geary.Folder folder) {
 
20
        // don't allow multiples and don't allow folders that can't be opened (that means they
 
21
        // support almost no operations and have no content)
 
22
        if (folder_list.contains(folder) || folder.properties.is_openable.is_impossible())
 
23
            return;
 
24
        
 
25
        // also don't allow local-only or virtual folders, which also have a limited set of
 
26
        // operations
 
27
        if (folder.properties.is_local_only || folder.properties.is_virtual)
 
28
            return;
 
29
        
20
30
        folder_list.add(folder);
21
31
        folder_list.sort(folder_sort);
22
32