/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the `strverscmp' function. */
-#mesondefine HAVE_STRVERSCMP
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
</term>
<listitem>
<para>Files and folders are sorted with the dot '.' treated as a special case, so the order is e.g. "event.c" "event.h" "eventgenerator.c". Also, files containing numbers are sorted as "file1" "file5" "file10".</para>
+ <note>If this option is selected and a standard numerical sort is required and the files are in a single folder, a workaround is to put the files in a temporary collection and select Sort By Path</note>
</listitem>
</varlistentry>
<varlistentry>
<row> <entry> <code> Ctrl + <keycap> S </keycap> </code> </entry> <entry> Save collection as </entry> </row>
<row> <entry> <code> Ctrl + <keycap> T </keycap> </code> </entry> <entry> Show filename text </entry> </row>
<row> <entry> <code> <keycap> N </keycap> </code> </entry> <entry> Sort by name </entry> </row>
-<row> <entry> <code> <keycap> I </keycap> </code> </entry> <entry> Sort by number </entry> </row>
<row> <entry> <code> <keycap> D </keycap> </code> </entry> <entry> Sort by date </entry> </row>
<row> <entry> <code> <keycap> B </keycap> </code> </entry> <entry> Sort by size </entry> </row>
<row> <entry> <code> <keycap> P </keycap> </code> </entry> <entry> Sort by path </entry> </row>
summary({'nl_langinfo' : ['nl_langinfo not found - first weekday depends on locale:', false, 'first weekday defaults to Monday']}, section : 'Documentation', bool_yn : true)
endif
-result = cc.has_function('strverscmp', prefix : '#include <string.h>')
-if result
- conf_data.set('HAVE_STRVERSCMP', 1)
-endif
-
conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf_data.set_quoted('GQ_APPDIR', gq_appdir)
conf_data.set_quoted('GQ_BINDIR', gq_bindir)
<define name="HAVE_PDF"/>
<define name="HAVE_RAW"/>
<define name="HAVE_SPELL"/>
- <define name="HAVE_STRVERSCMP"/>
<define name="HAVE_TIFF"/>
<define name="HAVE_WEBP"/>
</defines>
{GDK_CONTROL_MASK, 'S', N_("Save collection as")},
{GDK_CONTROL_MASK, 'T', N_("Show filename text")},
{0, 'N', N_("Sort by name")},
- {0, 'I', N_("Sort by number")},
{0, 'D', N_("Sort by date")},
{0, 'B', N_("Sort by size")},
{0, 'P', N_("Sort by path")},
if (cia->fd->format_class < cib->fd->format_class) return -1;
if (cia->fd->format_class > cib->fd->format_class) return 1;
break;
-#ifdef HAVE_STRVERSCMP
- case SORT_NUMBER:
- return strverscmp(cia->fd->name, cib->fd->name);
- break;
-#endif
default:
break;
}
case 'N': case 'n':
collection_set_sort_method(cw->cd, SORT_NAME);
break;
-#ifdef HAVE_STRVERSCMP
- case 'I': case 'i':
- collection_set_sort_method(cw->cd, SORT_NUMBER);
- break;
-#endif
case 'D': case 'd':
collection_set_sort_method(cw->cd, SORT_TIME);
break;
if (fa->format_class > fb->format_class) return 1;
/* fall back to name */
break;
-#ifdef HAVE_STRVERSCMP
- case SORT_NUMBER:
- ret = strverscmp(fa->name, fb->name);
- if (ret != 0) return ret;
- break;
-#endif
default:
break;
}
#include <config.h>
-#ifdef HAVE_STRVERSCMP
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-# endif
-#endif
-
#include "intl.h"
case SORT_PATH:
return _("Sort by path");
break;
- case SORT_NUMBER:
- return _("Sort by number");
- break;
case SORT_RATING:
return _("Sort by rating");
break;
g_object_set_data(G_OBJECT(submenu), "submenu_data", data);
submenu_add_sort_item(submenu, func, SORT_NAME, show_current, type);
-#ifdef HAVE_STRVERSCMP
- submenu_add_sort_item(submenu, func, SORT_NUMBER, show_current, type);
-#endif
submenu_add_sort_item(submenu, func, SORT_TIME, show_current, type);
submenu_add_sort_item(submenu, func, SORT_CTIME, show_current, type);
submenu_add_sort_item(submenu, func, SORT_EXIFTIME, show_current, type);
options->file_filter.show_parent_directory, &c_options->file_filter.show_parent_directory);
pref_checkbox_new_int(group, _("Case sensitive sort"),
options->file_sort.case_sensitive, &c_options->file_sort.case_sensitive);
- pref_checkbox_new_int(group, _("Natural sort order"),
+ pref_checkbox_new_int(group, _("Natural sort order - Requires restart"),
options->file_sort.natural, &c_options->file_sort.natural);
pref_checkbox_new_int(group, _("Disable file extension checks"),
options->file_filter.disable_file_extension_checks, &c_options->file_filter.disable_file_extension_checks);
SORT_TIME,
SORT_CTIME,
SORT_PATH,
- SORT_NUMBER,
SORT_EXIFTIME,
SORT_EXIFTIMEDIGITIZED,
SORT_RATING,