static PixmapFolders *folder_icons_new(GtkWidget *widget)
{
PixmapFolders *pf = g_new0(PixmapFolders, 1);
-
+
#if 1
GtkIconSize size = GTK_ICON_SIZE_MENU;
g_free(base);
file_util_rename_dir(fd, new_path, vd->view, vd_rename_finished_cb, vd);
-
+
g_free(new_path);
return FALSE;
const gchar *path;
GList *list;
const gchar *key;
-
+
if (!vd->drop_fd) return;
-
+
key = g_object_get_data(G_OBJECT(widget), "filter_key");
path = vd->drop_fd->path;
const EditorDescription *editor = work->data;
gchar *key;
work = work->next;
-
+
if (!editor_is_filter(editor->key)) continue;
key = g_strdup(editor->key);
item = menu_item_add_sensitive(menu, editor->name, active, G_CALLBACK(vd_drop_menu_filter_cb), vd);
g_object_set_data_full(G_OBJECT(item), "filter_key", key, vd_drop_menu_edit_item_free);
}
-
+
g_list_free(editors_list);
menu_item_add_divider(menu);
GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd)
{
GtkWidget *menu;
- GtkWidget *item;
gboolean active;
gboolean rename_delete_active = FALSE;
gboolean new_folder_active = FALSE;
menu_item_add_divider(menu);
- item = menu_item_add_radio(menu, _("View as _List"), GINT_TO_POINTER(DIRVIEW_LIST), vd->type == DIRVIEW_LIST,
- G_CALLBACK(vd_pop_submenu_dir_view_as_cb), vd);
+ menu_item_add_radio(menu, _("View as _List"), GINT_TO_POINTER(DIRVIEW_LIST), vd->type == DIRVIEW_LIST,
+ G_CALLBACK(vd_pop_submenu_dir_view_as_cb), vd);
- item = menu_item_add_radio(menu, _("View as _Tree"), GINT_TO_POINTER(DIRVIEW_TREE), vd->type == DIRVIEW_TREE,
- G_CALLBACK(vd_pop_submenu_dir_view_as_cb), vd);
+ menu_item_add_radio(menu, _("View as _Tree"), GINT_TO_POINTER(DIRVIEW_TREE), vd->type == DIRVIEW_TREE,
+ G_CALLBACK(vd_pop_submenu_dir_view_as_cb), vd);
menu_item_add_divider(menu);
{
ViewDir *vd = data;
GList *list;
- gchar *uritext = NULL;
- gint length = 0;
if (!vd->click_fd) return;
case TARGET_URI_LIST:
case TARGET_TEXT_PLAIN:
list = g_list_prepend(NULL, vd->click_fd);
- uritext = uri_text_from_filelist(list, &length, (info == TARGET_TEXT_PLAIN));
+ uri_selection_data_set_uris_from_filelist(selection_data, list);
g_list_free(list);
break;
}
- if (uritext)
- {
- gtk_selection_data_set_text(selection_data, uritext, length);
- g_free(uritext);
- }
}
static void vd_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointer data)
gint active;
gboolean done = FALSE;
- list = uri_filelist_from_text((gchar *)gtk_selection_data_get_data(selection_data), TRUE);
+ list = uri_filelist_from_gtk_selection_data(selection_data);
if (!list) return;
active = access_file(fd->path, W_OK | X_OK);
g_free(source_base);
}
}
-
+
if (refresh) vd_refresh(vd);
}