[PATCH] thread/sort/display issues

Dennis Preiser <[email protected]> Mon, 1 Mar 2010 19:28:30 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
Attached patch does this:

- options_menu.c:config_page(): Moved some postprocessing code
  (sorting/threading options) into the GLOBAL_QUIT/CONFIG_NO_SAVE case.
  Main issue here: After deleting/adding/renaming a scope, we don't know
  whether the current group is affected or not, so, if we are at group
  level or below, things went wrong. Now, we keep a copy of that
  attributes and compare against them on exit.

  This has to be done for all attributes which needs postprocessing to
  reflect the changes immediately (not finnished, show_signatures,
  news_headers_to[_not]_display... comes to mind).
  
  Fixed this for tinrc options which needs recooking at page level and
  are not available as attributes.

- group level and below: arts[] may be reordered after calling
  make_threads(). Thus, we have to keep a copy of the artnum before and
  find the new index into arts[] afterwards, otherwise we lost the
  screen position. find_artnum() does this, takes an artnum and returns
  the index into arts[]. Done for GLOBAL_OPTION_MENU.
  
  This has to be done for the various FILTER cases too (group, thread,
  page level). I'll send a patch within the next days.

- Removed top_art from find_new_pos(), top_art does not change in group
  or thread level, so the comparison is pointless. In other words:
  find_new_pos() never did anything but returning the given cur_pos.
  Fortunately, that has covered a bug: which_thread() was called with an
  artnum instead of an index in arts[]. 

Minor changes:

- group.c:toggle_read_unread(): Do bool_not() only if 'force' is not
  set.

- attrib.c:assign_attributes_to_groups(): Added an spinning cursor to
  indicate progress.

- Inserted some clear_message() to build proper pairs wait_message() <->
  clear_message().

Dennis
20100301_r2.diff.gz (application/x-gunzip, 4.7 KB) - not displayed