~ubuntu-branches/ubuntu/utopic/unity-place-files/utopic

« back to all changes in this revision

Viewing changes to src/daemon.vala

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-01-21 14:36:22 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20110121143622-t53qh2164ajshlxn
Tags: 0.5.34-0ubuntu1
* New upstream release.
  (Not showing yet in the unity interface)
* debian/control:
  - update build-dep requirements

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *
18
18
 */
19
19
using Dee;
20
 
using DBus;
21
20
using Zeitgeist;
22
21
using Zeitgeist.Timestamp;
23
22
using Unity.Place;
84
83
 
85
84
    construct
86
85
    {
87
 
      sections_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.SectionsModel",
88
 
                                           2, typeof (string), typeof (string));
89
 
 
90
 
      pathbar_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.PathBarModel",
91
 
                                          2, typeof (string), typeof (string));
92
 
 
93
 
      var groups_model = new Dee.SharedModel(
94
 
                                 "com.canonical.Unity.FilesPlace.GroupsModel",
95
 
                                 3, typeof (string), typeof (string),
96
 
                                 typeof (string));
97
 
 
98
 
      var global_groups_model = new Dee.SharedModel(
99
 
                                 "com.canonical.Unity.FilesPlace.GlobalGroupsModel",
100
 
                                 3, typeof (string), typeof (string),
101
 
                                 typeof (string));
102
 
 
103
 
      var results_model = new Dee.SharedModel(
104
 
                                 "com.canonical.Unity.FilesPlace.ResultsModel",
105
 
                                 6, typeof (string), typeof (string),
106
 
                                 typeof (uint), typeof (string),
107
 
                                 typeof (string), typeof (string));
108
 
 
109
 
      var global_results_model = new Dee.SharedModel(
110
 
                                 "com.canonical.Unity.FilesPlace.GlobalResultsModel",
111
 
                                 6, typeof (string), typeof (string),
112
 
                                 typeof (uint), typeof (string),
113
 
                                 typeof (string), typeof (string));
 
86
      sections_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.SectionsModel");
 
87
      sections_model.set_schema ("s", "s");
 
88
 
 
89
      pathbar_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.PathBarModel");
 
90
      pathbar_model.set_schema ("s", "s");
 
91
 
 
92
      var groups_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.GroupsModel");
 
93
      groups_model.set_schema ("s", "s", "s");
 
94
 
 
95
      var global_groups_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.GlobalGroupsModel");
 
96
      global_groups_model.set_schema ("s", "s", "s");
 
97
 
 
98
      var results_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.ResultsModel");
 
99
      results_model.set_schema ("s", "s", "u", "s", "s", "s");
 
100
 
 
101
      var global_results_model = new Dee.SharedModel("com.canonical.Unity.FilesPlace.GlobalResultsModel");
 
102
      global_results_model.set_schema ("s", "s", "u", "s", "s", "s");
114
103
 
115
104
      section_templates = new Gee.ArrayList<PtrArray> ();
116
105
      prepare_section_templates();
132
121
      
133
122
      is_dirty = true;
134
123
      
135
 
      var analyzer = new Dee.Analyzer.for_uint_column (ResultsColumn.GROUP_ID);
 
124
      var analyzer = new Dee.Analyzer.for_uint32_column (ResultsColumn.GROUP_ID);
136
125
      entry_results_by_group = new Dee.HashIndex (results_model,
137
126
                                                  analyzer);
138
127
      global_results_by_group = new Dee.HashIndex (global_results_model,
248
237
          if (!files.active)
249
238
            reset_browsing_state ();
250
239
        }
251
 
      );
252
 
 
253
 
      /* We should not do anything with the results model
254
 
       * until we receieve the 'ready' signal */
255
 
      results_model.ready.connect (this.on_results_model_ready);
256
 
 
257
 
      sections_model.connect ();
258
 
      pathbar_model.connect ();
259
 
      groups_model.connect ();
260
 
      global_groups_model.connect ();
261
 
      results_model.connect ();
262
 
      global_results_model.connect ();            
 
240
      );           
263
241
 
264
242
      /* The last thing we do is export the controller. Once that is up,
265
243
       * clients will expect the SharedModels to work */
269
247
 
270
248
      try {
271
249
        control.export ();
272
 
      } catch (DBus.Error error) {
 
250
      } catch (IOError error) {
273
251
        critical ("Failed to export DBus service for '%s': %s",
274
252
                  control.dbus_path, error.message);
275
253
      }
308
286
          sections.clear ();
309
287
        }
310
288
 
