mu: require glib >= 2.38; remove g_type_init calls

Minor cleanup.
This commit is contained in:
Dirk-Jan C. Binnema 2019-07-08 21:45:50 +03:00
parent 629badbd8f
commit 5440747ba4
4 changed files with 9 additions and 18 deletions

View File

@ -132,8 +132,7 @@ AS_IF([test "x$PKG_CONFIG" = "xno"],[
])
# glib2?
# we pick some late-2012 version
PKG_CHECK_MODULES(GLIB,glib-2.0 >= 2.32 gobject-2.0 gio-2.0)
PKG_CHECK_MODULES(GLIB,glib-2.0 >= 2.38 gobject-2.0 gio-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
glib_version="`$PKG_CONFIG --modversion glib-2.0`"

View File

@ -1,7 +1,7 @@
/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
/*
** Copyright (C) 2008-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2008-2019 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
@ -42,10 +42,10 @@ struct _MuIndexStats {
typedef struct _MuIndexStats MuIndexStats;
/**
* create a new MuIndex instance. NOTE(1): the database does not have
* create a new MuIndex instance. NOTE: the database does not have
* to exist yet, but the directory must already exist; NOTE(2): before
* doing anything with the returned Index object, make sure you haved
* called g_type_init, and mu_msg_init somewhere in your code.
* called mu_msg_init somewhere in your code.
*
* @param store a writable MuStore object
* @param err to receive error or NULL; there are only errors when this

View File

@ -82,10 +82,6 @@ mu_runtime_init (const char* muhome_arg, const char *name)
setlocale (LC_ALL, "");
#ifndef GLIB_VERSION_2_36
g_type_init ();
#endif /*GLIB_VERSION_2_36*/
if (muhome_arg)
muhome = g_strdup (muhome_arg);
else

View File

@ -1,7 +1,7 @@
/* -*-mode: c++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8-*- */
/*
** Copyright (C) 2008-2015 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2008-2019 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
@ -37,7 +37,7 @@ show_version (void)
{
const char* blurb =
"mu (mail indexer/searcher) version " VERSION "\n"
"Copyright (C) 2008-2018 Dirk-Jan C. Binnema\n"
"Copyright (C) 2008-2019 Dirk-Jan C. Binnema\n"
"License GPLv3+: GNU GPL version 3 or later "
"<http://gnu.org/licenses/gpl.html>.\n"
"This is free software: you are free to change "
@ -88,16 +88,12 @@ handle_error (MuConfig *conf, MuError merr, GError **err)
int
main (int argc, char *argv[])
{
GError *err;
MuError rv;
MuConfig *conf;
GError *err;
MuError rv;
MuConfig *conf;
setlocale (LC_ALL, "");
#ifndef GLIB_VERSION_2_36
g_type_init ();
#endif /*GLIB_VERSION_2_36*/
err = NULL;
rv = MU_OK;