### Copyright (C) 1995, 1996, 1997 Jeppe Buk (buk@imada.ou.dk) ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program; if not, write to the Free Software ### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ### ### Mar. 9 1998 Japanized by Mashio Motoyama ### proc FvwmBacker {} { # モジュール / FvwmBacker Desc "FvwmBacker モジュールの設定" ShortDesc "FvwmBacker" Header h\ -text "FvwmBacker"\ -frame:relief flat \ -help "このページでは、FvwmBacker モジュールの設定を行います。"\ "このモジュールは各仮想デスクトップに異なる背景を表示させる場合に利用されます。" Line l CheckBox spawn\ -text "起動時から利用" \ -help "これを選択すると、このモジュールは起動時、つまり"\ "'InitFunction' と 'RestartFunction' からその動作を開始します。" Int desk\ -text "デスクトップ番号"\ -textafter "番の背景を設定"\ -help "どのデスクトップの背景を設定したいのかを入力します。" CheckBox colorB\ -text "背景色を指定する"\ -help "(訳者より)\n仮想デスクトップの背景色を設定します。\n"\ "xsetroot コマンドを思い浮かべて下さい。" Command color \ -default [list "#000000" 0] \ -setvalue { $widget configure -bg [lindex $color 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $color 0] \ [lindex $color 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -inactive {$widget configure -relief flat -bg black } Frame colorF -entries { colorB color } CheckBox commandB\ -text "コマンドを指定:"\ -help "(訳者より)\n オリジナルのヘルプは存在しないので\"カン\"ですが、おそらく壁紙やアニメーション表示コマンドのことでしょう。次の版までには調べておきます。" Entry command Frame commandF -entries { commandB command } ExtEntry backs -entries { desk colorF commandF } -orient top -index desk Change { if {$changeElm == "colorB"} { if {$colorB == 1} { Enable color set commandB 0 Disable command } else { Disable color } } if {$changeElm == "commandB"} { if {$commandB == 1} { Enable command set colorB 0 Disable color } else { Disable command } } } PageEnd { forevery backs { if {$commandB == 1 && $command == ""} { error "背景をセットするためのコマンドを指定する必要があります。" } elseif {$desk == "" || $desk < 0} { error "無効なデスクトップ番号です。" } } } Save { forevery backs { if {$colorB == 1} {set cmd "-solid [hash2rgb [lindex $color 0]]" } else {set cmd $command} print "*FvwmBackerDesk $desk $cmd" } if {$spawn == 1} { print "AddToFunc InitFunction \"I\" Module FvwmBacker" print "AddToFunc RestartFunction \"I\" Module FvwmBacker" } } }