File: Pictures

package info (click to toggle)
fvwm-crystal 3.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,748 kB
  • ctags: 793
  • sloc: sh: 2,815; cs: 880; python: 875; makefile: 212
file content (42 lines) | stat: -rw-r--r-- 1,498 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Support for graphic viewer
# Written by: Dominique Michel
#
# Only comix is supported at that time.
# Any file in $fvwm_pic_path1 and 2 will be loaded
# into $fvwm_pic_exec (comix).
# Comix support the usual pictures formats as well than zip,
# tar and rar archives with picture files.
#
# TODO: add more viewers.

SetEnv fvwm_pic_path1 "/mnt/usb/$[USERDIR]/Pictures"
SetEnv fvwm_pic_path2 "/home/$[USERDIR]/Pictures"
SetEnv fvwm_pic_exec "comix"

DestroyFunc FuncFvwmMenuPicDirectory
AddToFunc FuncFvwmMenuPicDirectory
+ I PipeRead 'case "$0" in \
	"$[fvwm_pic_path1]"*) myexec="$[fvwm_pic_exec]";; \
	"$[fvwm_pic_path2]"*) myexec="$[fvwm_pic_exec]";; \
    esac; \
    test -f "$0"/.icontitle.png && mytitle="$0"/.icontitle.png; \
    test -f "$0"/.media.png && mypng="$0"/.media.png; \
    fvwm-menu-directory --func-name "FuncFvwmMenuPicDirectory" \
    --icon-title "${mytitle:-22x22/categories/directory.png}" \
    --icon-file "${mypng:-22x22/categories/Graphics.png}" \
    --dir "$0" --links \
    --exec-file "^${myexec}"'

DestroyMenu /Graphic/LoadPic
AddToMenu /Graphic/LoadPic
+ MissingSubmenuFunction FuncFvwmMenuPicDirectory
+ '$[gt.Browse Pictures]' Popup $[fvwm_pic_path1]
+ '$[gt.Browse Pictures]' Popup $[fvwm_pic_path2]
DestroyMenu /Graphic
AddToMenu /Graphic
+ DynamicPopupAction Function /Graphic-generator

DestroyFunc /Graphic-generator
AddToFunc /Graphic-generator
+ I DestroyMenu recreate /Graphic
+ I AddToMenu /Graphic '$[gt.Load picture file]' Popup /Graphic/LoadPic