pan-users
[Top][All Lists]
Advanced

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

[Pan-users] store scroll position per group


From: Danny Milosavljevic
Subject: [Pan-users] store scroll position per group
Date: Thu, 15 Jun 2006 21:13:09 +0000 (UTC)
User-agent: pan 0.99 ("Fat man, you shoot a great game of pool.")

Hi,

I'm still catching up with the old posts in the newsgroups I am
subscribed to and so it usually happens that I stop somewhere in the middle
of the thread treeview at the end of the day (like, with 300 unread posts).

Now, every time I close and reopen pan or just switch the newsgroup, the
tree view cursor will be reset to the first row... baaad.

So I suggest to store and restore the cursor position in the threads view.

Something along the lines of:

before_close_group:
  path, column = threads_view.get_cursor()  
  if path:
    iter = threads_view.model.get_iter(path)
    message_id = threads_view.model.get(iter, MESSAGE_ID)
    store message_id to per-group file.

after_open_group:
  cursor_message_id = message_id from per-group file.
  iter = find row where message_id = cursor_message_id in
  threads_view.model
  if iter:
    path = threads_view.model.get_path(iter)
    threads_view.set_cursor(path, None)

What do you think?

(I could take a stab at writing a patch later once I am more familiar with
the pan codebase...)

cheers,
  Danny





reply via email to

[Prev in Thread] Current Thread [Next in Thread]