A number of configuration options are useful only during the startup, so it
is possible to free them when ready.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
It is generally not considered a good behaviour to leave user puzzled on
non-working request. With a little message at least he will know where to
look at.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Conflicts:
wmix/config.c
The original parser would not say anything if the user had misspelled
something in the file which can be annoying. Now the parser will report
warnings for everything not understood with a message trying to be more
helpful to debug and fix.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original code did not abort when an invalid option was provided
or if there was non-options arguments on the command line.
The new code will report all problems found and stop to have the user
fix his command. It also remove some unnecessary pointer checks.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
If the config file was set by user with '-f', it would be a good idea to
report him if we're not able to load it.
Took opportunity to report to user that the config file is loaded if he
asked for verbose operations, so he can see if the default file loaded
is the one he expected.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Took opportunity to re-order them alphabetically so they are easier to
work with, both for devs and for users.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Management of the configuration is split in many places, the goal is to
regroup stuff together, starting with the loading from file stuff.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The PID file was created at the early beginning, but wmix can abort later
if something is not ok. It is better to create it at the end, so it will
be created only if wmix will actually be running.
Took the opportunity to move the code to a dedicated function to keep main
simple, and added a check to fix possible crash on startup if environment
variable $HOME does not exist.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The bitmap mask associated to the Led image on the knob was not used,
probably because the visual gain is negligible compared to the added
complexity to handle it.
So, as compiler warned about it, remove the variable.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original code merely assumed that an XOpenDisplay failure was caused
only by incapacity to connect to the X server, but if $DISPLAY was not set
then the fprintf would be given a NULL pointer which it may not appreciate
(depending on the libc in use).
Let's avoid that case and try to provide more info to help the user.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
It may not be easy to understand how channels are names, particularly
when user wants to use a name to exclude a channel from the GUI. This
new sections answers all those questions.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This is handy to let the user know about the possible strange behaviour he
may encounter and some limitations.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This includes detailing more files of interest to user, spell-checking and
appearance, and few other things.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This allows easier review/fix/patches. Furthermore, not all man tools
support compression and some distribution may use other compression
algorithm (bzip2, ...), so this should be handled at install time.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wmbutton will happily start and display what otherwise looks like a
functioning display even if none of the possible configuration files
exist. However, the application promptly exits as soon as it has to show
a tooltip. This isn't nice. It looks like a crash to an unsuspecting
user. Terminal output is shown, of course, leading to a decently quick
diagnostic, but the fail isn't early enough to be useable.
The trivial fix is to check if the local configuration file (specified
as a command line argument or defaulting to ~/.wmbutton) or the global
configuration file can be open. If neither can be open, we bail out
early.
This *still* has the problem of only really being functional in a
terminal. A graphical error box would definitely be preferable and is a
possible improvement.
Signed-off-by: Weland Treebark <weland@blinkenshell.org>
- When executing a command, control flow would fall through to the
display cycle code, changing the display.
- When display cycling was prevented by the user (via -l), command
execution was also disabled.
Enough patches have been made over the years to the wmtime Debian
package that I have decided to incorporate these changes into
an official upstream release.
Some updates to the documentation have been made to reflect the
changes.
When non-Latin alphabet characters are encountered in weekday and month names, the English defaults are used. This closes Debian bug #726125.
Also, numbers are now printed when encountered in weekday and month names (e.g., Swahili).
The Makefile of wmtime had to be patched in order for CFLAGS
not to be redefined by the Makefile but to use the CFLAGS
passed by debhelper and add additional flags through
string concatenation. LDFLAGS and CPPFLAGS weren't passed
at all and have been added to the linker command line.
Patch by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
from Debian package.
I wanted to use it on Solaris which has different way to obtain system
statistics. I build a support file and changed Makefile to take the
operating system into account.
Then I moved to fixing the widget. The comments in the code said that
it supports only 2 CPUs. I've added an aggregation so that it still
shows two graphs but represents all CPUs.
Lastly, I some programmatic flaws - like multiple loops for one task -
cleaning up the code a bit. It should also speed up the widget a
little.
Package: wmtime
Version: 1.0b3-2
Severity: normal
Tags: upstream patch l10n
Hi,
the package wmtime claims that it supports localization. Looking into the code,
it seems more like date customization.
When claiming "localization", it should work as such - respecting LANG, LC_ALL,
etc. environment variables and use locales for the day and month abbreviations.
Please see my patch which adds such support.
Regards,
Milan Cermak
-- System Information:
Debian Release: 6.0.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.37.6 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages wmtime depends on:
ii libc6 2.11.3-2 Embedded GNU C Library: Shared lib
ii libx11-6 2:1.3.3-4 X11 client-side library
ii libxext6 2:1.1.2-1 X11 miscellaneous extension librar
ii libxpm4 1:3.5.8-1 X11 pixmap library
wmtime recommends no packages.
wmtime suggests no packages.
-- no debconf information
Package: wmtime
Version: 1.0b2-10
Tags: patch
wmtime draws a small amount of garbage to the screen when -noseconds is
given, because DrawTime reads beyond the given string buffer. This
doesn't trigger all the time for me (I assume due to the nondeterminism
of reading uninitialized memory or something), but it pretty clearly
happens if I switch VTs.
The attached patch limits the amount of the formatted string we try to
read, so we don't read beyond the end of the string. Fixes it for me.
--
Andrew Deason
adeason@dson.org