[PATCH 3/3] Provide our own sorting functions for regions and timezones (#1025029)

Chris Lumens clumens at redhat.com
Mon Nov 4 15:40:10 UTC 2013


> @@ -327,7 +380,10 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
>          self._citiesFilter.set_visible_func(self.city_in_region, None)
>  
>          self._citiesSort = self.builder.get_object("citiesSort")
> -        self._citiesSort.set_sort_column_id(1, Gtk.SortType.ASCENDING)
> +        self._citiesSort.set_default_sort_func(_compare_cities, None)
> +
> +        self._regionsSort = self.builder.get_object("regionsSort")
> +        self._regionsSort.set_default_sort_func(_compare_regions, None)
>  
>          self._hoursLabel = self.builder.get_object("hoursLabel")
>          self._minutesLabel = self.builder.get_object("minutesLabel")

In testing this, I am curious if you found that setting the sort
function here rather than after the store is populated and then
resorting resulted in a noticeable slow down.  I seem to remember that
happening with various other stores years ago, though I have not checked
since.

- Chris


More information about the anaconda-patches mailing list