From: <dom...@us...> - 2014-10-28 17:28:21
|
Revision: 656 http://sourceforge.net/p/fvwm-crystal/code/656 Author: dominique_libre Date: 2014-10-28 17:28:14 +0000 (Tue, 28 Oct 2014) Log Message: ----------- functions/Wallpaper: add support for different thumbnail sizes. Modified Paths: -------------- ChangeLog fvwm/components/functions/Wallpaper Modified: ChangeLog =================================================================== --- ChangeLog 2014-10-28 17:26:16 UTC (rev 655) +++ ChangeLog 2014-10-28 17:28:14 UTC (rev 656) @@ -17,6 +17,7 @@ functions/Preferences-Menu: put the FileEditor launcher into a function and call it from the menu, use the defaul fvwm-menu-desktop menu file location in $FVWM_USERDIR/.menu, add a wallpaper thumbnail size menu, launch ShowDirectories from the file editor function. + functions/Wallpaper: add support for different thumbnail sizes. vendredi 17 octobre 2014 script PrefVars: Add the full screen by default preference into the editor. Modified: fvwm/components/functions/Wallpaper =================================================================== --- fvwm/components/functions/Wallpaper 2014-10-28 17:26:16 UTC (rev 655) +++ fvwm/components/functions/Wallpaper 2014-10-28 17:28:14 UTC (rev 656) @@ -22,8 +22,12 @@ AddToFunc Wallpaper-Random + I PipeRead "echo Wallpaper-Set \\'`fvwm-crystal.wallpaper $*`\\'" +# Check and set the thumbnail Size +CheckPreferences WallpaperThumbSize 'SavePreferences WallpaperThumbSize "InfoStoreAdd WallpaperThumbSize 42"' +LoadPreferences WallpaperThumbSize + # Where are kept wallpaper thumbnails? -SetEnv WallpaperThumbnails "$[FVWM_USERDIR]/wallpaper-thumbnails" +SetEnv WallpaperThumbnails "$[FVWM_USERDIR]/wallpaper-thumbnails-$[infostore.WallpaperThumbSize]" # Check if there is a wallpaper set at startup # If there isn't, set default one @@ -32,6 +36,10 @@ # Menu for wallpapers DestroyMenu /Wallpaper AddToMenu /Wallpaper ++ "%22x22/fvwm-crystal/On.png%$[gt.Auto wallpaper]" Popup /Random-Wallpaper ++ "" Nop ++ "$[gt.Thumbnails size]" Popup /WPThumbSize ++ "" Nop + MissingSubmenuFunction Wallpaper-Browser + "%22x22/categories/directory.png%FVWM-Crystal" Popup $[FVWM_SYSTEMDIR]/wallpapers Test (f $[FVWM_USERDIR]/wallpapers) + "%22x22/categories/directory.png%~/.fvwm-crystal/wallpapers" Popup $[FVWM_USERDIR]/wallpapers @@ -45,7 +53,7 @@ test -d "${i}" && continue; \ mkdir -p "$[WallpaperThumbnails]${i%/*}"; \ test -f "$[WallpaperThumbnails]${i}" -a "$[WallpaperThumbnails]${i}" -nt "${i}" || \ - convert -quality 0 -sample 42 "${i}" "png:$[WallpaperThumbnails]${i}" 2>/dev/null & \ + convert -quality 0 -sample $[infostore.WallpaperThumbSize] "${i}" "png:$[WallpaperThumbnails]${i}" 2>/dev/null & \ done; \ wait && fvwm-menu-directory --title "$[gt.Random]" --icon-title "" --icon-file __PIXMAP__ \ --icon-dir "22x22/categories/directory.png" --dir "$0" --links --command-file "Wallpaper-Set \'\\"%f\\"\'" \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |