mirror of https://github.com/djcb/mu.git
autotools: build updates
Ensure things build with autotools, too.
This commit is contained in:
parent
37988b5a26
commit
03993b93b2
12
configure.ac
12
configure.ac
|
@ -42,11 +42,12 @@ AC_PROG_CC_C99
|
|||
AC_PROG_INSTALL
|
||||
AC_HEADER_STDC
|
||||
|
||||
extra_flags="-Wformat-security \
|
||||
-Wstack-protector \
|
||||
-Wstack-protector-all \
|
||||
-Wno-cast-function-type \
|
||||
-Wno-bad-function-cast"
|
||||
extra_flags="-Wformat-security \
|
||||
-Wstack-protector \
|
||||
-Wstack-protector-all \
|
||||
-Wno-cast-function-type \
|
||||
-Wno-bad-function-cast \
|
||||
-Wno-switch-enum"
|
||||
|
||||
AX_CXX_COMPILE_STDCXX_17
|
||||
AX_COMPILER_FLAGS_CXXFLAGS([],[],[${extra_cflags}])
|
||||
|
@ -276,6 +277,7 @@ mu/Makefile
|
|||
lib/Makefile
|
||||
lib/doxyfile
|
||||
lib/utils/Makefile
|
||||
lib/message/Makefile
|
||||
lib/index/Makefile
|
||||
mu4e/Makefile
|
||||
mu4e/mu4e-meta.el
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# before descending into tests/
|
||||
include $(top_srcdir)/gtest.mk
|
||||
|
||||
SUBDIRS= utils index
|
||||
SUBDIRS= utils message index
|
||||
|
||||
TESTDEFS= \
|
||||
-DMU_TESTMAILDIR=\"${abs_srcdir}/testdir\" \
|
||||
|
@ -91,8 +91,6 @@ libmu_la_SOURCES= \
|
|||
mu-msg-crypto.cc \
|
||||
mu-msg-doc.cc \
|
||||
mu-msg-doc.hh \
|
||||
mu-msg-fields.c \
|
||||
mu-message-fields.hh \
|
||||
mu-msg-file.cc \
|
||||
mu-msg-file.hh \
|
||||
mu-msg-part.cc \
|
||||
|
@ -100,18 +98,14 @@ libmu_la_SOURCES= \
|
|||
mu-msg-priv.hh \
|
||||
mu-msg-sexp.cc \
|
||||
mu-msg.cc \
|
||||
mu-msg.hh \
|
||||
mu-message-flags.hh \
|
||||
mu-message-flags.cc \
|
||||
mu-message-priority.hh \
|
||||
mu-message-priority.cc
|
||||
|
||||
mu-msg.hh
|
||||
|
||||
libmu_la_LIBADD= \
|
||||
$(XAPIAN_LIBS) \
|
||||
$(GMIME_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(GUILE_LIBS) \
|
||||
${builddir}/message/libmu-message.la \
|
||||
${builddir}/index/libmu-index.la \
|
||||
$(CODE_COVERAGE_LIBS)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "mu-message-part.hh"
|
||||
#include "mu-mime-object.hh"
|
||||
#include "mu-utils.hh"
|
||||
#include "utils/mu-utils.hh"
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "mu-mime-object.hh"
|
||||
#include "gmime/gmime-message.h"
|
||||
#include "mu-utils.hh"
|
||||
#include "utils/mu-utils.hh"
|
||||
#include <mutex>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <errno.h>
|
||||
#include <xapian.h>
|
||||
|
||||
#include "mu-message.hh"
|
||||
#include "message/mu-message.hh"
|
||||
#include "mu-msg-doc.hh"
|
||||
|
||||
#include "utils/mu-util.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <glib.h>
|
||||
#include <utils/mu-util.h>
|
||||
#include "mu-message.hh"
|
||||
#include <message/mu-message.hh>
|
||||
|
||||
namespace Mu {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef MU_MSG_FILE_HH__
|
||||
#define MU_MSG_FILE_HH__
|
||||
|
||||
#include "mu-message.hh"
|
||||
#include "message/mu-message.hh"
|
||||
|
||||
namespace Mu {
|
||||
|
||||
|
|
|
@ -19,13 +19,11 @@
|
|||
#include "mu-parser.hh"
|
||||
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
|
||||
|
||||
#include "mu-tokenizer.hh"
|
||||
#include "utils/mu-utils.hh"
|
||||
#include "utils/mu-error.hh"
|
||||
#include "mu-message.hh"
|
||||
#include "message/mu-message.hh"
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include "mu-message.hh"
|
||||
#include "message/mu-message.hh"
|
||||
#include "mu-msg.hh"
|
||||
#include "mu-server.hh"
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "mu-msg.hh"
|
||||
|
||||
#include <utils/mu-str.h>
|
||||
#include <utils/mu-date.h>
|
||||
#include <utils/mu-utils.hh>
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
|
@ -62,17 +62,17 @@ mu_msg_header_view_class_init(MuMsgHeaderViewClass* klass)
|
|||
g_type_class_add_private(gobject_class, sizeof(MuMsgHeaderViewPrivate));
|
||||
|
||||
/* signal definitions go here, e.g.: */
|
||||
/* signals[MY_SIGNAL_1] = */
|
||||
/* g_signal_new ("my_signal_1",....); */
|
||||
/* signals[MY_SIGNAL_2] = */
|
||||
/* g_signal_new ("my_signal_2",....); */
|
||||
/* etc. */
|
||||
/* signals[MY_SIGNAL_1] = */
|
||||
/* g_signal_new ("my_signal_1",....); */
|
||||
/* signals[MY_SIGNAL_2] = */
|
||||
/* g_signal_new ("my_signal_2",....); */
|
||||
/* etc. */
|
||||
}
|
||||
|
||||
static void
|
||||
mu_msg_header_view_init(MuMsgHeaderView* obj)
|
||||
{
|
||||
/* static GtkBoxClass *parent_class = NULL; */
|
||||
/* static GtkBoxClass *parent_class = NULL; */
|
||||
obj->_priv = MU_MSG_HEADER_VIEW_GET_PRIVATE(obj);
|
||||
obj->_priv->_grid = NULL;
|
||||
}
|
||||
|
@ -155,7 +155,8 @@ get_grid(Mu::MuMsg* msg)
|
|||
++row;
|
||||
if (add_row(grid, row, "Subject", mu_msg_get_subject(msg), TRUE))
|
||||
++row;
|
||||
if (add_row(grid, row, "Date", mu_date_str_s("%c", mu_msg_get_date(msg)), TRUE))
|
||||
if (add_row(grid, row, "Date",
|
||||
time_to_string("%c", mu_msg_get_date(msg)).c_str(), TRUE))
|
||||
++row;
|
||||
|
||||
return grid;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** Copyright (C) 2008-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
** Copyright (C) 2008-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify it
|
||||
** under the terms of the GNU General Public License as published by the
|
||||
|
@ -18,10 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "mug-msg-list-view.h"
|
||||
#include "mu-message-flags.hh"
|
||||
#include "message/mu-message.hh"
|
||||
#include "mu-query.hh"
|
||||
#include "utils/mu-str.h"
|
||||
#include "utils/mu-date.h"
|
||||
|
||||
using namespace Mu;
|
||||
|
||||
|
@ -123,18 +122,18 @@ treecell_func(GtkTreeViewColumn* tree_column,
|
|||
gpointer data)
|
||||
{
|
||||
|
||||
MessageFlags flags;
|
||||
MessagePriority prio;
|
||||
Flags flags;
|
||||
Priority prio;
|
||||
|
||||
gtk_tree_model_get(tree_model, iter, MUG_COL_FLAGS, &flags, MUG_COL_PRIO, &prio, -1);
|
||||
|
||||
g_object_set(G_OBJECT(renderer),
|
||||
"weight",
|
||||
any_of(flags & MessageFlags::New) ? 800 : 400,
|
||||
any_of(flags & Flags::New) ? 800 : 400,
|
||||
"weight",
|
||||
any_of(flags & MessageFlags::Seen) ? 400 : 800,
|
||||
any_of(flags & Flags::Seen) ? 400 : 800,
|
||||
"foreground",
|
||||
prio == MessagePriority::High ? "red" : NULL,
|
||||
prio == Priority::High ? "red" : NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@ -317,17 +316,17 @@ run_query(const char* xpath, const char* expr, MugMsgListView* self)
|
|||
static void
|
||||
add_row(GtkTreeStore* store, MuMsg* msg, GtkTreeIter* treeiter)
|
||||
{
|
||||
const gchar *datestr;
|
||||
gchar * from, *to;
|
||||
time_t timeval;
|
||||
std::string flag_str;
|
||||
|
||||
timeval = mu_msg_get_date(msg);
|
||||
datestr = timeval == 0 ? "-" : mu_date_display_s(timeval);
|
||||
const auto datestr{timeval == 0 ?
|
||||
std::string{"-"} : time_to_string("%c", timeval)};
|
||||
from = empty_or_display_contact(mu_msg_get_from(msg));
|
||||
to = empty_or_display_contact(mu_msg_get_to(msg));
|
||||
|
||||
flag_str = message_flags_to_string(mu_msg_get_flags(msg));
|
||||
flag_str = flags_to_string(mu_msg_get_flags(msg));
|
||||
|
||||
/* if (0) { */
|
||||
/* GtkTreeIter myiter; */
|
||||
|
@ -358,7 +357,7 @@ add_row(GtkTreeStore* store, MuMsg* msg, GtkTreeIter* treeiter)
|
|||
MUG_COL_FLAGS,
|
||||
mu_msg_get_flags(msg),
|
||||
MUG_COL_TIME,
|
||||
timeval,
|
||||
datestr.c_str(),
|
||||
-1);
|
||||
g_free(from);
|
||||
g_free(to);
|
||||
|
|
Loading…
Reference in New Issue