diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2009-01-27 17:30:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2009-01-27 17:30:08 +0000 |
commit | 5ce8d30439463838f845c78bc926cc9b310a8743 (patch) | |
tree | bb1852dc58711c7baee31216a765067dfa49b65b /src/dia_keymap.inc | |
parent | 10658e71475bd964263d09f1a661f24fadfaf496 (diff) | |
download | bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.gz bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.bz2 bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.xz bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.zip |
imported openSUSE.tar.bz2 (from gfxboot-4.1.19-2.1.src.rpm)4.1.19.1
Diffstat (limited to 'src/dia_keymap.inc')
-rw-r--r-- | src/dia_keymap.inc | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/src/dia_keymap.inc b/src/dia_keymap.inc new file mode 100644 index 0000000..2f3a939 --- /dev/null +++ b/src/dia_keymap.inc @@ -0,0 +1,105 @@ +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% +% keyboard map selection dialog. +% +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Some global vars. +% + +/keymap.setdefault { + xmenu.keymap .xm_current + + 0 + keymaps { + .km.id get config.keymap.id eq { exit } if + 1 add + } forall + + dup keymaps length ge { pop 0 } if + + put + +} def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Build menu list. +% +% ( ) ==> ( ) +% +/keymap.init { + /xmenu.keymap .xm_size array def + + /xmenu xmenu.keymap def + + xmenu .xm_list [ + keymaps { .km.name get } forall + ] put + + xmenu .xm_title "Keyboard" put + + keymap.setdefault + + % just once (see lang.init) + /keymap.init { } def +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Update keybaord selection menu. +% +% ( ) ==> ( ) +% +/keymap.update { + /xmenu xmenu.keymap def + + keymaps xmenu .xm_current get get .km.id get setkeymap + + /window.action actRedrawPanel def +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Show keymap selection menu. +% +% ( ) => ( ) +% +/panel.keymap { + "keymap" help.setcontext + + keymap.setdefault + + window.xmenu + dup .xmenu xmenu.keymap put + dup .xmenu.update /keymap.update put + dup window.init + window.show +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Return width of panel entry. +% +% ( ) => ( width ) +% +/panel.keymap.width { + /xmenu xmenu.keymap def + + pmenu.width +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Redraw panel entry. +% +% ( panel ) => ( ) +% +/panel.keymap.update { + /xmenu xmenu.keymap def + + pmenu.panel.update +} def + + |