mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
Fix compiling without X11 support
This commit is contained in:
parent
c9df66f487
commit
e73da6b72e
@ -2917,9 +2917,11 @@ void initialisation(int argc, char **argv) {
|
||||
|
||||
conky::set_config_settings(*state);
|
||||
|
||||
#ifdef BUILD_X11
|
||||
if(out_to_x.get(*state)) {
|
||||
current_text_color = default_color.get(*state);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* generate text and get initial size */
|
||||
extract_variable_text(global_text);
|
||||
|
10
src/core.cc
10
src/core.cc
@ -549,11 +549,13 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
SCAN_CPU(arg, obj->data.i);
|
||||
obj->callbacks.percentage = &cpu_percentage;
|
||||
DBGP2("Adding $cpu for CPU %d", obj->data.i);
|
||||
#ifdef BUILD_X11
|
||||
END OBJ(cpugauge, &update_cpu_usage)
|
||||
SCAN_CPU(arg, obj->data.i);
|
||||
scan_gauge(obj, arg, 1);
|
||||
obj->callbacks.gaugeval = &cpu_barval;
|
||||
DBGP2("Adding $cpugauge for CPU %d", obj->data.i);
|
||||
#endif
|
||||
END OBJ(cpubar, &update_cpu_usage)
|
||||
SCAN_CPU(arg, obj->data.i);
|
||||
scan_bar(obj, arg, 1);
|
||||
@ -746,11 +748,11 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
scan_execgraph_arg(obj, arg);
|
||||
obj->callbacks.graphval = &execi_barval;
|
||||
obj->callbacks.free = &free_execi;
|
||||
#endif /* BUILD_X11 */
|
||||
END OBJ_ARG(execigauge, 0, "execigauge needs arguments")
|
||||
scan_execi_gauge_arg(obj, arg);
|
||||
obj->callbacks.gaugeval = &execi_barval;
|
||||
obj->callbacks.free = &free_execi;
|
||||
#endif /* BUILD_X11 */
|
||||
END OBJ_ARG(execi, 0, "execi needs arguments")
|
||||
scan_execi_arg(obj, arg);
|
||||
obj->parse = false;
|
||||
@ -979,9 +981,11 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
obj->callbacks.print = &print_memmax;
|
||||
END OBJ(memperc, &update_meminfo)
|
||||
obj->callbacks.percentage = &mem_percentage;
|
||||
#ifdef BUILD_X11
|
||||
END OBJ(memgauge, &update_meminfo)
|
||||
scan_gauge(obj, arg, 1);
|
||||
obj->callbacks.gaugeval = &mem_barval;
|
||||
#endif
|
||||
END OBJ(membar, &update_meminfo)
|
||||
scan_bar(obj, arg, 1);
|
||||
obj->callbacks.barval = &mem_barval;
|
||||
@ -1653,7 +1657,6 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
}
|
||||
obj->callbacks.graphval = &lua_barval;
|
||||
obj->callbacks.free = &gen_free_opaque;
|
||||
#endif /* BUILD_X11 */
|
||||
END OBJ_ARG(lua_gauge, 0, "lua_gauge needs arguments: <height>,<width> <function name> [function parameters]")
|
||||
arg = scan_gauge(obj, arg, 100);
|
||||
if (arg) {
|
||||
@ -1663,6 +1666,7 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
}
|
||||
obj->callbacks.gaugeval = &lua_barval;
|
||||
obj->callbacks.free = &gen_free_opaque;
|
||||
#endif /* BUILD_X11 */
|
||||
#endif /* BUILD_LUA */
|
||||
#ifdef BUILD_HDDTEMP
|
||||
END OBJ(hddtemp, &update_hddtemp)
|
||||
@ -1749,10 +1753,10 @@ struct text_object *construct_text_object(char *s, const char *arg, long
|
||||
buf = scan_graph(obj, arg, 100);
|
||||
free_and_zero(buf);
|
||||
obj->callbacks.graphval = &apcupsd_loadbarval;
|
||||
#endif /* BUILD_X11 */
|
||||
END OBJ(apcupsd_loadgauge, &update_apcupsd)
|
||||
scan_gauge(obj, arg, 100);
|
||||
obj->callbacks.gaugeval = &apcupsd_loadbarval;
|
||||
#endif /* BUILD_X11 */
|
||||
END OBJ(apcupsd_charge, &update_apcupsd)
|
||||
obj->callbacks.print = &print_apcupsd_charge;
|
||||
END OBJ(apcupsd_timeleft, &update_apcupsd)
|
||||
|
@ -262,6 +262,7 @@ void scan_execi_bar_arg(struct text_object *obj, const char *arg)
|
||||
scan_execi_arg(obj, arg);
|
||||
}
|
||||
|
||||
#ifdef BUILD_X11
|
||||
void scan_execi_gauge_arg(struct text_object *obj, const char *arg)
|
||||
{
|
||||
/* XXX: do real gauge parsing here */
|
||||
@ -269,7 +270,6 @@ void scan_execi_gauge_arg(struct text_object *obj, const char *arg)
|
||||
scan_execi_arg(obj, arg);
|
||||
}
|
||||
|
||||
#ifdef BUILD_X11
|
||||
void scan_execgraph_arg(struct text_object *obj, const char *arg)
|
||||
{
|
||||
struct execi_data *ed;
|
||||
|
@ -104,6 +104,7 @@ struct tab {
|
||||
* Scanning arguments to various special text objects
|
||||
*/
|
||||
|
||||
#ifdef BUILD_X11
|
||||
const char *scan_gauge(struct text_object *obj, const char *args, double scale)
|
||||
{
|
||||
struct gauge *g;
|
||||
@ -135,6 +136,7 @@ const char *scan_gauge(struct text_object *obj, const char *args, double scale)
|
||||
obj->special_data = g;
|
||||
return args;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *scan_bar(struct text_object *obj, const char *args, double scale)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user