Difference between revisions of "Adding new sorting key"

From Vifm Wiki
Jump to: navigation, search
(Initial version of the page)
 
(Describe why it's important to add new elements to the end.)
 
Line 1: Line 1:
# Update <code>SK_*</code> items in <code>ui/ui.h</code>, that is add new value to the end of the list and update <code>SK_LAST</code>.
+
# Update <code>SK_*</code> items in <code>ui/ui.h</code>, that is add new value to the end of the list and update <code>SK_LAST</code>.  New elements should go to the end because otherwise they will break restoring sorting keys from <code>vifminfo</code> files.
 
# Compile errors will show arrays/switches that need an update (with <code>-Werror</code>, just configure as <code>./configure --enable-developer ...</code>).
 
# Compile errors will show arrays/switches that need an update (with <code>-Werror</code>, just configure as <code>./configure --enable-developer ...</code>).
 
# Note that order in sorting dialog differs from enumeration values and is mapped to them via <code>indexes</code> indirection array in <code>modes/dialogs/sort_dialog.c</code>.
 
# Note that order in sorting dialog differs from enumeration values and is mapped to them via <code>indexes</code> indirection array in <code>modes/dialogs/sort_dialog.c</code>.

Latest revision as of 19:19, 13 August 2015

  1. Update SK_* items in ui/ui.h, that is add new value to the end of the list and update SK_LAST. New elements should go to the end because otherwise they will break restoring sorting keys from vifminfo files.
  2. Compile errors will show arrays/switches that need an update (with -Werror, just configure as ./configure --enable-developer ...).
  3. Note that order in sorting dialog differs from enumeration values and is mapped to them via indexes indirection array in modes/dialogs/sort_dialog.c.