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 Carlos R. Mafra.
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.cu...@free.fr> --- WPrefs.app/Icons.c | 62 +++++++++++++++++++++++++++--------------------------- src/WindowMaker.h | 4 ++-- src/actions.c | 10 ++++----- src/balloon.c | 30 +++++++++++++------------- src/defaults.c | 14 ++++++------ src/icon.c | 22 +++++++++---------- src/icon.h | 6 +++--- src/wsmap.c | 10 ++++----- 8 files changed, 79 insertions(+), 79 deletions(-) diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c index 76ed866..d8e11ab 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 the\n" "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 ec95075..0a1d81f 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 c465646..1450fdb 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 8d883d9..871bcd2 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 b1b5050..a6bffeb 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 75f5293..721c428 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 14db37e..dbcb289 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 bc7a2ff..e2b6747 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); } } } -- 2.1.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.