← Back to team overview

zim-wiki team mailing list archive

Re: Zim release 0.55: call for translators and testers


Jaap, you're the man!  Zim just keeps getting better and better.  I
use it every day and am using it for all of my university notes,
tasks, projects, etc.  It's so great to have everything in one place,
stored as plain text, and it's so much better than using a plain
editor on plain files.  Org-mode is cool, but for a non-emacs user,
it's just a bit much.  Zim is just right.

It's funny: I hacked up the recent pages pathbar to show only the last
12 pages and display them in alphabetical order, and then when I
pulled your updates, you'd already done most of it, except much
better.  :)  Here's my patch against rev498.  I think that sorting
alphabetically works better for the Recent Pages mode, because if you
switch back and forth between a few pages, as I often do, they don't
jump around in the bar--so it acts like a "smart" tab bar,
automatically removing pages you haven't accessed in a while, but
keeping those you do often access in the same spot for easy access.

On Tue, Feb 21, 2012 at 04:06, Jaap Karssenberg
<jaap.karssenberg@xxxxxxxxx> wrote:
> On Tue, Feb 21, 2012 at 11:01 AM, Svenn Are Bjerkem
> <svenn.bjerkem@xxxxxxxxxxxxxx> wrote:
>> On 20 February 2012 13:00, Jaap Karssenberg <jaap.karssenberg@xxxxxxxxx>
>> wrote:
>> > * The page index now has "natural" sorting, so "9" goes before "10" and
>> > "ångström" goes in between "A" and "B"
>> Why is Å sorted after A and before B? I really thought it should be sorted
>> last.
> Actually it is locale dependent. Default collation defines Å as "equivalent
> to A" for sorting. But under your locale it may be defined different (and
> hopefully correct for your language).
> From my testing anything that looks like latin characters, but has some
> accent of some kind is sorted with the latin character equivalent. All
> non-latin character sets (hebrew, greek, etc.) are sorted in their own range
> after the latin characters.
> -- Jaap
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
=== modified file 'zim/gui/pathbar.py'
--- zim/gui/pathbar.py	2012-02-13 21:11:00 +0000
+++ zim/gui/pathbar.py	2012-02-22 02:01:48 +0000
@@ -7,6 +7,7 @@ import gtk
 import gobject
 from zim.gui.widgets import encode_markup_text
+from operator import attrgetter
 # Constants
@@ -489,7 +490,7 @@ class RecentPathBar(PathBar):
 		# TODO enforce max number of paths shown
 		paths = list(self.history.get_recent())
-		return paths
+		return sorted(paths, key=attrgetter('basename'))
 class NamespacePathBar(PathBar):

Follow ups