1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

564 Commits

Author SHA1 Message Date
Christophe CURIS
a9a0d2ac85 make: new target 'update-lang' to update the PO files for a languages against latest sources
With the new target, it is now easy to update all translations in the
project for a language against latest code with the simple command, run
from the top directory:

  make update-lang PO=<lang>

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
2429d5e196 doc: explain how to help translating the Window Maker project
Removed the information dispatched in the many po/README files and created
a more elaborate chapter in the README.i18n file to explain the process
involved to participate.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
740c812476 make: remove installed translations when performing Uninstall
When support for translated languages was enabled, the localisation files
were installed, but make uninstall did not take care to remove them. This
patch fixes this by properly removing them.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
bf6bc120a5 configure: replaced option '--with-nls' by autoconf's '--localedir'
Autoconf have been providing the option '--localedir' for a long time now,
so this patch removes the deprecated '--with-nls' option and makes use of
the standard '--localedir' instead.

Took opportunity to define the path in the 'config-paths.h' in the same way
the other paths are defined to be consistent, which also simplify the
compilation commands.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
b944a4beb2 configure: add check for the program "msgfmt" when i18n is requested
The program may not be installed because it is not needed for non-dev
activities, so it is better to check at the beginning than to let the
compilation fail later. The check is done only if the user has specified
that he wants to install translations.

Took the opportunity to make the generation of "mo" file follow the silent
rules in Makefiles if user enabled them.

Signed-off-by: Christophe <curis@Ares.blacknet.hell>
2015-01-20 21:29:24 +00:00
Christophe CURIS
2cfb2b5276 configure: rewrote detection for 'xgettext'
The main change is to use Autoconf's syntax for consistency;

Now the detected program is used in the makefiles (user has the possibility
to change the name of the command);

A conditional is used to avoid enabling make targets that would fail if
the command does not exist.

Took opportunity to implement the silent-rules compliance to POT generation
rules.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
80e00c3521 configure: rewrote the support for languages in localisation
The code was moved to a dedicated file (wm_i18n.m4) to reduce the size of
configure.ac;

It now searches for gettext+libintl only if LINGUAS is specified, because
there is no need for them otherwise;

The list of supported locales is created automatically from the list of
files present in the source tree, so there won't be problem forgetting to
update the variables when a new language is added, or removed because
one is considered outdated;

The new syntax is now using as much as possible Autoconf's syntax to ensure
consistency and better portability;

Took opportunity to improve the language check loop to make it smaller and
to tell when a locale that the user asked for is not fully supported.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
bb544439f4 make: add a variable 'DOMAIN' for the name of the pot and mo files
Having the name of the domain hard-coded in many places in the makefiles
makes it harder to maintain them, specially because much code is duplicated
between the makefiles that handle po files.

There is now the variable DOMAIN that is set once in each concerned
makefile, and the rest of the makefile makes use of it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
c72f013136 make: remove unnecessary chmod when creating directories for locales installation
The permissions are already set correctly by the installation script, so it
it not necessary to re-do it afterwards, it makes the code more complex and
error prone, so this patch removes these chmods.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
d6abbafeef WPrefs: fix list of source files for translation
A few files were missing from the list of sources files to be translated.

Took opportunity to make a few strings translatable.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:24 +00:00
Christophe CURIS
b266808331 created script to check the list of source files to handle for translation
Because the source file is redefined in the 'po/' directories, there is a
possibility that they get misaligned.

There is now a script that will check everything is in line; it is
triggered by "make check".

The case of the "util/" stuff is excluded at current time because the way
they are defined makes it hard to properly deduce the correct list of
sources, and it is not worth, the core need being on wmaker and WPrefs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-20 21:29:23 +00:00
Christophe CURIS
5c9438115b Renamed "Apercu" to "MiniPreview" in the configuration database
The name of the 2 settings have been changed:
 - enable: MiniwindowApercuBalloons -> MiniwindowPreviewBalloons
 - size: ApercuSize -> MiniPreviewSize

The old name is still supported to avoid breaking user's configuration, but
WPrefs will update the setting to the new names when updating the
configuration.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-31 11:10:46 +00:00
Christophe CURIS
67b4302ef8 Renamed "apercu" to "minipreview" in the source code
To be consistent, all place where the not-properly-written "apercu" was
used in the source code (of wmaker and WPrefs) it has been replaced by an
appropriate "minipreview" or similar, to be in line with the new name
suggested by Yuri Tarasievich.

