Sidebar sort functions. More...
#include "config.h"
#include <stdbool.h>
#include "private.h"
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "sort.h"
Go to the source code of this file.
Functions | |
static int | sb_sort_count (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by count - Implements sort_t -. | |
static int | sb_sort_desc (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by description - Implements sort_t -. | |
static int | sb_sort_flagged (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by flagged - Implements sort_t -. | |
static int | sb_sort_path (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by path - Implements sort_t -. | |
static int | sb_sort_unread (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by unread - Implements sort_t -. | |
static int | sb_sort_order (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by order of creation - Implements sort_t -. | |
static int | sb_sort_unsorted (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries into their original order - Implements sort_t -. | |
void | sb_sort_entries (struct SidebarWindowData *wdata, enum SortType sort) |
Sort the Sidebar entries. | |
Sidebar sort functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file sort.c.
void sb_sort_entries | ( | struct SidebarWindowData * | wdata, |
enum SortType | sort | ||
) |
Sort the Sidebar entries.
wdata | Sidebar data |
sort | Sort order, e.g. SORT_PATH |
Sort the wdata->entries
array according to the current sort config option $sidebar_sort_method
. This calls qsort to do the work which calls our callback function "cb_qsort_sbe".
Once sorted, the prev/next links will be reconstructed.
Definition at line 171 of file sort.c.