Parcourir la source

Disabled VM/profile name insertion during wallpaper generation

Maxim Kammerer il y a 11 ans
Parent
commit
bdffaf15f6

+ 1 - 1
src/etc/init.d/vmconfig

@@ -28,7 +28,7 @@ depend() {
 }
 
 start() {
-    # VM flag is used for X wallpaper
+    # VM flag may be used to warn the user
     if [ ! -e ${vmflag} ]; then
         ebegin Detecting virtualization state
         virt-what > ${vmflag}

+ 1 - 0
src/etc/portage/package.use/all

@@ -48,6 +48,7 @@ media-sound/vorbis-tools        speex
 media-plugins/gst-plugins-meta  dv lame theora vpx x264 xvid  a52 dts dvd libass mms mpeg  ffmpeg
 www-client/firefox              -alsa gstreamer  system-jpeg system-cairo system-sqlite system-icu  -wifi
 media-libs/libass               -harfbuzz
+media-gfx/graphicsmagick        -truetype
 
 # Unnecessary functionality
 sys-libs/ncurses                minimal

+ 0 - 3
src/etc/portage/profile/package.provided

@@ -9,6 +9,3 @@ app-emulation/virtualbox-modules-4.2.24
 
 # Unneeded (app-i18n/uim (#404463))
 media-fonts/font-sony-misc-0
-
-# Unneeded (media-gfx/graphicsmagick[truetype])
-media-fonts/urw-fonts-0

+ 1 - 21
src/home/anon/bin/x11/gen-wallpaper

@@ -7,10 +7,6 @@ png=${dir}/liberte-logo-wallpaper.png
 silentflag=/var/run/nologo
 silentpng=${dir}/liberte-logo-empty.png
 
-vmtype=/var/run/vmtype
-vmfont=/usr/share/fonts/dejavu/DejaVuSans.ttf
-
-profile=/var/run/usage-profile
 
 # Single parameter is width:height of work area (see "wait-panel")
 dim=${1:-600:600}
@@ -30,23 +26,7 @@ if [ ! -e ${png} ]; then
     if [ -e ${silentflag} ]; then
         cp ${silentpng} ${png}
     # Black background is needed for xlock (display +matte has no antialiasing)
-    elif [ ! -s ${vmtype}  -a  ! -s ${profile} ]; then
-        exec rsvg-convert --background-color=black -h "${size}" -o ${png} ${svg}
     else
-        warning=
-        if [ -s ${vmtype} ]; then
-            warning="${warning:+${warning}\n}non-native environment\n(`cat ${vmtype}`)"
-        fi
-        if [ -s ${profile} ]; then
-            warning="${warning:+${warning}\n}irregular profile\n(`cat ${profile}`)"
-        fi
-
-        texty=$((size * 3/8))
-        textpt=$((size * 130/400))
-        textpt=`echo "${textpt}" | sed 's/.$/.\0/'`
-
-        exec rsvg-convert --background-color=black -h "${size}" ${svg} \
-             | convert -font ${vmfont} -pointsize "${textpt}" -fill yellow -gravity center \
-               -draw "text 0,${texty} 'Warning:\n${warning}'" - ${png}
+        exec rsvg-convert --background-color=black -h "${size}" -o ${png} ${svg}
     fi
 fi