mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Return EX_DATAERR when fails to parse theme.
This way a script can check if there was an error, otherwise you can wind up in a loop.
This commit is contained in:
parent
9465d189f7
commit
f42cffe962
3 changed files with 8 additions and 1 deletions
|
@ -109,6 +109,8 @@ AC_CHECK_HEADER([math.h],, AC_MSG_ERROR("Could not find math.h header file"))
|
|||
AC_SEARCH_LIBS([floor],[m],, AC_MSG_ERROR("Could not find floor in math library"))
|
||||
AC_SEARCH_LIBS([ceil], [m],, AC_MSG_ERROR("Could not find ceil in math library"))
|
||||
|
||||
AC_CHECK_HEADER([sysexits.h],, AC_MSG_ERROR("Could not find the sysexists.h header file"))
|
||||
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Check dependencies
|
||||
dnl ---------------------------------------------------------------------
|
||||
|
|
|
@ -149,7 +149,10 @@ Current theme: <b>${CUR}</b>"""
|
|||
if [ ${RTR} = 10 ]
|
||||
then
|
||||
return 0;
|
||||
elif [ ${RTR} = 1 ]
|
||||
elif [ ${RTR} = 1 ]
|
||||
then
|
||||
return 1;
|
||||
elif [ ${RTR} = 65 ]
|
||||
then
|
||||
return 1;
|
||||
fi
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <gmodule.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sysexits.h>
|
||||
|
||||
#include <glib-unix.h>
|
||||
|
||||
|
@ -675,6 +676,7 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data )
|
|||
}
|
||||
rofi_view_error_dialog ( emesg->str, ERROR_MSG_MARKUP );
|
||||
g_string_free ( emesg, TRUE );
|
||||
rofi_set_return_code ( EX_DATAERR );
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
// Dmenu mode.
|
||||
|
|
Loading…
Reference in a new issue