libxdg-basedir 1.0.0 compatibility
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4a34693bfb
commit
715f95555a
10
awesome.c
10
awesome.c
|
@ -357,10 +357,10 @@ main(int argc, char **argv)
|
||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
|
|
||||||
/* Get XDG basedir data */
|
/* Get XDG basedir data */
|
||||||
xdg = xdgAllocHandle();
|
xdgInitHandle(&xdg);
|
||||||
|
|
||||||
/* init lua */
|
/* init lua */
|
||||||
luaA_init(xdg);
|
luaA_init(&xdg);
|
||||||
|
|
||||||
/* check args */
|
/* check args */
|
||||||
while((opt = getopt_long(argc, argv, "vhkc:",
|
while((opt = getopt_long(argc, argv, "vhkc:",
|
||||||
|
@ -374,7 +374,7 @@ main(int argc, char **argv)
|
||||||
exit_help(EXIT_SUCCESS);
|
exit_help(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
if(!luaA_parserc(xdg, confpath, false))
|
if(!luaA_parserc(&xdg, confpath, false))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "✘ Configuration file syntax error.\n");
|
fprintf(stderr, "✘ Configuration file syntax error.\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
@ -505,9 +505,9 @@ main(int argc, char **argv)
|
||||||
spawn_init();
|
spawn_init();
|
||||||
|
|
||||||
/* Parse and run configuration file */
|
/* Parse and run configuration file */
|
||||||
luaA_parserc(xdg, confpath, true);
|
luaA_parserc(&xdg, confpath, true);
|
||||||
|
|
||||||
xdgFreeHandle(xdg);
|
xdgWipeHandle(&xdg);
|
||||||
|
|
||||||
/* scan existing windows */
|
/* scan existing windows */
|
||||||
scan();
|
scan();
|
||||||
|
|
|
@ -148,7 +148,7 @@ pkg_check_modules(AWESOME_REQUIRED REQUIRED
|
||||||
libstartup-notification-1.0>=0.10
|
libstartup-notification-1.0>=0.10
|
||||||
xproto>=7.0.11
|
xproto>=7.0.11
|
||||||
imlib2
|
imlib2
|
||||||
libxdg-basedir)
|
libxdg-basedir>=1.0.0)
|
||||||
|
|
||||||
if(NOT AWESOME_REQUIRED_FOUND OR NOT AWESOME_COMMON_REQUIRED_FOUND)
|
if(NOT AWESOME_REQUIRED_FOUND OR NOT AWESOME_COMMON_REQUIRED_FOUND)
|
||||||
message(FATAL_ERROR)
|
message(FATAL_ERROR)
|
||||||
|
|
4
luaa.c
4
luaa.c
|
@ -640,7 +640,7 @@ luaA_awesome_newindex(lua_State *L)
|
||||||
* \param xdg An xdg handle to use to get XDG basedir.
|
* \param xdg An xdg handle to use to get XDG basedir.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
luaA_init(xdgHandle xdg)
|
luaA_init(xdgHandle* xdg)
|
||||||
{
|
{
|
||||||
lua_State *L;
|
lua_State *L;
|
||||||
static const struct luaL_reg awesome_lib[] =
|
static const struct luaL_reg awesome_lib[] =
|
||||||
|
@ -780,7 +780,7 @@ luaA_loadrc(const char *confpath, bool run)
|
||||||
* \param run Run the configuration file.
|
* \param run Run the configuration file.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
luaA_parserc(xdgHandle xdg, const char *confpatharg, bool run)
|
luaA_parserc(xdgHandle* xdg, const char *confpatharg, bool run)
|
||||||
{
|
{
|
||||||
char *confpath = NULL;
|
char *confpath = NULL;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
4
luaa.h
4
luaa.h
|
@ -328,8 +328,8 @@ luaA_pushpadding(lua_State *L, padding_t *padding)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void luaA_init(xdgHandle);
|
void luaA_init(xdgHandle *);
|
||||||
bool luaA_parserc(xdgHandle, const char *, bool);
|
bool luaA_parserc(xdgHandle *, const char *, bool);
|
||||||
void luaA_on_timer(EV_P_ ev_timer *, int);
|
void luaA_on_timer(EV_P_ ev_timer *, int);
|
||||||
int luaA_pushxcolor(lua_State *, const xcolor_t *);
|
int luaA_pushxcolor(lua_State *, const xcolor_t *);
|
||||||
int luaA_pushcolor(lua_State *, const color_t *);
|
int luaA_pushcolor(lua_State *, const color_t *);
|
||||||
|
|
Loading…
Reference in New Issue