This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 5c9438115b478c6b15059f98873acb0f5cd9e1af (commit)
via 67b4302ef8f4ac641f1c27a8423b33134bcbe063 (commit)
via 35fe34ac854237c5616fd39c799eead282658667 (commit)
from e78e485fb3fe3e46870d874ed9bc78764b930fdd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/5c9438115b478c6b15059f98873acb0f5cd9e1af
commit 5c9438115b478c6b15059f98873acb0f5cd9e1af
Author: Christophe CURIS <[email protected]>
Date: Wed Dec 31 01:09:53 2014 +0100
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 <[email protected]>
diff --git a/NEWS b/NEWS
index 889d019f..172c970d 100644
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,15 @@ WPrefs.app, the option to "Open dialogs in the same
workspace as their owners"
~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences".
+Mini-Previews instead of Apercus
+--------------------------------
+
+Since the original name was not really clear because it is a French word that
+is rarely used by British people, it was decided to change it to the more usual
+Mini-Preview name. The setting is configurable with WPrefs in the Icon
+Preferences tab, the size is now expressed in pixels directly.
+
+
--- 0.95.6
More image format supported
diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c
index d8e11ab2..a58630ad 100644
--- a/WPrefs.app/Icons.c
+++ b/WPrefs.app/Icons.c
@@ -198,13 +198,35 @@ static void showData(_Panel * panel)
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
/* Mini-Previews for Icons */
- b = GetBoolForKey("MiniwindowApercuBalloons");
- if (b) {
- i = GetIntegerForKey("ApercuSize");
- if (i <= minipreview_minimum_size)
+
+ /*
+ * Backward Compatibility:
+ * These settings changed names after 0.95.6, so to avoid breaking
user's
+ * config we still support the old names, and silently convert them to
the
+ * new settings
+ * This hack should be kept for at least 2 years, that means >= 2017.
+ */
+ str = GetStringForKey("MiniwindowPreviewBalloons");
+ if (str != NULL) {
+ /* New names found, use them in priority */
+ b = GetBoolForKey("MiniwindowPreviewBalloons");
+ if (b) {
+ i = GetIntegerForKey("MiniPreviewSize");
+ if (i <= minipreview_minimum_size)
+ i = minipreview_minimum_size;
+ } else {
i = minipreview_minimum_size;
+ }
} else {
- i = minipreview_minimum_size;
+ /* No new names, try the legacy names */
+ b = GetBoolForKey("MiniwindowApercuBalloons");
+ if (b) {
+ i = GetIntegerForKey("ApercuSize");
+ if (i <= minipreview_minimum_size)
+ i = minipreview_minimum_size;
+ } else {
+ i = minipreview_minimum_size;
+ }
}
WMSetSliderValue(panel->minipreview.slider, i);
minipreview_slider_changed(panel->minipreview.slider, panel);
@@ -431,9 +453,9 @@ static void storeData(_Panel * panel)
i = WMGetSliderValue(panel->minipreview.slider);
if (i <= minipreview_minimum_size) {
- SetBoolForKey(False, "MiniwindowApercuBalloons");
+ SetBoolForKey(False, "MiniwindowPreviewBalloons");
} else {
- SetBoolForKey(True, "MiniwindowApercuBalloons");
+ SetBoolForKey(True, "MiniwindowPreviewBalloons");
if (i < minipreview_maximum_size) {
/*
* If the value is bigger, it means it was edited by
the user manually
@@ -442,7 +464,7 @@ static void storeData(_Panel * panel)
*/
i &= ~7;
}
- SetIntegerForKey(i, "ApercuSize");
+ SetIntegerForKey(i, "MiniPreviewSize");
}
for (i = 0; i < wlengthof(icon_animation); i++) {
diff --git a/src/defaults.c b/src/defaults.c
index a6bffeb8..ee027dc0 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -319,6 +319,17 @@ static WOptionEnumeration seDragMaximizedWindow[] = {
};
/*
+ * Backward Compatibility:
+ * The Mini-Previews were introduced in 0.95.6 under the name "Apercu".
+ * For compatibility, we still support the old names in configuration files,
+ * which are loaded in this structure, so this should stay for at least
+ * 2 years (that means until 2017) */
+static struct {
+ char enable;
+ int size;
+} legacy_minipreview_config;
+
+/*
* ALL entries in the tables bellow, NEED to have a default value
* defined, and this value needs to be correct.
*/
@@ -485,7 +496,7 @@ WDefaultEntry optionList[] = {
&wPreferences.window_balloon, getBool, NULL, NULL, NULL},
{"MiniwindowTitleBalloons", "NO", NULL,
&wPreferences.miniwin_title_balloon, getBool, NULL, NULL, NULL},
- {"MiniwindowApercuBalloons", "NO", NULL,
+ {"MiniwindowPreviewBalloons", "NO", NULL,
&wPreferences.miniwin_preview_balloon, getBool, NULL, NULL, NULL},
{"AppIconBalloons", "NO", NULL,
&wPreferences.appicon_balloon, getBool, NULL, NULL, NULL},
@@ -505,9 +516,20 @@ WDefaultEntry optionList[] = {
&wPreferences.strict_windoze_cycle, getBool, NULL, NULL, NULL},
{"SwitchPanelOnlyOpen", "NO", NULL,
&wPreferences.panel_only_open, getBool, NULL, NULL, NULL},
- {"ApercuSize", "128", NULL,
+ {"MiniPreviewSize", "128", NULL,
&wPreferences.minipreview_size, getInt, NULL, NULL, NULL},
+ /*
+ * Backward Compatibility:
+ * The Mini-Previews were introduced in 0.95.6 under the name "Apercu".
+ * For compatibility, we still support the old names in configuration
files,
+ * so this should stay for at least 2 years (that means until 2017)
+ */
+ {"MiniwindowApercuBalloons", "NO", NULL,
+ &legacy_minipreview_config.enable, getBool, NULL, NULL, NULL},
+ {"ApercuSize", "128", NULL,
+ &legacy_minipreview_config.size, getInt, NULL, NULL, NULL},
+
/* style options */
{"MenuStyle", "normal", seMenuStyles,
@@ -1131,6 +1153,10 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
void *tdata;
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;
for (i = 0; i < wlengthof(optionList); i++) {
@@ -1190,18 +1216,28 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
/*
* Backward Compatibility:
- * the option 'minipreview_size' 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
- * for old coding and convert it now.
+ * Support the old setting names for Apercu, now called Mini-Preview
+ *
* This code should probably stay for at least 2 years, you should not
consider removing
* it before year 2017
*/
- if (wPreferences.minipreview_size < 24) {
- /* 24 is the minimum icon size proposed in WPref's settings */
- wPreferences.minipreview_size *= wPreferences.icon_size;
- if (wPreferences.miniwin_preview_balloon)
- wwarning(_("your ApercuSize setting is using old
syntax, it is converted to %d pixels; consider running WPrefs.app to update
your settings"),
- wPreferences.minipreview_size);
+ if (legacy_minipreview_config.enable != 99) {
+ 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;
+
+ if (legacy_minipreview_config.size >= 0) {
+ /*
+ * 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
+ * for old coding and convert it now.
+ */
+ if (legacy_minipreview_config.size < 24) {
+ /* 24 is the minimum icon size proposed in
WPref's settings */
+ wPreferences.minipreview_size =
legacy_minipreview_config.size * wPreferences.icon_size;
+ } else {
+ wPreferences.minipreview_size =
legacy_minipreview_config.size;
+ }
+ }
}
if (needs_refresh != 0 && !scr->flags.startup) {
http://repo.or.cz/w/wmaker-crm.git/commit/67b4302ef8f4ac641f1c27a8423b33134bcbe063
commit 67b4302ef8f4ac641f1c27a8423b33134bcbe063
Author: Christophe CURIS <[email protected]>
Date: Wed Dec 31 01:09:24 2014 +0100
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 <[email protected]>
diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c
index 76ed866a..d8e11ab2 100644
--- a/WPrefs.app/Icons.c
+++ b/WPrefs.app/Icons.c
@@ -84,7 +84,7 @@ typedef struct _Panel {
WMFrame *frame;
WMSlider *slider;
WMLabel *label;
- } apercu;
+ } minipreview;
WMFrame *sizeF;
WMPopUpButton *sizeP;
@@ -98,9 +98,9 @@ typedef struct _Panel {
* We set the slider min to taht number minus one, because when set to this
* value WPrefs will consider that the user wants the feature turned off.
*/
-static const int apercu_minimum_size = 2 * 24 - 1;
+static const int minipreview_minimum_size = 2 * 24 - 1;
-static const int apercu_maximum_size = 512; /* Arbitrary limit for the
slider */
+static const int minipreview_maximum_size = 512; /* Arbitrary limit for
the slider */
#define ICON_FILE "iconprefs"
@@ -142,7 +142,7 @@ static void showIconLayout(WMWidget * widget, void *data)
}
}
-static void apercu_slider_changed(WMWidget *w, void *data)
+static void minipreview_slider_changed(WMWidget *w, void *data)
{
_Panel *panel = (_Panel *) data;
char buffer[64];
@@ -151,17 +151,17 @@ static void apercu_slider_changed(WMWidget *w, void *data)
/* Parameter is not used, but tell the compiler that it is ok */
(void) w;
- value = WMGetSliderValue(panel->apercu.slider);
+ value = WMGetSliderValue(panel->minipreview.slider);
/* Round the value to a multiple of 8 because it makes the displayed
value look better */
value &= ~7;
- if (value <= apercu_minimum_size)
+ if (value <= minipreview_minimum_size)
sprintf(buffer, _("OFF"));
else
sprintf(buffer, "%i", value);
- WMSetLabelText(panel->apercu.label, buffer);
+ WMSetLabelText(panel->minipreview.label, buffer);
}
static void showData(_Panel * panel)
@@ -201,13 +201,13 @@ static void showData(_Panel * panel)
b = GetBoolForKey("MiniwindowApercuBalloons");
if (b) {
i = GetIntegerForKey("ApercuSize");
- if (i <= apercu_minimum_size)
- i = apercu_minimum_size;
+ if (i <= minipreview_minimum_size)
+ i = minipreview_minimum_size;
} else {
- i = apercu_minimum_size;
+ i = minipreview_minimum_size;
}
- WMSetSliderValue(panel->apercu.slider, i);
- apercu_slider_changed(panel->apercu.slider, panel);
+ WMSetSliderValue(panel->minipreview.slider, i);
+ minipreview_slider_changed(panel->minipreview.slider, panel);
/* Animation */
str = GetStringForKey("IconificationStyle");
@@ -340,28 +340,28 @@ static void createPanel(Panel * p)
WMMapSubwidgets(panel->sizeF);
/***************** Mini-Previews ****************/
- panel->apercu.frame = WMCreateFrame(panel->box);
- WMResizeWidget(panel->apercu.frame, 156, 52);
- WMMoveWidget(panel->apercu.frame, 124, 168);
- WMSetFrameTitle(panel->apercu.frame, _("Mini-Previews for Icons"));
+ panel->minipreview.frame = WMCreateFrame(panel->box);
+ WMResizeWidget(panel->minipreview.frame, 156, 52);
+ WMMoveWidget(panel->minipreview.frame, 124, 168);
+ WMSetFrameTitle(panel->minipreview.frame, _("Mini-Previews for Icons"));
WMSetBalloonTextForView(_("The Mini-Preview provides a small view of
the content of then"
"window when the mouse is placed over the
icon."),
- WMWidgetView(panel->apercu.frame));
+ WMWidgetView(panel->minipreview.frame));
- panel->apercu.slider = WMCreateSlider(panel->apercu.frame);
- WMResizeWidget(panel->apercu.slider, 109, 15);
- WMMoveWidget(panel->apercu.slider, 11, 23);
- WMSetSliderMinValue(panel->apercu.slider, apercu_minimum_size);
- WMSetSliderMaxValue(panel->apercu.slider, apercu_maximum_size);
- WMSetSliderAction(panel->apercu.slider, apercu_slider_changed, panel);
+ panel->minipreview.slider = WMCreateSlider(panel->minipreview.frame);
+ WMResizeWidget(panel->minipreview.slider, 109, 15);
+ WMMoveWidget(panel->minipreview.slider, 11, 23);
+ WMSetSliderMinValue(panel->minipreview.slider,
minipreview_minimum_size);
+ WMSetSliderMaxValue(panel->minipreview.slider,
minipreview_maximum_size);
+ WMSetSliderAction(panel->minipreview.slider,
minipreview_slider_changed, panel);
- panel->apercu.label = WMCreateLabel(panel->apercu.frame);
- WMResizeWidget(panel->apercu.label, 33, 15);
- WMMoveWidget(panel->apercu.label, 120, 23);
- WMSetLabelText(panel->apercu.label, _("OFF"));
+ panel->minipreview.label = WMCreateLabel(panel->minipreview.frame);
+ WMResizeWidget(panel->minipreview.label, 33, 15);
+ WMMoveWidget(panel->minipreview.label, 120, 23);
+ WMSetLabelText(panel->minipreview.label, _("OFF"));
- WMMapSubwidgets(panel->apercu.frame);
+ WMMapSubwidgets(panel->minipreview.frame);
/***************** Animation ****************/
panel->animF = WMCreateFrame(panel->box);
@@ -429,12 +429,12 @@ static void storeData(_Panel * panel)
SetStringForKey(icon_position_dbvalue[panel->iconPos], "IconPosition");
- i = WMGetSliderValue(panel->apercu.slider);
- if (i <= apercu_minimum_size) {
+ i = WMGetSliderValue(panel->minipreview.slider);
+ if (i <= minipreview_minimum_size) {
SetBoolForKey(False, "MiniwindowApercuBalloons");
} else {
SetBoolForKey(True, "MiniwindowApercuBalloons");
- if (i < apercu_maximum_size) {
+ if (i < minipreview_maximum_size) {
/*
* If the value is bigger, it means it was edited by
the user manually
* so we keep as-is. Otherwise, we round it to a
multiple of 8 like it
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index ec95075c..0a1d81f6 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -413,7 +413,7 @@ extern struct WPreferences {
/* balloon text */
char window_balloon;
char miniwin_title_balloon;
- char miniwin_apercu_balloon;
+ char miniwin_preview_balloon;
char appicon_balloon;
char help_balloon;
@@ -446,7 +446,7 @@ extern struct WPreferences {
char cycle_ignore_minimized; /* Ignore minimized windows when
cycling */
char strict_windoze_cycle; /* don't close switch panel when
shift is released */
char panel_only_open; /* Only open the switch panel;
don't switch */
- int apercu_size; /* Size of Mini-Previews in pixels
*/
+ int minipreview_size; /* Size of Mini-Previews in pixels
*/
/* All delays here are in ms. 0 means instant auto-action. */
int clip_auto_raise_delay; /* Delay after which the clip will
be raised when entered */
diff --git a/src/actions.c b/src/actions.c
index c4656460..1450fdb3 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1124,7 +1124,7 @@ void wIconifyWindow(WWindow *wwin)
/* extract the window screenshot everytime, as the option can
be enable anytime */
if (wwin->client_win && wwin->flags.mapped) {
- RImage *apercu;
+ RImage *mini_preview;
XImage *pimg;
unsigned int w, h;
int x, y;
@@ -1144,12 +1144,12 @@ void wIconifyWindow(WWindow *wwin)
pimg = XGetImage(dpy, wwin->client_win, 0, 0, w, h,
AllPlanes, ZPixmap);
if (pimg) {
- apercu =
RCreateImageFromXImage(wwin->screen_ptr->rcontext, pimg, NULL);
+ mini_preview =
RCreateImageFromXImage(wwin->screen_ptr->rcontext, pimg, NULL);
XDestroyImage(pimg);
- if (apercu) {
- set_icon_apercu(wwin->icon, apercu);
- RReleaseImage(apercu);
+ if (mini_preview) {
+ set_icon_minipreview(wwin->icon,
mini_preview);
+ RReleaseImage(mini_preview);
} else {
wwarning(_("window mini-preview
creation failed"));
}
diff --git a/src/balloon.c b/src/balloon.c
index 8d883d93..871bcd21 100644
--- a/src/balloon.c
+++ b/src/balloon.c
@@ -61,7 +61,7 @@ typedef struct _WBalloon {
WMHandlerID timer;
Pixmap contents;
- Pixmap apercu;
+ Pixmap mini_preview;
char mapped;
char ignoreTimer;
@@ -371,7 +371,7 @@ static void showText(WScreen *scr, int x, int y, int h, int
w, const char *text)
}
#endif /* !SHAPED_BALLOON */
-static void showApercu(WScreen *scr, int x, int y, const char *title, Pixmap
apercu)
+static void show_minipreview(WScreen *scr, int x, int y, const char *title,
Pixmap mini_preview)
{
Pixmap pixmap;
WMFont *font = scr->info_text_font;
@@ -382,11 +382,11 @@ static void showApercu(WScreen *scr, int x, int y, const
char *title, Pixmap ape
if (scr->balloon->contents)
XFreePixmap(dpy, scr->balloon->contents);
- width = wPreferences.apercu_size;
- height = wPreferences.apercu_size;
+ width = wPreferences.minipreview_size;
+ height = wPreferences.minipreview_size;
if (wPreferences.miniwin_title_balloon) {
- shortenTitle = ShrinkString(font, title, width - APERCU_BORDER
* 2);
+ shortenTitle = ShrinkString(font, title, width -
MINIPREVIEW_BORDER * 2);
titleHeight = countLines(shortenTitle) * WMFontHeight(font) + 4;
height += titleHeight;
} else {
@@ -417,14 +417,14 @@ static void showApercu(WScreen *scr, int x, int y, const
char *title, Pixmap ape
if (shortenTitle != NULL) {
drawMultiLineString(scr->wmscreen, pixmap,
scr->window_title_color[0], font,
- APERCU_BORDER, APERCU_BORDER,
shortenTitle, strlen(shortenTitle));
+ MINIPREVIEW_BORDER,
MINIPREVIEW_BORDER, shortenTitle, strlen(shortenTitle));
wfree(shortenTitle);
}
- XCopyArea(dpy, apercu, pixmap, scr->draw_gc,
- 0, 0, (wPreferences.apercu_size - 1 - APERCU_BORDER * 2),
- (wPreferences.apercu_size - 1 - APERCU_BORDER * 2),
- APERCU_BORDER, APERCU_BORDER + titleHeight);
+ XCopyArea(dpy, mini_preview, pixmap, scr->draw_gc,
+ 0, 0, (wPreferences.minipreview_size - 1 - MINIPREVIEW_BORDER
* 2),
+ (wPreferences.minipreview_size - 1 - MINIPREVIEW_BORDER * 2),
+ MINIPREVIEW_BORDER, MINIPREVIEW_BORDER + titleHeight);
#ifdef SHAPED_BALLOON
XShapeCombineMask(dpy, scr->balloon->window, ShapeBounding, 0, 0, None,
ShapeSet);
@@ -457,9 +457,9 @@ static void showBalloon(WScreen *scr)
return;
}
- if (wPreferences.miniwin_apercu_balloon && scr->balloon->apercu != None)
+ if (wPreferences.miniwin_preview_balloon && scr->balloon->mini_preview
!= None)
/* used to display either the mini-preview alone or the
mini-preview with the title */
- showApercu(scr, x, y, scr->balloon->text, scr->balloon->apercu);
+ show_minipreview(scr, x, y, scr->balloon->text,
scr->balloon->mini_preview);
else
showText(scr, x, y, scr->balloon->h, w, scr->balloon->text);
}
@@ -492,7 +492,7 @@ static void miniwindowBalloon(WObjDescriptor *object)
}
scr->balloon->h = icon->core->height;
scr->balloon->text = wstrdup(icon->icon_name);
- scr->balloon->apercu = icon->apercu;
+ scr->balloon->mini_preview = icon->mini_preview;
scr->balloon->objectWindow = icon->core->window;
if ((scr->balloon->prevType == object->parent_type ||
scr->balloon->prevType == WCLASS_APPICON)
@@ -617,7 +617,7 @@ void wBalloonEnteredObject(WScreen *scr, WObjDescriptor
*object)
wfree(scr->balloon->text);
scr->balloon->text = NULL;
- scr->balloon->apercu = None;
+ scr->balloon->mini_preview = None;
if (!object) {
wBalloonHide(scr);
@@ -635,7 +635,7 @@ void wBalloonEnteredObject(WScreen *scr, WObjDescriptor
*object)
appiconBalloon(object);
break;
case WCLASS_MINIWINDOW:
- if (wPreferences.miniwin_title_balloon ||
wPreferences.miniwin_apercu_balloon)
+ if (wPreferences.miniwin_title_balloon ||
wPreferences.miniwin_preview_balloon)
miniwindowBalloon(object);
break;
case WCLASS_APPICON:
diff --git a/src/defaults.c b/src/defaults.c
index b1b5050a..a6bffeb8 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -486,7 +486,7 @@ WDefaultEntry optionList[] = {
{"MiniwindowTitleBalloons", "NO", NULL,
&wPreferences.miniwin_title_balloon, getBool, NULL, NULL, NULL},
{"MiniwindowApercuBalloons", "NO", NULL,
- &wPreferences.miniwin_apercu_balloon, getBool, NULL, NULL, NULL},
+ &wPreferences.miniwin_preview_balloon, getBool, NULL, NULL, NULL},
{"AppIconBalloons", "NO", NULL,
&wPreferences.appicon_balloon, getBool, NULL, NULL, NULL},
{"HelpBalloons", "NO", NULL,
@@ -506,7 +506,7 @@ WDefaultEntry optionList[] = {
{"SwitchPanelOnlyOpen", "NO", NULL,
&wPreferences.panel_only_open, getBool, NULL, NULL, NULL},
{"ApercuSize", "128", NULL,
- &wPreferences.apercu_size, getInt, NULL, NULL, NULL},
+ &wPreferences.minipreview_size, getInt, NULL, NULL, NULL},
/* style options */
@@ -1190,18 +1190,18 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
/*
* Backward Compatibility:
- * the option 'apercu_size' used to be coded as a multiple of the icon
size in v0.95.6
+ * the option 'minipreview_size' 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
* for old coding and convert it now.
* This code should probably stay for at least 2 years, you should not
consider removing
* it before year 2017
*/
- if (wPreferences.apercu_size < 24) {
+ if (wPreferences.minipreview_size < 24) {
/* 24 is the minimum icon size proposed in WPref's settings */
- wPreferences.apercu_size *= wPreferences.icon_size;
- if (wPreferences.miniwin_apercu_balloon)
+ wPreferences.minipreview_size *= wPreferences.icon_size;
+ if (wPreferences.miniwin_preview_balloon)
wwarning(_("your ApercuSize setting is using old
syntax, it is converted to %d pixels; consider running WPrefs.app to update
your settings"),
- wPreferences.apercu_size);
+ wPreferences.minipreview_size);
}
if (needs_refresh != 0 && !scr->flags.startup) {
diff --git a/src/icon.c b/src/icon.c
index 75f5293e..721c4287 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -225,8 +225,8 @@ void wIconDestroy(WIcon *icon)
if (icon->pixmap)
XFreePixmap(dpy, icon->pixmap);
- if (icon->apercu)
- XFreePixmap(dpy, icon->apercu);
+ if (icon->mini_preview)
+ XFreePixmap(dpy, icon->mini_preview);
unset_icon_image(icon);
@@ -587,21 +587,21 @@ void set_icon_image_from_image(WIcon *icon, RImage *image)
icon->file_image = image;
}
-void set_icon_apercu(WIcon *icon, RImage *image)
+void set_icon_minipreview(WIcon *icon, RImage *image)
{
Pixmap tmp;
- RImage *scaled_apercu;
+ RImage *scaled_mini_preview;
WScreen *scr = icon->core->screen_ptr;
- scaled_apercu = RSmoothScaleImage(image, wPreferences.apercu_size - 2 *
APERCU_BORDER,
- wPreferences.apercu_size - 2 *
APERCU_BORDER);
+ scaled_mini_preview = RSmoothScaleImage(image,
wPreferences.minipreview_size - 2 * MINIPREVIEW_BORDER,
+ wPreferences.minipreview_size - 2 *
MINIPREVIEW_BORDER);
- if (RConvertImage(scr->rcontext, scaled_apercu, &tmp)) {
- if (icon->apercu != None)
- XFreePixmap(dpy, icon->apercu);
- icon->apercu = tmp;
+ if (RConvertImage(scr->rcontext, scaled_mini_preview, &tmp)) {
+ if (icon->mini_preview != None)
+ XFreePixmap(dpy, icon->mini_preview);
+ icon->mini_preview = tmp;
}
- RReleaseImage(scaled_apercu);
+ RReleaseImage(scaled_mini_preview);
}
void wIconUpdate(WIcon *icon)
diff --git a/src/icon.h b/src/icon.h
index 14db37e1..dbcb2893 100644
--- a/src/icon.h
+++ b/src/icon.h
@@ -30,7 +30,7 @@
#define TILE_DRAWER 2
/* This is the border, in pixel, drawn around a Mini-Preview */
-#define APERCU_BORDER 1
+#define MINIPREVIEW_BORDER 1
typedef struct WIcon {
WCoreWindow *core;
@@ -51,7 +51,7 @@ typedef struct WIcon {
unsigned int highlighted:1;
Pixmap pixmap;
- Pixmap apercu;
+ Pixmap mini_preview;
WMHandlerID handlerID; /* timer handler ID for cycling select
* color */
@@ -78,6 +78,6 @@ char *get_name_for_instance_class(const char *wm_instance,
const char *wm_class)
void wIconSetHighlited(WIcon *icon, Bool flag);
void set_icon_image_from_image(WIcon *icon, RImage *image);
-void set_icon_apercu(WIcon *icon, RImage *image);
+void set_icon_minipreview(WIcon *icon, RImage *image);
#endif /* WMICON_H_ */
diff --git a/src/wsmap.c b/src/wsmap.c
index bc7a2ff1..e2b67478 100755
--- a/src/wsmap.c
+++ b/src/wsmap.c
@@ -73,22 +73,22 @@ void wWorkspaceMapUpdate(WScreen *scr)
scr->scr_width, scr->scr_height,
AllPlanes, ZPixmap);
if (pimg) {
- RImage *apercu;
+ RImage *mini_preview;
- apercu = RCreateImageFromXImage(scr->rcontext, pimg, NULL);
+ mini_preview = RCreateImageFromXImage(scr->rcontext, pimg,
NULL);
XDestroyImage(pimg);
- if (apercu) {
+ if (mini_preview) {
RImage *tmp =
scr->workspaces[scr->current_workspace]->map;
if (tmp)
RReleaseImage(tmp);
scr->workspaces[scr->current_workspace]->map =
- RSmoothScaleImage(apercu,
+ RSmoothScaleImage(mini_preview,
scr->scr_width /
WORKSPACE_MAP_RATIO,
scr->scr_height /
WORKSPACE_MAP_RATIO);
- RReleaseImage(apercu);
+ RReleaseImage(mini_preview);
}
}
}
http://repo.or.cz/w/wmaker-crm.git/commit/35fe34ac854237c5616fd39c799eead282658667
commit 35fe34ac854237c5616fd39c799eead282658667
Author: Christophe CURIS <[email protected]>
Date: Wed Dec 31 01:08:56 2014 +0100
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 <[email protected]>
diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c
index 5c33f5d4..76ed866a 100644
--- a/WPrefs.app/Icons.c
+++ b/WPrefs.app/Icons.c
@@ -93,7 +93,7 @@ typedef struct _Panel {
} _Panel;
/*
- * Minimum size for an Apercu:
+ * Minimum size for a Mini-Preview:
* This value is actually twice the size of the minimum icon size choosable.
* We set the slider min to taht number minus one, because when set to this
* value WPrefs will consider that the user wants the feature turned off.
@@ -197,7 +197,7 @@ static void showData(_Panel * panel)
i = 9;
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
- /* Apercu */
+ /* Mini-Previews for Icons */
b = GetBoolForKey("MiniwindowApercuBalloons");
if (b) {
i = GetIntegerForKey("ApercuSize");
@@ -339,13 +339,13 @@ static void createPanel(Panel * p)
WMMapSubwidgets(panel->sizeF);
- /***************** Apercu ****************/
+ /***************** Mini-Previews ****************/
panel->apercu.frame = WMCreateFrame(panel->box);
WMResizeWidget(panel->apercu.frame, 156, 52);
WMMoveWidget(panel->apercu.frame, 124, 168);
- WMSetFrameTitle(panel->apercu.frame, _("Miniwindow aperçus"));
+ WMSetFrameTitle(panel->apercu.frame, _("Mini-Previews for Icons"));
- WMSetBalloonTextForView(_("The Aperçu provides a small view of the
content of then"
+ WMSetBalloonTextForView(_("The Mini-Preview provides a small view of
the content of then"
"window when the mouse is placed over the
icon."),
WMWidgetView(panel->apercu.frame));
diff --git a/src/WindowMaker.h b/src/WindowMaker.h
index e954ee83..ec95075c 100644
--- a/src/WindowMaker.h
+++ b/src/WindowMaker.h
@@ -446,7 +446,7 @@ extern struct WPreferences {
char cycle_ignore_minimized; /* Ignore minimized windows when
cycling */
char strict_windoze_cycle; /* don't close switch panel when
shift is released */
char panel_only_open; /* Only open the switch panel;
don't switch */
- int apercu_size; /* Size of apercu preview in pixels
*/
+ int apercu_size; /* Size of Mini-Previews in pixels
*/
/* All delays here are in ms. 0 means instant auto-action. */
int clip_auto_raise_delay; /* Delay after which the clip will
be raised when entered */
diff --git a/src/actions.c b/src/actions.c
index 03807fc7..c4656460 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1151,7 +1151,7 @@ void wIconifyWindow(WWindow *wwin)
set_icon_apercu(wwin->icon, apercu);
RReleaseImage(apercu);
} else {
- wwarning("window apercu creation
failed");
+ wwarning(_("window mini-preview
creation failed"));
}
}
}
diff --git a/src/balloon.c b/src/balloon.c
index 25998e1f..8d883d93 100644
--- a/src/balloon.c
+++ b/src/balloon.c
@@ -458,7 +458,7 @@ static void showBalloon(WScreen *scr)
}
if (wPreferences.miniwin_apercu_balloon && scr->balloon->apercu != None)
- /* used to display either the apercu alone or the apercu and
the title */
+ /* used to display either the mini-preview alone or the
mini-preview with the title */
showApercu(scr, x, y, scr->balloon->text, scr->balloon->apercu);
else
showText(scr, x, y, scr->balloon->h, w, scr->balloon->text);
diff --git a/src/icon.h b/src/icon.h
index 80e9acf9..14db37e1 100644
--- a/src/icon.h
+++ b/src/icon.h
@@ -29,7 +29,7 @@
#define TILE_CLIP 1
#define TILE_DRAWER 2
-/* This is the border, in pixel, drawn around an Aperçu */
+/* This is the border, in pixel, drawn around a Mini-Preview */
#define APERCU_BORDER 1
typedef struct WIcon {
-----------------------------------------------------------------------
Summary of changes:
NEWS | 9 ++++
WPrefs.app/Icons.c | 104 +++++++++++++++++++++++++++++++--------------------
src/WindowMaker.h | 4 +-
src/actions.c | 12 +++---
src/balloon.c | 32 ++++++++--------
src/defaults.c | 60 ++++++++++++++++++++++++------
src/icon.c | 22 +++++-----
src/icon.h | 8 ++--
src/wsmap.c | 10 ++--
9 files changed, 164 insertions(+), 97 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].