This new name is better understood by contributors who speak usual english,
but not this word which comes From french but is sparsely understood by
british people.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-31 11:10:30 +00:00
Christophe CURIS
35fe34ac85 Renamed "Aperçu" into "Mini-Preview" in visible places
Having an thing whose name requires special UTF-8 character to be properly
displayed is a source of portability problem (including xgettext issue
reported by Alwin);

Considering also that this french word is only understood (sparesely) in
Great Britain, but not by international english speaking community;

This patch then replace it by the "Mini-Preview" suggested by Yuri
Tarasievich, which is more likely to be understood.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-31 11:09:30 +00:00
Alwin
94136ad29a WPrefs: trivial fixes in text strings
Fix a typo in an error message. Remove an inconsistent dot on a
button. Adds a missing dot in Expert preferences.
2014-12-24 15:24:42 +00:00
Alwin
e3769a0b09 WPrefs: make a text string translatable
The WPrefs miniwindow shows a shorter title that could be translated.
2014-12-23 11:33:36 +00:00
Alwin
1dc7dc4309 Translations: Dutch .po files updated
Recently added/changed msgid's were translated, plus a few cosmetic
improvements. Kept one entry for last stable release.
2014-12-23 11:33:36 +00:00
Doug Torrance
8abf7762cb WPrefs: Clarify purpose of "window snapping" feature in expert panel. 2014-12-23 11:33:36 +00:00
Christophe CURIS
3ed8cb6ffa WPrefs: add possibility to configure the size of the aperçu
The Icon preference panel have been rearranged to include a slider which
controls the size of the Aperçu. This slider is also used to turn off the
feature, so the related checkbox have been removed from the Misc preference
panel, because it is more convenient to have the related settings at the
same place.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Christophe CURIS
31c00a8749 WPrefs: add an image to represent the window in the Window Placement frame
The original square box did not look like anything, by using an image that
looks like a small window it is more clear to users what it represents.

The image was drawn as an XPM keeping a style consistent with everything
else; it was then converted to TIFF using ImageMagick:
  convert -depth 8 -compress lzw xpm/smallwindow.xpm tiff/smallwindow.tiff

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Christophe CURIS
a887b44977 WPrefs: grouped the choices for Window Move Display in a single place
By having an array, it makes the code simpler in many places, thus easier
to maintain and to implement new possibilities.

It is the opportunity to log an error message to user instead of silently
accepting invalid values.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Christophe CURIS
d2101b287a WPrefs: grouped the choices for Window Resize Display in a single place
By having an array, it makes the code simpler in many places, thus easier
to maintain and to implement new possibilities.

It is the opportunity to log an error message to user instead of silently
accepting invalid values.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Christophe CURIS
6ef4b06cca WPrefs: created an array to store the database values for the Icon Position setting
By having an array, it makes the code simpler in many places, thus easier
to maintain. Took opportunity to include a comment about the trick used to
have a value convenient for use.

It is the opportunity to log an error message to user instead of silently
accepting invalid values.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Christophe CURIS
d89b1f5ca3 WPrefs: moved the list of icon animations into an array
By grouping the information together, it makes the code less prone to
errors and easier to maintain as it links things that are related.

Took opportunity to log a message for the case where an invalid value
was found to ease user's debug.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-23 11:33:36 +00:00
Yury Tarasievich
034edb19e3 WPrefs: improve texts in the Window Handling panel
Did not update the translations msgid because I think translators may
wish to get it visible so they can bring similar improvements.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-21 17:35:06 +00:00
Christophe CURIS
f9b14d7824 WPrefs: remove unused constants ICON_TITLE_*FONT
Apparently, there was a time when it was though to add a label below (?)
the icons of the list of panels, but this has never been finished and the
unfinished code to do this was even removed in commit
  0e01e69205