311
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("All Files"),
312
 
                       SectionsColumn.ICON_HINT, "", -1);
313
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Documents"),
314
 
                       SectionsColumn.ICON_HINT, "", -1);
315
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Folders"),
316
 
                       SectionsColumn.ICON_HINT, "", -1);
317
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Images"),
318
 
                       SectionsColumn.ICON_HINT, "", -1);
319
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Audio"),
320
 
                       SectionsColumn.ICON_HINT, "", -1);
321
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Videos"),
322
 
                       SectionsColumn.ICON_HINT, "", -1);
323
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Presentations"),
324
 
                       SectionsColumn.ICON_HINT, "", -1);
325
 
      sections.append (SectionsColumn.DISPLAY_NAME, _("Other"),
326
 
                       SectionsColumn.ICON_HINT, "", -1);
 
289
      sections.append (_("All Files"), "");
 
290
      sections.append ( _("Documents"), "");
 
291
      sections.append (_("Folders"), "");
 
292
      sections.append (_("Images"), "");
 
293
      sections.append (_("Audio"), "");
 
294
      sections.append (_("Videos"), "");
 
295
      sections.append (_("Presentations"), "");
 
296
      sections.append (_("Other"), "");
327
297
    }
328
298
 
329
299
    private void populate_groups ()
340
310
      files.entry_renderer_info.set_hint ("ExpandedGroups",
341
311
                                          @"$((uint)Group.FAVORITE_FOLDERS)");
342
312
 
343
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
344
 
                     GroupsColumn.DISPLAY_NAME, _("Top Results"),
345
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-mostused.svg", -1);
346
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
347
 
                     GroupsColumn.DISPLAY_NAME, _("Recent"),
348
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-recent.svg", -1);
349
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
350
 
                     GroupsColumn.DISPLAY_NAME, _("Downloads"),
351
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-downloads.svg", -1);
352
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
353
 
                     GroupsColumn.DISPLAY_NAME, _("Favorite Folders"),
354
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-favoritefolders.svg", -1);
355
 
      groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
356
 
                     GroupsColumn.DISPLAY_NAME, _("Files"),
357
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-recent.svg", -1);
358
 
      groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer",
359
 
                     GroupsColumn.DISPLAY_NAME, "No search results", /* No i18n. Should never be rendered */
360
 
                     GroupsColumn.ICON_HINT, "", -1);
361
 
      groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer",
362
 
                     GroupsColumn.DISPLAY_NAME, "Empty section", /* No i18n. Should never be rendered */
363
 
                     GroupsColumn.ICON_HINT, "", -1);
364
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
365
 
                     GroupsColumn.DISPLAY_NAME, _("Today"),
366
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
367
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
368
 
                     GroupsColumn.DISPLAY_NAME, _("Yesterday"),
369
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
370
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
371
 
                     GroupsColumn.DISPLAY_NAME, _("This week"),
372
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
373
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
374
 
                     GroupsColumn.DISPLAY_NAME, _("Last Week"),
375
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
376
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
377
 
                     GroupsColumn.DISPLAY_NAME, _("This Month"),
378
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
379
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
380
 
                     GroupsColumn.DISPLAY_NAME, _("Past Six Months"),
381
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
382
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
383
 
                     GroupsColumn.DISPLAY_NAME, _("This Year"),
