Hi,
Latest SVN has the email:// -> .desktop code, but doesn't have the code
for calling it :/. Therefore it still crashes on email D&D, so heres a
patch re-enabling the email d&d code.
Regards,
Neil
Index: tracker-search-tool-callbacks.c
===================================================================
--- tracker-search-tool-callbacks.c (revision 515)
+++ tracker-search-tool-callbacks.c (working copy)
@@ -1300,6 +1300,7 @@ drag_file_cb (GtkWidget * widget,
gboolean no_files_found = FALSE;
gchar * utf8_name;
gchar * utf8_path;
+ gchar * utf8_uri;
gchar * file;
gtk_tree_model_get_iter (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
@@ -1308,13 +1309,15 @@ drag_file_cb (GtkWidget * widget,
gtk_tree_model_get (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
COLUMN_NAME, &utf8_name,
COLUMN_PATH, &utf8_path,
+ COLUMN_URI, &utf8_uri,
COLUMN_NO_FILES_FOUND, &no_files_found,
-1);
file = g_build_filename (utf8_path, utf8_name, NULL);
if (!no_files_found) {
- gchar * tmp_uri = g_filename_to_uri (file, NULL, NULL);
+ gchar * tmp_uri = NULL;
+ tmp_uri = g_filename_to_uri (file, NULL, NULL);
if (uri_list == NULL) {
uri_list = g_strdup (tmp_uri);
@@ -1322,11 +1325,22 @@ drag_file_cb (GtkWidget * widget,
else {
uri_list = g_strconcat (uri_list, "\n", tmp_uri, NULL);
}
- gtk_selection_data_set (selection_data,
+ if (gsearch->type < 10) {
+ gtk_selection_data_set (selection_data,
+ selection_data->target,
+ 8,
+ (guchar *) uri_list,
+ strlen (uri_list));
+ } else {
+ gchar *desktop_uri;
+ desktop_uri = make_email_desktop_file (utf8_uri, utf8_name);
+ gtk_selection_data_set (selection_data,
selection_data->target,
8,
- (guchar *) uri_list,
- strlen (uri_list));
+ (guchar *) desktop_uri,
+ strlen (desktop_uri));
+ g_free (desktop_uri);
+ }
g_free (tmp_uri);
}
else {
@@ -1334,6 +1348,7 @@ drag_file_cb (GtkWidget * widget,
}
g_free (utf8_name);
g_free (utf8_path);
+ g_free (utf8_uri);
g_free (file);
}
g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list