~ubuntu-desktop/unity-lens-files/precise

« back to all changes in this revision

Viewing changes to src/locate.vala

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-03-23 15:05:24 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20120323150524-c21y3llquexksyfm
Tags: 5.8.0-0ubuntu1
* New upstream release.
  - clicking on folders in the file lens does not open nautilus
    (LP: #921665)
  - Dash - No message displayed when no results are returned in the
    Dash (LP: #711199)
  - Privacy Delete history is not deleting download history (LP: #947856)
  - Locate scope doesn't respect privacy settings (LP: #955229)
  - \\192.168.1.x opens http:\\192.168.1.x in firefox as opposed to
    smb://192.168.1.x in nautilus (LP: #773841)
  - Web url regexp matches non url (LP: #948086)
* debian/control:
  - build-dep on newer zeitgeist

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
      FILE_ATTRIBUTE_ACCESS_CAN_WRITE + "," +
37
37
      FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE;
38
38
 
 
39
  private BlacklistTracker blacklist_tracker;
 
40
 
39
41
  public async GLib.SList<FileInfo> locate (string input_query,
40
42
                                            Cancellable cancellable) throws Error
41
43
  {
 
44
    if (blacklist_tracker == null) blacklist_tracker = new BlacklistTracker ();
42
45
    var result = new GLib.SList<FileInfo> ();
43
46
    var query = Regex.escape_string (input_query.strip ());
44
47
 
65
68
      if ("/." in line) continue; // we don't want no hidden files
66
69
 
67
70
      var file = File.new_for_path (line);
 
71
      var uri = file.get_uri ();
 
72
 
 
73
      bool skip = false;
 
74
      foreach (var blacklisted_uri in blacklist_tracker.get_blacklisted_uris ())
 
75
      {
 
76
        if (uri.has_prefix (blacklisted_uri))
 
77
        {
 
78
          skip = true;
 
79
          break;
 
80
        }
 
81
      }
 
82
      if (skip) continue;
 
83
 
68
84
      var fi = yield file.query_info_async (ATTRIBS, 0, Priority.DEFAULT_IDLE,
69
85
                                            cancellable);
70
86
      if (fi.get_is_hidden () || fi.get_is_backup () ||