384
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
385
 
      groups.append (GroupsColumn.RENDERER, "UnityFileInfoRenderer",
386
 
                     GroupsColumn.DISPLAY_NAME, _("Last Year"),
387
 
                     GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
 
313
      groups.append ("UnityFileInfoRenderer",
 
314
                     _("Top Results"),
 
315
                     ICON_PATH + "group-mostused.svg");
 
316
      groups.append ("UnityDefaultRenderer",
 
317
                     _("Recent"),
 
318
                     ICON_PATH + "group-recent.svg");
 
319
      groups.append ("UnityDefaultRenderer",
 
320
                     _("Downloads"),
 
321
                     ICON_PATH + "group-downloads.svg");
 
322
      groups.append ("UnityDefaultRenderer",
 
323
                     _("Favorite Folders"),
 
324
                     ICON_PATH + "group-favoritefolders.svg");
 
325
      groups.append ("UnityDefaultRenderer",
 
326
                     _("Files"),
 
327
                     ICON_PATH + "group-recent.svg");
 
328
      groups.append ("UnityEmptySearchRenderer",
 
329
                     "No search results", /* No i18n. Should never be rendered */
 
330
                     "");
 
331
      groups.append ("UnityEmptySectionRenderer",
 
332
                     "Empty section", /* No i18n. Should never be rendered */
 
333
                     "");
 
334
      groups.append ("UnityFileInfoRenderer",
 
335
                     _("Today"),
 
336
                     ICON_PATH + "group-daterange.svg");
 
337
      groups.append ("UnityFileInfoRenderer",
 
338
                     _("Yesterday"),
 
339
                     ICON_PATH + "group-daterange.svg");
 
340
      groups.append ("UnityFileInfoRenderer",
 
341
                     _("This week"),
 
342
                     ICON_PATH + "group-daterange.svg");
 
343
      groups.append ("UnityFileInfoRenderer",
 
344
                     _("Last Week"),
 
345
                     ICON_PATH + "group-daterange.svg");
 
346
      groups.append ("UnityFileInfoRenderer",
 
347
                     _("This Month"),
 
348
                     ICON_PATH + "group-daterange.svg");
 
349
      groups.append ("UnityFileInfoRenderer",
 
350
                     _("Past Six Months"),
 
351
                     ICON_PATH + "group-daterange.svg");
 
352
      groups.append ("UnityFileInfoRenderer",
 
353
                     _("This Year"),
 
354
                     ICON_PATH + "group-daterange.svg");
 
355
      groups.append ("UnityFileInfoRenderer",
 
356
                     _("Last Year"),
 
357
                     ICON_PATH + "group-daterange.svg");
388
358
      // FIXME: For prehistoric items use actual year, eg "2009"
389
359
 
390
360
 
392
362
      months.add(null);
393
363
      for (uint i = 1; i <= DateMonth.DECEMBER; i++)
394
364
      {
395
 
        unowned Dee.ModelIter iter = groups.append (
396
 
                                  GroupsColumn.RENDERER, "UnityFileInfoRenderer",
397
 
                                  GroupsColumn.DISPLAY_NAME, Utils.get_month_name ((DateMonth)i),
398
 
                                  GroupsColumn.ICON_HINT, ICON_PATH + "group-daterange.svg", -1);
 
365
        unowned Dee.ModelIter iter = groups.append ("UnityFileInfoRenderer",
 
366
                                                    Utils.get_month_name ((DateMonth)i),
 
367
                                                    ICON_PATH + "group-daterange.svg");
399
368
        months.add(iter);
400
369
 
401
370
      }
510
479
      return search.get_search_string () == "";
511
480
    }
512
481
 
513
 
    public void on_results_model_ready (Dee.SharedModel model)
514
 
    {
515
 
      /*var section = (Section)files.active_section;
516
 
      var _results_model = files.entry_renderer_info.results_model;
517
 
      var _groups_model = files.entry_renderer_info.groups_model;
518
 
      update_without_search_async.begin(section, _results_model, _groups_model);*/
519
 
      monitor.events_inserted.connect (on_events_inserted);
520
 
 
521
 
      // FIXME: Use the section queries as monitor templates as well
522
 
      //        and make sure we de-dupe the existing results as updates
523
 
      //        trickle in.
524
 
      //        See https://bugs.launchpad.net/anjali/+bug/598078
525
 
      //log.install_monitor.begin (monitor, null);
526
 
    }
527
 
 
528
482
    private string prepare_search_string (Search? search)
529
483
    {
530
484
      var s = search.get_search_string ();
662
616
              File folder = get_folder_for_pathbar_section (section);
663
617
              try {                 
664
618
                yield activate (folder.get_uri ());
665
 
              } catch (DBus.Error ee) {
 
619
              } catch (IOError ee) {
666
620
                    warning ("Failed to activate URI '%s': %s",
667
621
                             folder.get_uri (), ee.message);
668
622
              }
791
745
        
792
746
        var icon = Utils.get_icon_for_uri (uri, mimetype);
793
747
        
794
 
        results_model.append (ResultsColumn.URI, uri,
795
 
                              ResultsColumn.ICON_HINT, icon,
796
 
                              ResultsColumn.GROUP_ID, Group.FAVORITE_FOLDERS,
797
 
                              ResultsColumn.MIMETYPE, mimetype,
798
 
                              ResultsColumn.DISPLAY_NAME, display_name,
799
 
                              ResultsColumn.COMMENT, uri,
800
 
                              -1);
 
748
        results_model.append (uri, icon, Group.FAVORITE_FOLDERS,
 
749
                              mimetype, display_name, uri);
801
750
      }
802
751
    }
803
752
 
827
776
        var uri = download_dir.get_child (info.get_name ()).get_uri ();
828
777
        var mimetype = info.get_content_type ();
