- Use g_thread_new instead of g_thread create
- Drop explicit call of g_thread_init, it is done implicitely by GLib
since 2.32
- Since this bumps the minimum required GLib version add and extend the
pkg-config based version checks to error out on older GLib versions
The remaining codebase uses g_strdup() already so do the same for the
chime command too. This fixes a gcc warning caused by a missing include
for strdup().
Move all variable and struct init code into if 0 blocks like the code
that is supposed to use this. Eventually this whole cruft can be
dropped altogether in case GKrellM can be ported to use Gtk+ session
management.
- Adding a sensor in the mbmon support stored the added sensor in a
pointer but never used it afterwards
- Drop pixbuf width in draw_left_frame_overlap, the code unlike other
drawing helpers does not use the pixbuf width
- Remove unused scroll selection from net_stats_page
This fixes several set but unread warnings when compiling with a recent
gcc (encountered with gcc 4.8.2).
Read sensor information from the GPU-Z shared memory area if present.
As with all sensor backends on Windows this needs the GPU-Z tool
running in the background.
Do not use a fixed 5 second delay after having a started a windows
sensor application, instead try to access the shared memory area
repeatedly and only give up after 10 seconds. Please note that for this
feature to be usable the sensor app must be found in PATH.
- Move opening and closing of a win32 shared memory area into helper
functions. shm_open ensures that the data pointer is valid and
otherwise gets rid of the opened file handle right away. shm_close
cleans up both the handle and the data pointer if needed.
- Redo the initial check for presence of a sensor tool that uses a
shared memory area for its sensor data by using the above two
functions
- Port all sensor value reading to use shm_open/shm_close as well
This gets rid of some code duplication and also lowers the indentation
level in several areas which hopefully makes the code a bit easier to
read. Additionally all the win32 API calls are limited to two functions.
Do not use the default LINK_FLAGS value for windows builds, the default
"-E" linker option only causes warnings for MinGW since it's essentially
ignored by the linker.
The flag is also unneeded since linking plugins against the gkrellm
binary is not done on win32 so none of the gkrellm/gkrellmd functions
need to be exported, the API is manually exposed via the win32-specific
libgkrellm/libgkrellmd static libs.
Honor the BINEXT variable in the gkrellm and gkrellmd target to enforce
building with the correct extension. This is needed for recent mingw-w64
cross toolchains since those do not automatically append ".exe" when
linking.
On Thinkpads T410s sysfs may switch between energy_full/_now and
charge_full/_now files across suspend/resume. Instead of polling only
one set of files always try all variants when checking battery levels.
This fixes a battery level of 0 in GKrellM after resume.
Thanks to Joern Engel for tracking this down and for providing a patch
via the Debian bugtracker.
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630117
Explicitely add needed include arguments as well as linker arguments
for gmodule. Before this change we relied on gmodule being an implicit
dependency pulled in via the gtk+-2.0 module, this does not seem to be
the case anymore with >=gdk-pixbuf-2.24 and >=pango-1.30.
Thanks for Alexandre Rostovtsev for bringing this up on the mailinglist
and for providing a first patch.
See also https://bugs.gentoo.org/show_bug.cgi?id=428532
Mark mount points of type cifs as remote filesystems to make gkrellm use
nfs-timeout as polling interval instead of the standard fs-timeout which
should only be used to poll local filesystems.
Thanks to Gerard Neil for submitting this patch.
Accessing mount points to determine free space actually triggers a
mounting operation of autofs mounts. This results in all autofs mount
points to be always-mounted while gkrellm is running, something which
is hardly desirable.
Thanks to Gerard Neil for submitting this patch.
Not linking against Libgcrypt is not enough, we also should not try to
include headers. This fixes GnuTLS >= 2.12 detection when Libgcrypt
headers are not installed/found.
Only initialize Libgcrypt threading functions on GnuTLS < 2.12 which
does not do this automatically. Also drop explicit linking against
Libgcrypt on newer GnuTLS version.
This should allow GKrellM to work with a GnuTLS that uses Nettle instead
of Libgcrypt as its cryptographic backend.
monitor.c: serve_disk_data() now uses a dynamic buffer for to-be-sent disk-lines instead of relying on a very short static array.
client.c: read_server_setup() now uses a static read buffer that is as big/small as the global server_buf. client_disk_line_from_server() now uses a dynamic string for disk names.
- src/disk.c, server/monitor.c: Add gkrellm_disk_add_by_name() that allows creating disks with a custom label from sysdep code.
- src/Makefile, server/Makefile: Cleanup of darwin/darwin9/macosx targets. All custom variables are now set in src/Makefile and server/Makefile to allow easy building inside these subdirs. Removed very old link-flags which were used before OS X 10.3.
- All Makefiles: Remove unused GTK_CONFIG definitions, they were neither passed as an argument nor executed anywhere.
- Makefile: Update comments documenting Darwin and OS X targets (darwin, darwin9 and macosx)
- src/sysdeps/darwin.c: Use utmpx instead of deprecated utmp.
- src/sysdeps/darwin.c: Fix possible leak in gkrellm_sys_cpu_init(), pinfo was never free'd.
- src/sysdeps/darwin.c: Rewrite disk device enumeration and performance gathering. The previous implementation failed as soon as a single device contained no medium, resulting in no/wrong performance data for all subsequent devices. Also provides labels for krells based on real device-names (uses new gkrellm_disk_add_by_name()).
Makefile, win32.c: Load ntdll.dll and lookup used functions at runtime (safer for future windows version and fixes unintended linking against sscanf() from ntdll)
win32.c: Add gkrellm_sys_inet_cleanup() for proper unloading of iphlpapi.dll
Remove parsing of "--debug-level" in get_args(), it is already parsed in parse_config()
Make "-d" commandline option the short version for "--detach" only. Before it was also used as a short version for "--debug-level"