mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
wmaker: fix detection of legacy Apercu configuration keywords
As reported by Josip, the code in Window Maker to detect the use of the legacy keyword "MiniwindowApercuBalloons" and "ApercuSize" was broken, which means they were always seen as used even when not present. This patch fixes the detection to only use them if they were effectively used. Reported-by: Josip Deanovic <djosip+news@linuxpages.net> Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
0dfb42caae
commit
ae7e228aa4
@@ -529,7 +529,7 @@ WDefaultEntry optionList[] = {
|
|||||||
*/
|
*/
|
||||||
{"MiniwindowApercuBalloons", "NO", NULL,
|
{"MiniwindowApercuBalloons", "NO", NULL,
|
||||||
&legacy_minipreview_config.enable, getBool, NULL, NULL, NULL},
|
&legacy_minipreview_config.enable, getBool, NULL, NULL, NULL},
|
||||||
{"ApercuSize", "128", NULL,
|
{"ApercuSize", "0", NULL,
|
||||||
&legacy_minipreview_config.size, getInt, NULL, NULL, NULL},
|
&legacy_minipreview_config.size, getInt, NULL, NULL, NULL},
|
||||||
|
|
||||||
/* style options */
|
/* style options */
|
||||||
@@ -1155,10 +1155,6 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
|
|||||||
void *tdata;
|
void *tdata;
|
||||||
WMPropList *old_dict = (w_global.domain.wmaker->dictionary != new_dict ? w_global.domain.wmaker->dictionary : NULL);
|
WMPropList *old_dict = (w_global.domain.wmaker->dictionary != new_dict ? w_global.domain.wmaker->dictionary : NULL);
|
||||||
|
|
||||||
/* Backward Compatibility: init array to special value to detect if they changed */
|
|
||||||
legacy_minipreview_config.enable = 99;
|
|
||||||
legacy_minipreview_config.size = -1;
|
|
||||||
|
|
||||||
needs_refresh = 0;
|
needs_refresh = 0;
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(optionList); i++) {
|
for (i = 0; i < wlengthof(optionList); i++) {
|
||||||
@@ -1223,11 +1219,11 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
|
|||||||
* This code should probably stay for at least 2 years, you should not consider removing
|
* This code should probably stay for at least 2 years, you should not consider removing
|
||||||
* it before year 2017
|
* it before year 2017
|
||||||
*/
|
*/
|
||||||
if (legacy_minipreview_config.enable != 99) {
|
if (legacy_minipreview_config.enable) {
|
||||||
wwarning(_("your configuration is using old syntax for Mini-Preview settings; consider running WPrefs.app to update"));
|
wwarning(_("your configuration is using old syntax for Mini-Preview settings; consider running WPrefs.app to update"));
|
||||||
wPreferences.miniwin_preview_balloon = legacy_minipreview_config.enable;
|
wPreferences.miniwin_preview_balloon = legacy_minipreview_config.enable;
|
||||||
|
|
||||||
if (legacy_minipreview_config.size >= 0) {
|
if (legacy_minipreview_config.size > 0) {
|
||||||
/*
|
/*
|
||||||
* the option 'ApercuSize' used to be coded as a multiple of the icon size in v0.95.6
|
* the option 'ApercuSize' used to be coded as a multiple of the icon size in v0.95.6
|
||||||
* it is now expressed directly in pixels, but to avoid breaking user's setting we check
|
* it is now expressed directly in pixels, but to avoid breaking user's setting we check
|
||||||
|
|||||||
Reference in New Issue
Block a user