print to stdout msg of level <= log_info
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
+/* Use GTK3 */
+#undef HAVE_GTK3
+
/* Use GTOP */
#undef HAVE_GTOP
/* Use GTOP */
#undef HAVE_GTOP
LIBNOTIFY_CFLAGS
GCONF_LIBS
GCONF_CFLAGS
LIBNOTIFY_CFLAGS
GCONF_LIBS
GCONF_CFLAGS
GTK_LIBS
GTK_CFLAGS
XEXT_LIBS
GTK_LIBS
GTK_CFLAGS
XEXT_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+$as_echo "#define HAVE_GTK3 1" >>confdefs.h
+
+fi
+ if test -n "$GTK_LIBS"; then
+ GTK_TRUE=
+ GTK_FALSE='#'
+else
+ GTK_TRUE='#'
+ GTK_FALSE=
if test "$GTK_LIBS" == ""; then
pkg_failed=no
if test "$GTK_LIBS" == ""; then
pkg_failed=no
+ if test -n "$GTK_LIBS"; then
+ GTK_TRUE=
+ GTK_FALSE='#'
+else
+ GTK_TRUE='#'
+ GTK_FALSE=
+fi
+
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then
+ as_fn_error $? "conditional \"GTK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GTK_TRUE}" && test -z "${GTK_FALSE}"; then
+ as_fn_error $? "conditional \"GTK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${LIBNOTIFY_TRUE}" && test -z "${LIBNOTIFY_FALSE}"; then
as_fn_error $? "conditional \"LIBNOTIFY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
if test -z "${LIBNOTIFY_TRUE}" && test -z "${LIBNOTIFY_FALSE}"; then
as_fn_error $? "conditional \"LIBNOTIFY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
void log_printf(int lvl, const char *fmt, ...)
{
struct timeval tv;
void log_printf(int lvl, const char *fmt, ...)
{
struct timeval tv;
- static char buffer[1 + LOG_BUFFER];
+ char buffer[1 + LOG_BUFFER];
va_list ap;
char *lvl_str;
va_list ap;
char *lvl_str;
- if (!file || lvl > log_level)
+ if (lvl > LOG_INFO && (!file || lvl > log_level))
return ;
va_start(ap, fmt);
return ;
va_start(ap, fmt);
- fprintf(file, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
- fflush(file);
+ if (file && lvl <= log_level) {
+ fprintf(file, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
+ fflush(file);
+ }
+
+ if (lvl <= LOG_INFO)
+ printf("[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
+/* level of the log file. */
extern int log_level;
#endif
extern int log_level;
#endif
log_printf(LOG_DEBUG, "hiding, WM is supporting appindicator");
gtk_widget_hide(ui->main_window);
} else {
log_printf(LOG_DEBUG, "hiding, WM is supporting appindicator");
gtk_widget_hide(ui->main_window);
} else {
- log_printf(LOG_DEBUG, "quitting, WM not supporting appindicator");
+ log_printf(LOG_DEBUG,
+ "quitting, WM not supporting appindicator");
ui_psensor_quit(ui);
}
#else
ui_psensor_quit(ui);
}
#else