Commit 679fdc5e authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Enable text drag target for list view. Fixes #552474.

2008-09-17  Christian Neumair  <cneumair@gnome.org>

	* src/file-manager/fm-list-model.c
	(fm_list_model_multi_drag_data_get),
	(fm_list_model_get_drag_target_list):
	* src/file-manager/fm-list-model.h:
	* src/file-manager/fm-list-view.c (motion_notify_callback):
	Enable text drag target for list view. Fixes #552474.

svn path=/trunk/; revision=14634
parent de35d2a7
2008-09-17 Christian Neumair <cneumair@gnome.org>
* src/file-manager/fm-list-model.c
(fm_list_model_multi_drag_data_get),
(fm_list_model_get_drag_target_list):
* src/file-manager/fm-list-model.h:
* src/file-manager/fm-list-view.c (motion_notify_callback):
Enable text drag target for list view. Fixes #552474.
2008-09-17 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-file.c (nautilus_file_rename):
......
......@@ -855,10 +855,7 @@ fm_list_model_multi_drag_data_get (EggTreeMultiDragSource *drag_source,
context.path_list = path_list;
if (!drag_target_list) {
drag_target_list = gtk_target_list_new
(drag_types, G_N_ELEMENTS (drag_types));
gtk_target_list_add_text_targets (
drag_target_list, NAUTILUS_ICON_DND_TEXT);
drag_target_list = fm_list_model_get_drag_target_list ();
}
if (gtk_target_list_find (drag_target_list,
......@@ -1461,12 +1458,15 @@ fm_list_model_set_drag_view (FMListModel *model,
model->details->drag_begin_y = drag_begin_y;
}
void
fm_list_model_get_drag_types (const GtkTargetEntry **entries,
int *num_entries)
GtkTargetList *
fm_list_model_get_drag_target_list ()
{
*entries = drag_types;
*num_entries = G_N_ELEMENTS (drag_types);
GtkTargetList *target_list;
target_list = gtk_target_list_new (drag_types, G_N_ELEMENTS (drag_types));
gtk_target_list_add_text_targets (target_list, NAUTILUS_ICON_DND_TEXT);
return target_list;
}
int
......
......@@ -118,8 +118,8 @@ void fm_list_model_set_drag_view (FMListModel *model,
int begin_x,
int begin_y);
void fm_list_model_get_drag_types (const GtkTargetEntry **entries,
int *num_entries);
GtkTargetList * fm_list_model_get_drag_target_list (void);
int fm_list_model_compare_func (FMListModel *model,
NautilusFile *file1,
NautilusFile *file2);
......
......@@ -493,14 +493,7 @@ motion_notify_callback (GtkWidget *widget,
if (view->details->drag_button != 0) {
if (!source_target_list) {
const GtkTargetEntry *drag_types;
int n_drag_types;
fm_list_model_get_drag_types (&drag_types,
&n_drag_types);
source_target_list = gtk_target_list_new (drag_types,
n_drag_types);
source_target_list = fm_list_model_get_drag_target_list ();
}
if (gtk_drag_check_threshold (widget,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment