mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +00:00
merge ibm-acpi and smapi together
Well, not really. I don't dare putting it all together into a single source file, as that would just not make sense. Instead, this patch eliminates the --enable-smapi configure option and all related checks, replacing them with the equivalents from --enable-ibm.
This commit is contained in:
parent
d500f1005a
commit
77c59b260d
@ -35,6 +35,7 @@
|
||||
sohalt).
|
||||
|
||||
2009-01-04
|
||||
* Drop --enable-smapi and use --enable-ibm instead
|
||||
* Make ibm-acpi objects optional (--enable-ibm)
|
||||
|
||||
2008-12-20
|
||||
|
@ -302,19 +302,6 @@ if test x$want_rss = xyes; then
|
||||
AC_DEFINE(RSS, 1, [Define if you want rss support])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl SMAPI
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE([smapi],
|
||||
AC_HELP_STRING([--enable-smapi], [enable if you want smapi support @<:@default=no@:>@]),
|
||||
[want_smapi="$enableval"], [want_smapi=no])
|
||||
|
||||
AM_CONDITIONAL(BUILD_SMAPI, test x$want_smapi = xyes)
|
||||
if test x$want_smapi = xyes; then
|
||||
AC_DEFINE(SMAPI, 1, [Define if you want smapi support])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Wireless extensions
|
||||
dnl
|
||||
@ -741,7 +728,6 @@ $PACKAGE $VERSION configured successfully:
|
||||
portmon: $want_portmon
|
||||
RSS: $want_rss
|
||||
wireless: $want_wlan
|
||||
SMAPI: $want_smapi
|
||||
IBM: $want_ibm
|
||||
nvidia: $want_nvidia
|
||||
eve-online: $want_eve
|
||||
|
@ -48,7 +48,7 @@ bmpx = bmpx.c
|
||||
endif
|
||||
|
||||
if BUILD_IBM
|
||||
ibm = ibm.c ibm.h
|
||||
ibm = ibm.c ibm.h smapi.c smapi.h
|
||||
endif
|
||||
|
||||
if BUILD_MPD
|
||||
@ -107,10 +107,6 @@ if BUILD_RSS
|
||||
rss = rss.c prss.c prss.h
|
||||
endif
|
||||
|
||||
if BUILD_SMAPI
|
||||
smapi = smapi.c smapi.h
|
||||
endif
|
||||
|
||||
if BUILD_NVIDIA
|
||||
nvidia = nvidia.c nvidia.h
|
||||
endif
|
||||
@ -145,7 +141,6 @@ conky_SOURCES = \
|
||||
mboxscan.h \
|
||||
$(x11) \
|
||||
$(xmms2) \
|
||||
$(smapi) \
|
||||
$(ibm) \
|
||||
temphelper.c \
|
||||
temphelper.h \
|
||||
|
16
src/conky.c
16
src/conky.c
@ -205,9 +205,9 @@ static void print_version(void)
|
||||
#ifdef HAVE_IWLIB
|
||||
" * wireless\n"
|
||||
#endif /* HAVE_IWLIB */
|
||||
#ifdef SMAPI
|
||||
" * smapi\n"
|
||||
#endif /* SMAPI */
|
||||
#ifdef IBM
|
||||
" * support for IBM/Lenovo notebooks\n"
|
||||
#endif /* IBM */
|
||||
#ifdef NVIDIA
|
||||
" * nvidia\n"
|
||||
#endif
|
||||
@ -1506,7 +1506,7 @@ static void free_text_objects(struct text_object *root)
|
||||
info.users.times = 0;
|
||||
}
|
||||
break;
|
||||
#ifdef SMAPI
|
||||
#ifdef IBM
|
||||
case OBJ_smapi:
|
||||
case OBJ_smapi_bat_perc:
|
||||
case OBJ_smapi_bat_temp:
|
||||
@ -3032,7 +3032,7 @@ static struct text_object *construct_text_object(const char *s,
|
||||
} else {
|
||||
obj->global_mode = 1;
|
||||
}
|
||||
#ifdef SMAPI
|
||||
#ifdef IBM
|
||||
END OBJ(smapi, 0)
|
||||
if (arg)
|
||||
obj->data.s = strndup(arg, text_buffer_size);
|
||||
@ -3071,7 +3071,7 @@ static struct text_object *construct_text_object(const char *s,
|
||||
}
|
||||
} else
|
||||
ERR("smapi_bat_bar needs an argument");
|
||||
#endif /* SMAPI */
|
||||
#endif /* IBM */
|
||||
#ifdef MPD
|
||||
#define mpd_set_maxlen(name) \
|
||||
if (arg) { \
|
||||
@ -5642,7 +5642,7 @@ head:
|
||||
(double) cur->entropy.poolsize;
|
||||
new_bar(p, obj->a, obj->b, (int) (entropy_perc * 255.0f));
|
||||
}
|
||||
#ifdef SMAPI
|
||||
#ifdef IBM
|
||||
OBJ(smapi) {
|
||||
char *s;
|
||||
if(obj->data.s) {
|
||||
@ -5696,7 +5696,7 @@ head:
|
||||
else
|
||||
new_bar(p, obj->a, obj->b, 0);
|
||||
}
|
||||
#endif /* SMAPI */
|
||||
#endif /* IBM */
|
||||
OBJ(scroll) {
|
||||
unsigned int j;
|
||||
char *tmp, buf[max_user_text];
|
||||
|
@ -90,10 +90,6 @@ char *strndup(const char *s, size_t n);
|
||||
#include "rss.h"
|
||||
#endif
|
||||
|
||||
#ifdef SMAPI
|
||||
#include "smapi.h"
|
||||
#endif
|
||||
|
||||
#ifdef TCP_PORT_MONITOR
|
||||
#include "tcp-portmon.h"
|
||||
#endif
|
||||
@ -104,6 +100,7 @@ char *strndup(const char *s, size_t n);
|
||||
|
||||
#ifdef IBM
|
||||
#include "ibm.h"
|
||||
#include "smapi.h"
|
||||
#endif
|
||||
|
||||
/* A size for temporary, static buffers to use when
|
||||
@ -177,7 +174,7 @@ enum {
|
||||
#ifdef RSS
|
||||
INFO_RSS = 24,
|
||||
#endif
|
||||
#ifdef SMAPI
|
||||
#ifdef IBM
|
||||
INFO_SMAPI = 25,
|
||||
#endif
|
||||
INFO_USERS = 26,
|
||||
|
@ -137,6 +137,12 @@ enum text_object_type {
|
||||
OBJ_ibm_temps,
|
||||
OBJ_ibm_volume,
|
||||
OBJ_ibm_brightness,
|
||||
OBJ_smapi,
|
||||
OBJ_smapi_bat_bar,
|
||||
OBJ_smapi_bat_perc,
|
||||
OBJ_smapi_bat_temp,
|
||||
OBJ_smapi_bat_power,
|
||||
OBJ_if_smapi_bat_installed,
|
||||
#endif /* IBM */
|
||||
OBJ_if_up,
|
||||
OBJ_if_gw,
|
||||
@ -351,14 +357,6 @@ enum text_object_type {
|
||||
#endif
|
||||
#ifdef HDDTEMP
|
||||
OBJ_hddtemp,
|
||||
#endif
|
||||
#ifdef SMAPI
|
||||
OBJ_smapi,
|
||||
OBJ_smapi_bat_bar,
|
||||
OBJ_smapi_bat_perc,
|
||||
OBJ_smapi_bat_temp,
|
||||
OBJ_smapi_bat_power,
|
||||
OBJ_if_smapi_bat_installed,
|
||||
#endif
|
||||
OBJ_scroll,
|
||||
OBJ_entropy_avail,
|
||||
|
Loading…
Reference in New Issue
Block a user