projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Retrieve image attachments asynchronously to avoid hanging UI
[modest]
/
src
/
widgets
/
modest-dnd.c
diff --git
a/src/widgets/modest-dnd.c
b/src/widgets/modest-dnd.c
index
291239f
..
557cb42
100644
(file)
--- a/
src/widgets/modest-dnd.c
+++ b/
src/widgets/modest-dnd.c
@@
-28,7
+28,7
@@
*/
#include "modest-dnd.h"
*/
#include "modest-dnd.h"
-#include <gtk/gtktreeview.h>
+#include <gtk/gtk.h>
#include <string.h>
GdkAtom tree_path_as_string_list_atom;
#include <string.h>
GdkAtom tree_path_as_string_list_atom;
@@
-50,20
+50,18
@@
modest_dnd_selection_data_set_paths (GtkSelectionData *selection_data,
if (selection_data->target == tree_path_as_string_list_atom) {
GString *list;
if (selection_data->target == tree_path_as_string_list_atom) {
GString *list;
- gint i;
gchar *result;
GList *row;
row = selected_rows;
list = g_string_new (NULL);
gchar *result;
GList *row;
row = selected_rows;
list = g_string_new (NULL);
- for (i = 0; i<g_list_length(selected_rows) - 1; i++) {
+ while (row != NULL) {
g_string_append (list, gtk_tree_path_to_string (row->data));
g_string_append (list, gtk_tree_path_to_string (row->data));
- g_string_append (list, "\n");
row = g_list_next (row);
row = g_list_next (row);
+ if (row != NULL)
+ g_string_append (list, "\n");
}
}
- /* Do not include the delimiter in the last one */
- g_string_append (list, gtk_tree_path_to_string (row->data));
result = g_strdup (list->str);
g_string_free (list, TRUE);
result = g_strdup (list->str);
g_string_free (list, TRUE);