mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
Hook up our fancy new notmuch_parse_date function.
With all the de-glib-ification out of the way, we can now use it to allow for date-based sorting of Xapian search results.
This commit is contained in:
parent
401c6cc579
commit
fa562fa22b
3 changed files with 3 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -13,7 +13,7 @@ all: $(PROGS)
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
|
$(CC) -c $(CFLAGS) $(MYCFLAGS) $^ -o $@
|
||||||
|
|
||||||
notmuch: notmuch.o database.o message.o xutil.o
|
notmuch: notmuch.o database.o date.o message.o xutil.o
|
||||||
$(CC) $(MYLDFLAGS) $^ -o $@
|
$(CC) $(MYLDFLAGS) $^ -o $@
|
||||||
|
|
||||||
notmuch-index-message: notmuch-index-message.cc
|
notmuch-index-message: notmuch-index-message.cc
|
||||||
|
|
|
@ -554,13 +554,11 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
|
||||||
|
|
||||||
free (message_id);
|
free (message_id);
|
||||||
|
|
||||||
/*
|
|
||||||
date = notmuch_message_get_header (message, "date");
|
date = notmuch_message_get_header (message, "date");
|
||||||
time_value = notmuch_parse_date (date, NULL);
|
time_value = notmuch_parse_date (date, NULL);
|
||||||
|
|
||||||
doc.add_value (NOTMUCH_VALUE_DATE,
|
doc.add_value (NOTMUCH_VALUE_DATE,
|
||||||
Xapian::sortable_serialise (time_value));
|
Xapian::sortable_serialise (time_value));
|
||||||
*/
|
|
||||||
|
|
||||||
db->add_document (doc);
|
db->add_document (doc);
|
||||||
} catch (const Xapian::Error &error) {
|
} catch (const Xapian::Error &error) {
|
||||||
|
|
2
date.c
2
date.c
|
@ -27,6 +27,8 @@
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#include <glib.h> /* For g_ascii_strncasecmp only. */
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue