106
106
iface->init = miner_applications_initable_init;
110
miner_applications_basedir_add (TrackerMinerFS *fs,
111
const gchar *basedir)
116
/* Add $dir/applications */
117
path = g_build_filename (basedir, "applications", NULL);
118
file = g_file_new_for_path (path);
119
g_message (" Adding:'%s'", path);
120
tracker_miner_fs_directory_add (fs, file, TRUE);
121
g_object_unref (file);
124
/* Add $dir/desktop-directories */
125
path = g_build_filename (basedir, "desktop-directories", NULL);
126
file = g_file_new_for_path (path);
127
g_message (" Adding:'%s'", path);
128
tracker_miner_fs_directory_add (fs, file, TRUE);
129
g_object_unref (file);
110
134
miner_applications_initable_init (GInitable *initable,
111
135
GCancellable *cancellable,
114
138
TrackerMinerFS *fs;
116
139
GError *inner_error = NULL;
140
#ifdef HAVE_MEEGOTOUCH
143
#endif /* HAVE_MEEGOTOUCH */
144
const gchar * const *xdg_dirs;
145
const gchar *user_data_dir;
118
148
fs = TRACKER_MINER_FS (initable);
126
file = g_file_new_for_path ("/usr/share/applications/");
127
tracker_miner_fs_directory_add (fs, file, TRUE);
128
g_object_unref (file);
130
file = g_file_new_for_path ("/usr/share/desktop-directories/");
131
tracker_miner_fs_directory_add (fs, file, TRUE);
132
g_object_unref (file);
156
g_message ("Setting up applications to iterate from XDG system directories");
158
/* Add all XDG system and local dirs */
159
xdg_dirs = g_get_system_data_dirs ();
161
for (i = 0; xdg_dirs[i]; i++) {
162
miner_applications_basedir_add (fs, xdg_dirs[i]);
165
g_message ("Setting up applications to iterate from XDG user directories");
167
user_data_dir = g_get_user_data_dir ();
169
miner_applications_basedir_add (fs, user_data_dir);
134
172
#ifdef HAVE_MEEGOTOUCH
135
file = g_file_new_for_path ("/usr/lib/duicontrolpanel/");
173
/* NOTE: We don't use miner_applications_basedir_add() for
174
* this location because it is unique to MeeGoTouch.
176
path = "/usr/lib/duicontrolpanel/";
178
g_message ("Setting up applications to iterate from MeegoTouch directories");
179
g_message (" Adding:'%s'", path);
181
file = g_file_new_for_path (path);
136
182
tracker_miner_fs_directory_add (fs, file, TRUE);
137
183
g_object_unref (file);
138
184
tracker_miner_applications_meego_init ();
139
185
#endif /* HAVE_MEEGOTOUCH */
141
/* FIXME: Check XDG_DATA_DIRS and also process applications in there */
890
934
"name", "Applications",
891
935
"processing-pool-wait-limit", 10,
892
936
"processing-pool-ready-limit", 100,
893
"processing-pool-requests-limit", 10,