So, as it is unlikely that the "feature" will return, and if it did the
font should be handled in a better way, this patch removes the definition
of the constants with the names for the font used for those labels.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:20 +00:00
Christophe CURIS
1d0f02f5ca remove a few unused constant for size of buffers
As pointed by gcc, a few constants which contain sizes for buffers are not
used anywhere in the code. This is probably due to code cleanup, where
these buffers have been removed or where size is automatically calculated
by using 'sizeof' instead to reduce risk of bugs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:19 +00:00
Christophe CURIS
0c938a3c0c WPrefs: fix icon used in the Opaque/Non-opaque Move setting
Apparently, some pixels from the close button on the window image were
missing from the Non-opaque image, they have been added in the XPM file
which was then converted to TIFF with ImageMagick's command:
  convert -depth 8 -compress lzw xpm/nonopaque.xpm tiff/nonopaque.tiff
to have a file similar to what was there before

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
be4849448f WPrefs: fix memory leak when storing the list of texture in Appearence panel (Coverity #50112)
As pointed by Coverity, the PLStrings created to store the information on
the texture leak. This is due to the fact that they are created with a
refCount of 1, then the PLArray in which they are placed increments that
count, so at list destruction the count would return to 1 instead of 0,
meaning the PLStrings won't be freed.

This patch release the PLStrings once after adding them to the PLArray so
the count will go back to 1, which means they will be properly freed when
the PLArray will be released.

Took opportunity to remove the call to WMRetainPropList on the titem-prop
because it artificially increases the refCount but this is already done
when adding to the PLArray.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
David Maciejak
ea8f18aff1 WPrefs: add workspace pager configuration
This patch is adding a checkbox in the expert zone to disable
completely the workspace pager and add an entry in keyshortcut
preference to set the shortcut used to open the pager with the
action "Open workspace pager".

The default frame background can be configured by setting an optional
variable "WorkspaceMapBack" from WindowMaker conf file as in:

WorkspaceMapBack = (tpixmap, "/tmp/testme.png", gray20);

or

WorkspaceMapBack = (solid, "#2c2482");
2014-12-10 10:19:18 +00:00
Christophe CURIS
12babda9e7 WPrefs: link against math library because it is used in a few places
The code is making use of a few of the libm functions, but it looks like
gcc adds automatically the libm dependency (either by trying to be smart or
as an inherited dependency?).

Apparently, when compiling with clang-3.5 the function 'round' still needs
the use of math library (the others do not seem to), so this patch adds it
to the list of link libraries, which is more portable.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-07 09:52:21 +00:00
Christophe CURIS
80f18f60d2 WPrefs: Use standard C declaration of array instead of GNU syntax
As pointed by Clang, the declaration of array was using the GNU old syntax,
not the standard C.
2014-12-07 09:52:21 +00:00
Christophe CURIS
8ed6eacd06 WPrefs: fix memory leaks on temporary colours to draw icon's title in Appearence preview (Coverity #72808, #72810)
Two WMColor were created to draw the background for the title on icons for
iconified windows, in the Appearance panel. As pointed by Coverity, these
colors were not released after use, which this patch fixes.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-29 18:44:48 +00:00
Christophe CURIS
54feb499cb WPrefs: fix memory leak when storing the list of colors in Appearence panel
The name of the color is stored in a newly created PLString which leaks.
This is due to the fact that they are created with a refCount of 1, then
the PLArray in which they are placed increments that count, so at list
destruction the count would return to 1 instead of 0, meaning the
PLString won't be freed.

This patch properly calls  WMReleasePropList after addition to the list, so
that the count goes back to 1, which means it will be automatically freed
when the PLArray will be released.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-29 18:44:48 +00:00
Christophe CURIS
3a15750ad5 WPrefs: add check for image validity in 'loadRImage' (Coverity #50221, #50081)
As pointed by Coverity, the function blindly trust the data read from the
file, but in case of problem (corrupted file, not enough memory) it could
behave badly.

This patch adds a check for the depth, counts on RCreateImage to check the
width and height, and in any case it now includes a message for the user in
case he would like to understand what's wrong.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:43:38 +00:00
Christophe CURIS
d1e1521a88 WPrefs: fix possible buffer overrun (Coverity #50216)
As pointed by Coverity, if the Keysym name is very long and many modifiers
are used, the function 'capture_shortcut' could overflow its internal
buffer.

As the case is very unlikely to appear, do not increase the size of the internal
buffer (it seems to be already well sized, and we have no know maximum size
for a Keysym name), just use the appropriate function to append the name
at the end.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:43:38 +00:00
Christophe CURIS
8c1f59a40f WPrefs: remove fuzzy translation that are likely to puzzle user
Unfortunately this will lower the translation score for German, but the
translation guessed by fuzzy matching in gettext is not acceptable in the
current case: the translated string is already used for another entry in
the list, meaning that user would not see the difference between the two
and would probably then not understand why things do not behave the way he
expects.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-23 22:43:38 +00:00
Alwin
40139e208b Catch-up and some cosmetic changes of the Dutch .po files
Catch-up and some cosmetic changes of the Dutch .po files

Recently added msgid's were translated, plus a few really minor
changes. Kept some entries for last stable release.
2014-11-23 22:42:18 +00:00
Gaspar Chilingarov
7cb948098a wmaker: Support omnipresent setting toggle from keyboard 2014-11-23 22:42:18 +00:00
Christophe CURIS
33855a7a12 WPrefs: replaced call to external program "chmod" by the equivalent system call
It is more efficient to use the dedicated function than to call an external
binary program to do the job, and it reduce the risk of problem in case the
path would end up with potentially problematic characters.

It should also close Coverity bug #50225 ("Use of untrusted string value")

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-23 22:42:18 +00:00
Christophe CURIS
34f35ee534 WPrefs: changed label from "msec" to the standard "ms" from the SI
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>
2014-11-23 22:42:18 +00:00
Christophe CURIS
3846609072 WPrefs: minor improvements to the Workspace panel
It is general practice to not consider the strings displayed in a dialog as
real sentences, so this patch removes the dots at the end (including in the
translation);

Took the opportunity to fix some translated string that were probably not
found anymore to due other changes;

Moved a few widgets to make everything look better centered;

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-23 22:42:18 +00:00
Christophe CURIS
7e40a61d16 WPrefs: minor reorganisation in the Keyboard Shortcut panel
The goal was to reduce the risk of truncated lines in the list of actions
(a few of them are a bit long - and need to be!), so it was an opportunity
to align the widgets with consistent spacing.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:04 +00:00
Christophe CURIS
14dc8dd415 WPrefs: minor improvements to the Focus Preference panel
It is general practice to not consider the strings displayed in a dialog as
real sentences, so this patch removes the dots at the end (including in the
translation);

Took the opportunity to make a light cleanup of the translations in the
concerned areas, and fix some translated string that were probably not
found anymore to due other changes;

Make small reorganisation of the widgets to reduce the risk of truncated
strings, with keeping the overall clean aspect of the panel;

Took the opportunity to clarify the label related to the colormap to avoid
misunderstanding, and include a balloon text to clarify its reason-to-be
because, as modern display tend to all be TrueColor, it may not be
intuitive to new user what it's for.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:04 +00:00
Christophe CURIS
1b183633e1 WPrefs: small reorganisation in the Dock Preferences panel
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>
2014-11-08 20:12:03 +00:00
Christophe CURIS
c3c8a0654c WPrefs: reorganised the Window Handling Settings panel for better look
Due to a long history of evolution, it was time to rethink the placement
of all widgets to achieve a clean look. The frames have been reshuffled to
be aligned to each other, and as a bonus the Mod+Wheel setting now has its
own frame instead of being part of another unrelated frame.

Took opportunity to include an info balloon to explain what the "by
keyboard" checkbox actually means.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:03 +00:00
Christophe CURIS
753f44ca83 WPrefs: reorganised the Preference panel for better look
As many option have been added to it, the panel started to look overloaded.
With a little rework, it now displays the same options in a cleaner way.
Took opportunity to include some balloon help for the AppIcon option to try
to be clearer than what the short label allows.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:03 +00:00
Christophe CURIS
03a7771c86 WPrefs: reorganised the Mouse Settings panel for better look
As many option have been added to it, the panel started to look overloaded.
Content have been slightly moved to make it look nicely organised inside
the window, and with possibly less truncated text.

Took opportunity to include a visual feedback to the user, when checking
the "Disable mouse actions" box then we disable the related popup menu
buttons to reflect this.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:03 +00:00
Christophe CURIS
60d9fc5bb7 WPrefs: grouped items related to the mouse actions in a single place
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-11-08 20:12:03 +00:00
Christophe CURIS
17c3404bef WPrefs: grouped the balloon text for the dock configuration with the rest of the struct
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>
2014-11-08 20:12:03 +00:00