Re: [Nautilus-list] [PATCH] for bug 77174 (Nautilus sorts in opposite order when "sort in reverse order" chosen)



May I commit now?

On Sun, 2002-04-07 at 21:03, David Emory Watson wrote:
> I think your right that we should pick GTK_SORT_ASCENDING for the
> default.  Unfortunately, when I do this, I see the following bug (not
> present otherwise):
> 
[snip, bug fixed]
> 
> I don't quite understand why this happens when GTK_SORT_ASCENDING means
> reversed but not when GTK_SORT_DESCENDING means reversed.  I will look
> further...

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5183
diff -p -u -r1.5183 ChangeLog
--- ChangeLog	7 Apr 2002 21:25:19 -0000	1.5183
+++ ChangeLog	8 Apr 2002 06:56:02 -0000
@@ -1,3 +1,21 @@
+2002-04-07  David Emory Watson  <dwatson cs ucr edu>
+
+	* src/file-manager/fm-list-model.c:
+	(fm_list_model_add_file): Fix mixed up comparison.
+	(set_sort_order_from_metadata_and_preferences),
+	(fm_list_view_reset_to_defaults): Should be GTK_SORT_DESCENDING when
+	sort_reversed, bug 77174.
+	src/file-manager/fm-list-view.c: Oops, I screwed up the disconnect
+	last time...
+
 2002-04-06  David Emory Watson  <dwatson cs ucr edu>
 
  	* src/file-manager/fm-list-model.c:
@@ -17,7 +35,7 @@
 	Make NAUTILUS_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT a
 	EEL_PREFERENCE_ITEM_ENUMERATION_MENU_INTEGER.
 
-2002-03-30  David Emory Watson  <dwatson cs ucr edu>
+2002-04-05  David Emory Watson  <dwatson cs ucr edu>
 
 	This fixes single click activation in the list view, bug 76197.
 
Index: src/file-manager/fm-list-model.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-model.c,v
retrieving revision 1.7
diff -p -u -r1.7 fm-list-model.c
--- src/file-manager/fm-list-model.c	11 Mar 2002 10:17:49 -0000	1.7
+++ src/file-manager/fm-list-model.c	8 Apr 2002 06:56:11 -0000
@@ -525,9 +525,8 @@ fm_list_model_add_file (FMListModel *mod
 	else {
 		for (tmp = model->details->files; tmp; tmp = tmp->next) {
 			file1 = tmp->data;
-			
-			
-			result = nautilus_file_compare_for_sort (file1, file,
+
+			result = nautilus_file_compare_for_sort (file, file1,
 								 fm_list_model_get_nautilus_file_sort_type (model),
 								 model->details->sort_directories_first,
 								 (model->details->order == GTK_SORT_DESCENDING));
Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.164
diff -p -u -r1.164 fm-list-view.c
--- src/file-manager/fm-list-view.c	5 Apr 2002 18:25:57 -0000	1.164
+++ src/file-manager/fm-list-view.c	8 Apr 2002 06:56:13 -0000
@@ -263,8 +263,7 @@ create_and_set_up_tree_view (FMListView 
 	/* Set up underline of file name. */
 	view->details->file_name_cell = (GtkCellRendererText *)cell;
 	eel_preferences_add_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
-				      click_policy_changed,
-				      view);
+				      click_policy_changed, view);
 	click_policy_changed (view);
 
 	/* Create the size column */
@@ -332,7 +331,7 @@ set_sort_order_from_metadata_and_prefere
 
 	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_view->details->model),
 					      sort_column_id,
-					      sort_reversed ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
+					      sort_reversed ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING);
 }
 
 static void
@@ -451,7 +450,7 @@ fm_list_view_reset_to_defaults (FMDirect
 	gtk_tree_sortable_set_sort_column_id
 		(GTK_TREE_SORTABLE (FM_LIST_VIEW (view)->details->model),
 		 fm_list_model_get_sort_column_id_from_sort_type (default_sort_order_auto_value),
-		 default_sort_reversed_auto_value ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
+		 default_sort_reversed_auto_value ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING);
         fm_directory_view_restore_default_zoom_level (view);
 }
 
@@ -531,8 +530,7 @@ fm_list_view_finalize (GObject *object)
 	list_view = FM_LIST_VIEW (object);
 
 	eel_preferences_remove_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
-					 click_policy_changed,
-					 list_view->details->file_name_cell);
+					 click_policy_changed, list_view);
 
 	g_free (list_view->details);
 
@@ -583,7 +581,7 @@ fm_list_view_class_init (FMListViewClass
         fm_directory_view_class->emblems_changed = fm_list_view_emblems_changed;
 	fm_directory_view_class->sort_directories_first_changed = fm_list_view_sort_directories_first_changed;
 	fm_directory_view_class->start_renaming_file = fm_list_view_start_renaming_file;
-	
+
 	eel_preferences_add_auto_enum (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_SORT_ORDER,
 				       (int *) &default_sort_order_auto_value);
 	eel_preferences_add_auto_boolean (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]