Nautilus hard code freeze break request
- From: Christian Neumair <cneumair gnome org>
- To: Release Team <release-team gnome org>
- Subject: Nautilus hard code freeze break request
- Date: Wed, 17 Sep 2008 12:54:49 +0200
The attached patch is supposed to fix bug 552474 [1]. We did not make
the list view a drag source for textual DND, although the DND
infrastructure fully supports text drags.
best regards,
Christian Neumair
[1] http://bugzilla.gnome.org/show_bug.cgi?id=552474
--
Christian Neumair <cneumair gnome org>
Index: src/file-manager/fm-list-view.c
===================================================================
--- src/file-manager/fm-list-view.c (Revision 14629)
+++ src/file-manager/fm-list-view.c (Arbeitskopie)
@@ -493,14 +493,7 @@ motion_notify_callback (GtkWidget *widge
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,
Index: src/file-manager/fm-list-model.c
===================================================================
--- src/file-manager/fm-list-model.c (Revision 14629)
+++ src/file-manager/fm-list-model.c (Arbeitskopie)
@@ -855,10 +855,7 @@ fm_list_model_multi_drag_data_get (EggTr
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->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
Index: src/file-manager/fm-list-model.h
===================================================================
--- src/file-manager/fm-list-model.h (Revision 14629)
+++ src/file-manager/fm-list-model.h (Arbeitskopie)
@@ -118,8 +118,8 @@ void fm_list_model_set_drag
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]