~jbicha/unity-lens-files/dont-recommend-uoa

« back to all changes in this revision

Viewing changes to src/daemon.vala

  • Committer: Tarmac
  • Author(s): Mihai Capotă
  • Date: 2013-06-21 20:49:58 UTC
  • mfrom: (198.2.1 unity-lens-files)
  • Revision ID: tarmac-20130621204958-foe7zx5jsofjvd4f
Use base-10 units for file size. Fixes: https://bugs.launchpad.net/bugs/882352.

Approved by PS Jenkins bot, Mihai Capotă, Michael Terry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
      {
175
175
        var filter = new MultiRangeFilter ("size", _("Size"));
176
176
 
177
 
        filter.add_option ("1KB", _("1KB"));
178
 
        filter.add_option ("100KB", _("100KB"));
 
177
        filter.add_option ("1kB", _("1kB"));
 
178
        filter.add_option ("100kB", _("100kB"));
179
179
        filter.add_option ("1MB", _("1MB"));
180
180
        filter.add_option ("10MB", _("10MB"));
181
181
        filter.add_option ("100MB", _("100MB"));
700
700
      int64[] sizes =
701
701
      {
702
702
        0,
703
 
        1024,
704
 
        102400,
705
 
        1048576,
706
 
        10485760,
707
 
        104857600,
708
 
        1073741824,
 
703
        1000,
 
704
        100000,
 
705
        1000000,
 
706
        10000000,
 
707
        100000000,
 
708
        1000000000,
709
709
        int64.MAX
710
710
      };
711
711
 
712
712
      switch (min_opt.id)
713
713
      {
714
 
        case "1KB":
 
714
        case "1kB":
715
715
          min_size = sizes[0]; break;
716
 
        case "100KB":
 
716
        case "100kB":
717
717
          min_size = sizes[1]; break;
718
718
        case "1MB":
719
719
          min_size = sizes[2]; break;
733
733
 
734
734
      switch (max_opt.id)
735
735
      {
736
 
        case "1KB":
 
736
        case "1kB":
737
737
          max_size = sizes[1]; break;
738
 
        case "100KB":
 
738
        case "100kB":
739
739
          max_size = sizes[2]; break;
740
740
        case "1MB":
741
741
          max_size = sizes[3]; break;