The International System of Units defines "ms" as the standard abbreviation
for milliseconds, so let's use it everywhere to be consistent.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The goal is to reduce the risk for truncated label, and take the
opportunity to align everything with consistent spacings.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As the data to create the icons for the dock configuration was already
grouped in a structure, it is a good idea to also include the balloon text
which is linked to them in the array, so the code is simpler and safer.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As the code is already treating these frames as an array, it is a good idea
to do the same for their titles so it is possible to reuse its size at
convenient places to make the code safer.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This reduce the risk to miss something in case the array they refer to gets
updated, because with the macro the proper number of element will be
evaluated by the compiler automatically.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Because the macro wlengthof preforms a check of validity of its argument
with static_assert, there is a use case where it fails with a compiler
error. This patch introduces an alternate macro without the check, to be
used only for this specific case.
To be able to use the size of the array, a few of those array declaration
have to be moved before the structure in which their size is used.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Coverity, the return string of WMGetTextFieldText is
malloced so it needs to be freed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the string returned by 'WMGetTextFieldText' is
allocated dynamically, so it must be freed when not needed anymore.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The functions that create the different configuration panels were taking
the screen structure as argument, but it turns out that none of them
actually need it.
We just remove the argument to make code simpler and easier to maintain.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Instead of defining 2 separate data arrays, use a array of struct
to make it less bug prone (no dependancy on order of elements).
Took opportunity to de-CamelCase the variable name;
Took opportunity to add appropriate const qualifier.
Instead of defining 2 separate data arrays, use a array of struct
to make it less bug prone (no dependancy on order of elements).
Took opportunity to de-CamelCase the variable name;
Took opportunity to add appropriate const qualifier.
When first using the wmdrawer panel of WPrefs the settings
ClipAutoexpandDelay
ClipAutocollapseDelay
ClipAutoraiseDelay
ClipAutolowerDelay
are not yet saved in the user's config file and 'value' ends up
being undefined in showData() leading to a crash in adjustButtonSelectionBasedOnValue().
This patch is a workaround to make it possible to choose the config values for the
first time using WPrefs.