Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/idesk/idesk-generate-all-desktop-icons.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2366 by niro, Tue Aug 25 10:28:00 2015 UTC revision 2373 by niro, Wed Aug 26 11:11:43 2015 UTC
# Line 34  yres="$(( ${yres} - 80 ))" Line 34  yres="$(( ${yres} - 80 ))"
34  [ -f ${rc} ] && rm -f ${rc}  [ -f ${rc} ] && rm -f ${rc}
35  install -d ${dest}  install -d ${dest}
36    
37    # clean default reboot,shutdown icon info
38    for i in shutdown reboot
39    do
40     if [ -f ${MROOT}/${MCORE_CONFIG_PATH}/icons/info/${i}.${ICON_INFO_SUFFIX} ]
41     then
42     rm ${MROOT}/${MCORE_CONFIG_PATH}/icons/info/${i}.${ICON_INFO_SUFFIX}
43     fi
44    done
45    
46  # default settings  # default settings
47  declare -i x=50  declare -i x=50
48  declare -i y=50  declare -i y=50
# Line 41  declare -i y=50 Line 50  declare -i y=50
50  for icon_resource in $(find ${MROOT}/${MCORE_CONFIG_PATH}/icons/info -type f)  for icon_resource in $(find ${MROOT}/${MCORE_CONFIG_PATH}/icons/info -type f)
51  do  do
52   # abort if empty   # abort if empty
53   [[ -z ${i} ]] && continue   [[ -z ${icon_resource} ]] && continue
54    
55   # new line if x > xres   # new line if x > xres
56   if [ ${x} -ge ${xres} ]   if [ ${x} -ge ${xres} ]
# Line 60  do Line 69  do
69   [ ${x} -ge ${xres} ] && x=50   [ ${x} -ge ${xres} ] && x=50
70   fi   fi
71    
72   ${MCORE_LIBDIR}/idesk-generate-icon --resource "${icon_resource}" --xres "${x}" --yres "${y}"   ${MCORE_LIBDIR}/idesk-generate-icon --add --resource "${icon_resource}" --xres "${x}" --yres "${y}"
73    
74   y=$((${y} + 80))   y=$((${y} + 80))
75  done  done
# Line 91  do Line 100  do
100   esac   esac
101    
102   ${MCORE_LIBDIR}/idesk-generate-icon \   ${MCORE_LIBDIR}/idesk-generate-icon \
103     --add \
104   --name "${name}" \   --name "${name}" \
105   --command "sudo /usr/sbin/${cmd}" \   --command "sudo /usr/sbin/${cmd}" \
106   --icon "${i}.png" \   --icon "${i}.png" \
# Line 103  do Line 113  do
113   y=$((${y} + 80))   y=$((${y} + 80))
114  done  done
115    
   
116  # restart idesk  # restart idesk
117  killall idesk; x11runas "nohup idesk > /dev/null &"  killall idesk; x11runas "nohup idesk > /dev/null &"

Legend:
Removed from v.2366  
changed lines
  Added in v.2373