829
778
        var icon_hint = Utils.check_icon_string (uri, mimetype, info);
830
 
        results_model.append (ResultsColumn.URI, uri,
831
 
                              ResultsColumn.ICON_HINT, icon_hint,
832
 
                              ResultsColumn.GROUP_ID, Group.DOWNLOADS,
833
 
                              ResultsColumn.MIMETYPE, mimetype,
834
 
                              ResultsColumn.DISPLAY_NAME, info.get_display_name (),
835
 
                              ResultsColumn.COMMENT, uri,
836
 
                              -1);
 
779
        results_model.append (uri, icon_hint, Group.DOWNLOADS,
 
780
                              mimetype, info.get_display_name (), uri);
837
781
      }
838
782
    }
839
783
 
854
798
            {
855
799
              // FIXME: We only use the first subject...
856
800
              Zeitgeist.Subject su = ev.get_subject(0);
857
 
              if (File.new_for_uri (su.get_uri ()).query_exists ( null ) == true)
 
801
              string mimetype = su.get_mimetype() != null ?
 
802
                                 su.get_mimetype() : "application/octet-stream";
 
803
                                 
 
804
              if (File.new_for_uri (su.get_uri ()).query_exists () == true)
858
805
                {
859
 
                  string icon = Utils.get_icon_for_uri (su.get_uri (),
860
 
                                                        su.get_mimetype ());
 
806
                  string icon = Utils.get_icon_for_uri (su.get_uri (), mimetype);
861
807
                  uint group_id = Utils.get_time_group (ev, groups_model);
862
808
 
863
 
                  debug ("Notify %s, %s, %u", su.get_uri(), su.get_mimetype(), group_id);
 
809
                  debug ("Notify %s, %s, %u", su.get_uri(), mimetype, group_id);
864
810
 
865
 
                  results_model.prepend (ResultsColumn.URI, su.get_uri(),
866
 
                                         ResultsColumn.ICON_HINT, icon,
867
 
                                         ResultsColumn.GROUP_ID, group_id,
868
 
                                         ResultsColumn.MIMETYPE, su.get_mimetype(),
869
 
                                         ResultsColumn.DISPLAY_NAME, su.get_text(),
870
 
                                         ResultsColumn.COMMENT, su.get_uri (),
871
 
                                         -1);
 
811
                  results_model.prepend (su.get_uri(), icon, group_id,
 
812
                                         mimetype, su.get_text(),
 
813
                                         su.get_uri ());
872
814
                }
873
815
            }
874
816
        }
982
924
        var mimetype = info.get_content_type ();
983
925
        var icon_hint = Utils.check_icon_string (uri, mimetype, info);
984
926
        debug ("Found child: %s", uri);
985
 
        results_model.append (ResultsColumn.URI, uri,
986
 
                              ResultsColumn.ICON_HINT, icon_hint,
987
 
                              ResultsColumn.GROUP_ID, 0, // FIXME: which group for folder browsing?
988
 
                              ResultsColumn.MIMETYPE, mimetype,
989
 
                              ResultsColumn.DISPLAY_NAME, info.get_display_name (),
990
 
                              ResultsColumn.COMMENT, uri, // FIXME: Relative path from $HOME
991
 
                              -1);
 
927
        results_model.append (uri, icon_hint, 0, // FIXME: which group for folder browsing?
 
928
                              mimetype, info.get_display_name (), uri);
992
929
      }
993
930
      
994
931
      yield update_pathbar_model (folder);
1004
941
      File parent = folder;
1005
942
      FileInfo finfo;      
1006
943
      do {
1007
 
            try {
1008
 
                  if (parent.get_path () == home_path)
1009
 
                        break;
1010
 
                  
1011
 
              finfo = parent.query_info (Utils.file_attribs,
1012
 
                                         FileQueryInfoFlags.NONE);
 
944
        try {
 
945
          if (parent.get_path () == home_path)
 
946
            break;
 
947
 
 
948
          finfo = parent.query_info (Utils.file_attribs,
 
949
                                           FileQueryInfoFlags.NONE);
1013
950
        } catch (GLib.Error e) {
1014
 
              warning ("Failed to compute breadcrumb path: %s", e.message);  
1015
 
              break;
 
951
          warning ("Failed to compute breadcrumb path: %s", e.message);  
 
952
                break;
1016
953
        }
1017
 
        pathbar_model.prepend (0, finfo.get_display_name (), 1, "", -1);
 
954
        pathbar_model.prepend (finfo.get_display_name (), "");
1018
955
      } while ((parent = parent.get_parent ()) != null);
 
956
      
1019
957
      string section_name = sections_model.get_string (sections_model.get_iter_at_row (browsing_root), 0);
1020
 
      pathbar_model.prepend (0, section_name, -1);
 
958
      pathbar_model.prepend (section_name, "");
1021
959
    }
