gchar **uris = uris_from_filelist(list);
gboolean ret = gtk_selection_data_set_uris(selection_data, uris);
- if (!ret)
+ if (!ret)
{
char *str = g_strjoinv("\r\n", uris);
ret = gtk_selection_data_set_text(selection_data, str, -1);
GdkModifierType mask;
gint x, y;
GtkAllocation allocation;
-
+
gtk_widget_get_allocation(button, &allocation);
#if GTK_CHECK_VERSION(3,0,0)
history_list_add_to_key(bm->key, buf, 0);
g_free(buf);
+ buf = bookmark_string(".", g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
+ history_list_add_to_key(bm->key, buf, 0);
+ g_free(buf);
+
path = g_build_filename(homedir(), "Desktop", NULL);
if (isname(path))
{
path = work->data;
work = work->next;
- buf = bookmark_string(name, path, NULL);
+ if (strcmp(name, ".") == 0)
+ {
+ buf = bookmark_string(name, g_strdup(history_list_find_last_path_by_key("path_list")), NULL);
+ }
+ else
+ {
+ buf = bookmark_string(name, path, NULL);
+ }
history_list_add_to_key(bm->key, buf, 0);
g_free(buf);
}
b = bookmark_from_string(work->data);
if (b)
{
+ if (strcmp(b->name, ".") == 0)
+ {
+ gchar *buf;
+
+ b->path = g_strdup(history_list_find_last_path_by_key("path_list"));
+ buf = bookmark_string(".", b->path, b->icon);
+ history_list_item_change("bookmarks", b->key, buf);
+ b->key = g_strdup(buf);
+ g_free(buf);
+ }
GtkWidget *box;
b->button = gtk_button_new();
{
BookMarkData *bm = data;
GList *list = NULL;
+ GList *errors = NULL;
GList *work;
gchar **uris;
if (!bm->editable) return;
uris = gtk_selection_data_get_uris(selection_data);
- list = uri_filelist_from_uris(uris);
+ list = uri_filelist_from_uris(uris, &errors);
+ if(errors)
+ {
+ warning_dialog_dnd_uri_error(errors);
+ string_list_free(errors);
+ }
g_strfreev(uris);
work = list;