1022
960
    
1023
961
    /* Calculates the file URI of the path currently being browsed,
1075
1013
      if (search_is_invalid(search))
1076
1014
        return;
1077
1015
      
1078
 
      results_model.append (ResultsColumn.URI, "",
1079
 
                            ResultsColumn.ICON_HINT, "",
1080
 
                            ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
1081
 
                            ResultsColumn.MIMETYPE, "",
1082
 
                            ResultsColumn.DISPLAY_NAME, _("Your search did not match any files"),
1083
 
                            ResultsColumn.COMMENT, "",
1084
 
                            -1);      
 
1016
      results_model.append ("", "", Group.EMPTY_SEARCH,
 
1017
                            "", _("Your search did not match any files"), "");      
1085
1018
      
1086
1019
      // FIXME: Use prefered browser
1087
1020
      // FIXME: URL escape search string
1088
 
      results_model.append (ResultsColumn.URI, @"http://google.com/#q=$(search.get_search_string())",
1089
 
                            ResultsColumn.ICON_HINT, "",
1090
 
                            ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
1091
 
                            ResultsColumn.MIMETYPE, "",
1092
 
                            ResultsColumn.DISPLAY_NAME, _("Search the web"),
1093
 
                            ResultsColumn.COMMENT, "",
1094
 
                            -1);
 
1021
      results_model.append (@"http://google.com/#q=$(search.get_search_string())",
 
1022
                            "", Group.EMPTY_SEARCH,
 
1023
                            "", _("Search the web"), "");
1095
1024
    }
1096
1025
    
1097
1026
    public void check_empty_section (Section section,
1134
1063
          break;
1135
1064
      }
1136
1065
      
1137
 
      results_model.append (ResultsColumn.URI, "",
1138
 
                            ResultsColumn.ICON_HINT, "",
1139
 
                            ResultsColumn.GROUP_ID, Group.EMPTY_SECTION,
1140
 
                            ResultsColumn.MIMETYPE, "",
1141
 
                            /* TRANSLATORS: The %s is plural. Eg. "files" */
1142
 
                            ResultsColumn.DISPLAY_NAME, _("There are no %s in your Home folder").printf (section_name),
1143
 
                            ResultsColumn.COMMENT, "",
1144
 
                            -1);
 
1066
      results_model.append ("", "", Group.EMPTY_SECTION, "",
 
1067
                            _("There are no %s in your Home folder").printf (section_name), /* TRANSLATORS: The %s is plural. Eg. "files" */
 
1068
                            "");
1145
1069
    }
1146
1070
    
1147
1071
  } /* End: Daemon class */
1165
1089
              
1166
1090
              string uri = su.get_uri ();
1167
1091
                  string display_name = su.get_text ();
1168
 
                  string mimetype = su.get_mimetype ();
 
1092
                  string mimetype = su.get_mimetype () != null ?
 
1093
                                su.get_mimetype () : "application/octet-stream";
1169
1094
                  
1170
1095
                  /* De-dup the results keyed on the subject URIs */
1171
1096
              if (uri in seen_uris)
1173
1098
              seen_uris.add (uri);
1174
1099
              
1175
1100
              if (File.new_for_uri (su.get_uri ()).query_exists ( null ) == true)
1176
 
               {
1177
 
                  
1178
 
                  
 
1101
               {                                   
1179
1102
                  if (section == Section.FOLDERS)
1180
1103
                    {
1181
1104
                      File dir = File.new_for_uri(uri).get_parent();
1207
1130
                    }
1208
1131
                  
1209
1132
                  //debug ("Got %s, %s, %u, %s", su.get_uri(), su.get_mimetype(), group_id, icon);
1210
 
                  results.append (ResultsColumn.URI, uri,
1211
 
                                  ResultsColumn.ICON_HINT, icon,
1212
 
                                  ResultsColumn.GROUP_ID, group_id,
1213
 
                                  ResultsColumn.MIMETYPE, mimetype,
1214
 
                                  ResultsColumn.DISPLAY_NAME, display_name,
1215
 
                                  ResultsColumn.COMMENT, comment,
1216
 
                                  -1);
 
1133
                  results.append (uri, icon, group_id, mimetype,
 
1134
                                  display_name, comment);
1217
1135
                }
1218
1136
            }
1219
1137
        }