1 # This script is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #-----------------------------------------------------------------------------
17 # Copyright 2000, Olivier Chapuis
18 #-----------------------------------------------------------------------------
21 WindowTitle {FVWM Themes Menus Editor}
23 Font -adobe-helvetica-bold-r-*-*-12-*
31 Set $arg = (GetScriptArgument $i)
35 If $arg == {--files} Then
36 Set $file = (GetScriptArgument $j)
37 If $arg == {--menus} Then
38 Set $Menu = (GetScriptArgument $j)
39 If $arg == {--images-dir} Then
40 Set $ImagesDir = (GetScriptArgument $j)
41 If $arg == {--text-colorset} Then
42 Set $TextColorset = (GetScriptArgument $j)
43 If $arg == {--icon-colorset} Then
44 Set $IconColorset = (GetScriptArgument $j)
46 Set $arg = (GetScriptArgument $i)
49 Set $cmd = {echo "$FT_DATADIR"}
50 Set $FtDataDir = (GetOutput $cmd 1 -1)
52 If $ImagesDir == {} Then
54 Set $ImagesDir=$FtDataDir{/images/menu/}
56 If $TextColorset <> {} Then
58 ChangeColorset 4 $TextColorset
59 ChangeColorset 22 $TextColorset
60 ChangeColorset 39 $TextColorset
61 ChangeColorset 44 $TextColorset
62 ChangeColorset 48 $TextColorset
63 ChangeColorset 51 $TextColorset
64 ChangeColorset 53 $TextColorset
66 If $IconColorset <> {} Then
68 ChangeColorset 41 $IconColorset
71 # found the FvwmScript pid
72 Set $cmd = {exec perl -e 'print getppid . "\n"'}
73 Set $pid = (GetOutput $cmd 1 -1)
75 # Run fvwm-themes-menuapp until the end of the script
76 Set $MenuFilesList={$FVWM_USERDIR/themes/personal/menus-extra}
77 Do {Exec fvwm-themes-menuapp --menu-files=}$MenuFilesList{ --com-mode --com-name=menuapp-}$pid{ &}
79 # to send fvwm-themes-com command
80 Set $SendMsgAndGet = {fvwm-themes-com --name menuapp-}$pid{ --lock-and-get --message=}
81 Set $SendMsg = {fvwm-themes-com --name menuapp-}$pid{ --message=}
82 Set $GetLine = {fvwm-themes-com --name menuapp-}$pid{ --get-buffer --line=}
87 Set $UseRootMenusList = 1
89 Set $cmd = $SendMsgAndGet{"root-menus-list"}
90 Set $RootMenus = (GetOutput $cmd 1 -1)
91 ChangeTitle 2 $RootMenus
93 Set $cmd = $SendMsgAndGet{"root-menu 1"}
94 Set $Menu = (GetOutput $cmd 1 -1)
98 Set $cmd={echo "}$Menu{"| grep -e '|'}
99 Set $tmp = (GetOutput $cmd 1 -1)
102 Set $t = {Menu } $Menu
106 Set $UseRootMenusList = 0
111 Set $RootMenus = $Menu
112 ChangeTitle 2 $RootMenus
115 Set $cmd={perl -e '$M="} $Menu {";$M=substr($M,0,index($M,"|")); print "$M\n";'}
116 Set $Menu = (GetOutput $cmd 1 -1)
117 Set $UseRootMenusList = 2
122 #Do {Echo URM:}$UseRootMenusList{, RM:}$RootMenus{, M:}$Menu
125 Set $cmd = $SendMsgAndGet{"menu-items }$Menu{"}
126 Set $ItemsList = (GetOutput $cmd 1 -1)
127 Set $cmd = $SendMsgAndGet{"nbr-of-items }$Menu{"}
128 Set $NbrOfItems = (GetOutput $cmd 1 -1)
130 If $ItemList == 0 Then
133 ChangeTitle 4 $ItemsList
142 Set $t={Msg: Warning Message are displayed here}
146 # Nbr of items in the selection
148 Set $SelFont = {-adobe-helvetica-bold-r-*-*-12-*}
149 Set $ShadeFont = {-adobe-helvetica-medium-r-*-*-12-*}
150 Set $EditorType = {Separator}
151 Set $MenuIconBrowser = {}
152 Set $FileDirBrowser = {}
153 Set $FindItBrowser = {}
155 ChangeFont 13 $ShadeFont
156 ChangeFont 15 $ShadeFont
160 ChangeFont $tmp $ShadeFont
161 Set $tmp = (Add $tmp 1)
163 Set $HideEditorWidgets = 0
168 Set $tmp = (Add $tmp 1)
173 # Periodic Tasks command variables
174 Set $HideEditorWidgets = 0
175 Set $HideMainWidgets = 0
176 Set $ShowMainWidgets = 0
177 Set $EditMess = {No message}
178 Set $MenuListValueIsZero = 1
180 # number of possible items the lists minus one
181 Set $NbrOfVisibleItems = 10
182 Set $NbrOfVisibleSelItems = 3
185 # ---------------------------------------------------------------------------
189 # ---------------------------------------------------------------------------
190 # Almost every thing is done in the Periodic Task
195 #--------------------------------------
196 # Hide/show, Hiding before Show
198 If $HideMainWidgets == 1 Then
200 Set $HideMainWidgets = 0
205 Set $tmp = (Add $tmp 1)
209 If $HideEditorWidgets == 1 Then
211 Set $HideEditorWidgets = 0
216 Set $tmp = (Add $tmp 1)
222 If $ShowMainWidgets == 1 Then
224 Set $ShowMainWidgets = 0
226 If $isRootMenu == 1 Then
238 Set $tmp = (Add $tmp 1)
242 #--------------------------------------
243 # "Message" from the command editor (OK), the menu is modified here!
245 If $EditMess <> {No message} Then
247 Set $Err = (GetOutput $EditMess 1 -1)
248 Set $EditMess = {No message}
249 #Do {Echo ErrEM:}$Err
254 #-------------------------------------
257 If $UpdateEditorWidgets == 1 Then
259 Set $UpdateEditorWidgets = 0
265 If $EditorType == {Separator} Then
270 If $EditorType == {X Application} Then
273 Set $ActionTitle = {Exec: }
276 If $EditorType == {Run in a Terminal} Then
280 Set $ActionTitle = {Exec: }
283 If $EditorType == {Tail File} Then
287 Set $ActionTitle = {File: }
290 If $EditorType == {Title} Then
295 If $EditorType == {Fvwm Command} Then
298 Set $ActionTitle = {Command:}
301 If $EditorType == {Sub Menu} Then
305 Set $ActionTitle = {Menu: }
308 If $EditorType == {Menu} Then
312 Set $ActionTitle = {Menu: }
316 ChangeTitle 43 $ActionTitle
318 If $hasTitle == {1} Then
320 Set $t = {Window Title:}
321 If $EditOrAdd == {E} Then
322 ChangeTitle 48 $WindowTitle
326 Set $t = {Working Dir: }
327 If $EditOrAdd == {E} Then
328 ChangeTitle 48 $WorkingDir
332 Set $W = (Add $lastWidget 1)
337 Set $tmp = (Add $tmp 1)
342 If $isMenu == {1} Then
344 Set $cmd = $SendMsgAndGet{"menus-list"}
345 Set $MenusList =(GetOutput $cmd 1 -1)
346 ChangeTitle 51 $MenusList
351 Set $tmp = (Add $tmp 1)
356 #--------------------------------------
357 # Click on OK or "Double Click" on a submenu in the list
359 If $OpenSubMenu == 1 Then
362 Set $LevelMenu = (Add $LevelMenu 1)
370 If $UseRootMenusList <> {0} Then
378 ChangeFont 15 $SelFont
381 Set $cmd={echo "}$t{"|sed -e 's/ /->/g'}
382 Set $t = (GetOutput $cmd 1 -1)
386 Set $UpdateItemsList = 1
387 Set $MenuListValueIsZero = 1
391 #--------------------------------------
394 If $UpdateItemsList == 1 Then
396 Set $UpdateItemsList = 0
397 Set $cmd=$SendMsgAndGet{"menu-items }$Menu{"}
398 Set $ItemsList = (GetOutput $cmd 1 -1)
399 If $ItemsList == 0 Then
401 ChangeTitle 4 $ItemsList
402 Set $cmd = $SendMsgAndGet{"nbr-of-items }$Menu{"}
403 Set $NbrOfItems = (GetOutput $cmd 1 -1)
405 Set $MenuListValueIsZero = 1
406 #Do {Echo List updated}
411 #--------------------------------------
412 # Update the selected item in the list
414 If $UpdateTheItem == 1 Then
416 Set $UpdateTheItem = 0
423 # Show the selected items!
425 Set $tmp = (GetMinValue 4)
427 Set $tmp1 = (Add $NbrOfVisibleItems $tmp)
428 If $Value < $tmp Then
430 ChangeMinValue 4 $Value
431 ChangeTitle 4 $ItemsList
433 If $Value > $tmp1 Then
435 Set $tmp1 = (Mult $tmp1 -1)
436 Set $tmp1 = (Add $Value $tmp1)
437 Set $tmp = (Add $tmp $tmp1)
438 ChangeMinValue 4 $tmp
439 ChangeTitle 4 $ItemsList
442 Set $cmd = $SendMsgAndGet{"item }$Menu{:}$Value{" --line=1}
444 Set $Name=(GetOutput $cmd 1 -1)
445 Set $t={Selected: }$Name
448 Set $cmd = $GetLine{2}
449 Set $Type=(GetOutput $cmd 1 -1)
453 Set $cmd = $GetLine{3}
454 Set $Action=(GetOutput $cmd 1 -1)
455 Set $t={Action: }$Action
456 Set $ti=(StrCopy $t 1 40)
457 Set $tmp=(StrCopy $t 41 41)
464 ChangeFont 8 $SelFont
465 ChangeFont 9 $SelFont
466 ChangeFont 10 $SelFont
467 ChangeFont 11 $SelFont
468 ChangeFont 12 $SelFont
470 If $Type == {Sub Menu} Then
472 ChangeFont 13 $SelFont
476 ChangeFont 13 $ShadeFont
482 Set $cmd = $GetLine{4}
483 Set $WorkingDir=(GetOutput $cmd 1 -1)
485 Set $cmd = $GetLine{5}
486 Set $WindowTitle=(GetOutput $cmd 1 -1)
488 Set $cmd = $GetLine{6 --clear-buffer}
489 Set $MenuIcon=(GetOutput $cmd 1 -1)
490 #Do {Echo The Item is updated}
493 #--------------------------------------
495 If $UpdateSelectionList == 1 Then
497 Set $UpdateSelectionList = 0
498 Set $cmd=$SendMsgAndGet{"selection-items"}
499 Set $SelectedList = (GetOutput $cmd 1 -1)
500 #ChangeTitle 22 $SelectedList
501 ChangeValue 22 $SelNumber
502 If $SelNumber == 0 Then
507 ChangeFont $tmp $ShadeFont
508 Set $tmp = (Add $tmp 1)
516 ChangeFont $tmp $SelFont
517 Set $tmp = (Add $tmp 1)
519 Set $SelValue = (Add $SelValue -1)
520 If $SelNumber == $tmpSelValue Then
522 ChangeValue 22 $SelNumber
523 Set $SelValue = $SelNumber
527 # Show the selected items!
529 Set $tmp = (GetMinValue 22)
531 Set $tmp1 = (Add $NbrOfVisibleSelItems $tmp)
532 If $SelNumber < $tmp Then
534 ChangeMinValue 22 $SelValue
536 If $SelNumber > $tmp1 Then
538 Set $tmp1 = (Mult $tmp1 -1)
539 Set $tmp1 = (Add $SelNumber $tmp1)
540 Set $tmp = (Add $tmp $tmp1)
541 ChangeMinValue 22 $tmp
543 ChangeTitle 22 $SelectedList
549 #--------------------------------------
551 If $MenuListValueIsZero == 1 Then
554 Set $MenuListValueIsZero = 0
562 ChangeFont 8 $ShadeFont
563 ChangeFont 9 $ShadeFont
564 ChangeFont 10 $ShadeFont
565 ChangeFont 11 $ShadeFont
566 ChangeFont 12 $ShadeFont
567 ChangeFont 13 $ShadeFont
570 #--------------------------------------
571 # Communication with the Bowsers
573 If $MenuIconBrowser <> {} Then
575 Set $MSG = (ReceivFromScript $MenuIconBrowser)
576 If $MSG <> {No message} Then
578 Set $MenuIconBrowser = {}
579 If $MSG <> {Cancel} Then
581 Set $EditorMenuIcon = $MSG
587 If $FileDirBrowser <> {} Then
589 Set $MSG = (ReceivFromScript $FileDirBrowser)
590 If $MSG <> {No message} Then
592 Set $FileDirBrowser = {}
593 If $MSG <> {Cancel} Then
600 If $FindItBrowser <> {} Then
602 Set $MSG = (ReceivFromScript $FindItBrowser)
603 If $MSG <> {No message} Then
605 Set $FindItBrowser = {}
606 If $MSG <> {Cancel} Then
615 # ---------------------------------------------------------------------------
619 # ---------------------------------------------------------------------------
621 #---------------------------------------------------------------------------
622 # Root Menus list or path to the MENU
647 Set $RootValue = (GetValue 2)
648 Set $cmd = {perl -e '$M="}$RootMenus{"; $I=}$RootValue{;$I--; @A=split("\\|",$M); print $A[$I] . "\n"'}
649 Set $Menu = (GetOutput $cmd 1 -1)
651 Set $UpdateItemsList = 1
652 Set $MenuListValueIsZero = 1
673 #---------------------------------------------------------------------------
687 # Double click simulation hum ...
688 Set $tmpValue = (GetValue 4)
692 If $tmpValue == $Value Then
694 If $Type == {Sub Menu} Then
696 If $Type == {Menu} Then
698 If $Menu <> $Action Then
700 Set $t = (Mult $t $t1)
701 Set $t = (Mult $t $t2)
702 Set $Value = $tmpValue
709 Set $UpdateTheItem = 1
715 #----------------------------------------------------------------------------
762 # -----------------------------------------------------------------------------
776 Set $EditorValue = (GetValue 4)
777 If $EditorValue == 0 Then
779 Set $t={Msg: You need to select an item!}
785 Set $HideMainWidgets = 1
786 Set $EditorType = $Type
787 Set $EditorMenuIcon = $MenuIcon
792 ChangeIcon 41 $MenuIcon
796 ChangeTitle 44 $Action
800 Set $UpdateEditorWidgets = 1
815 Set $Value = (GetValue 4)
818 Set $t={Msg: You need to select an item!}
823 Set $cmd=$SendMsgAndGet{"add-item-to-selection }$Menu{:}$Value{"}
824 Set $Err=(GetOutput $cmd 1 -1)
827 Set $SelNumber = (Add $SelNumber 1)
828 Set $UpdateSelectionList = 1
844 Set $Value = (GetValue 4)
847 Set $t={Msg: You need to select an item!}
852 Set $cmd=$SendMsgAndGet{"add-item-to-selection }$Menu{:}$Value{"}
853 Set $Err=(GetOutput $cmd 1 -1)
856 Set $SelNumber = (Add $SelNumber 1)
857 Set $UpdateSelectionList = 1
858 Set $cmd=$SendMsgAndGet{"remove-item }$Menu{:}$Value{"}
859 Set $Err=(GetOutput $cmd 1 -1)
862 Set $t = {Msg: Impossible to Remove "}$Title{"}
867 If $Value == $NbrOfItems Then
868 Set $Value = (Add $Value -1)
869 Set $UpdateItemsList = 1
870 Set $UpdateTheItem = 1
877 # Move Up Push Button
888 Set $Value = (GetValue 4)
891 Set $t={Msg: You need to select an item!}
896 Set $cmd=$SendMsgAndGet{"move-up }$Menu{:}$Value{"}
897 Set $Err=(GetOutput $cmd 1 -1)
900 Set $t = {Msg: Impossible to Move Up "}$Name{"}
905 Set $UpdateItemsList = 1
906 Set $Value =(Add $Value -1)
907 Set $UpdateTheItem = 1
913 # Move Down Push Button
924 Set $Value = (GetValue 4)
927 Set $t={Msg: You need to select an item!}
932 Set $cmd=$SendMsgAndGet{"move-down }$Menu{:}$Value{"}
933 Set $Err=(GetOutput $cmd 1 -1)
936 Set $t = {Msg: Impossible to Move Down "}$Name{"}
941 Set $UpdateItemsList = 1
942 Set $Value =(Add $Value 1)
943 Set $UpdateTheItem = 1
949 #-----------------------------------------------------------------------------
950 # Up, Open and Add Item
963 Set $Value = (GetValue 4)
965 If $Type == {Sub Menu} Then
967 If $Type == {Menu} Then
969 Set $tmp = (Mult $tmp $Value)
972 Set $t={Msg: You need to select a (Sub)Menu!}
982 #add item push button
993 Set $EditorValue = (GetValue 4)
994 If $EditorValue == 0 Then
995 Set $EditorValue = $NbrOfItems
1000 ChangeTitle 39 $Empty
1001 Set $EditorMenuIcon = {}
1006 ChangeTitle 44 $Empty
1010 ChangeTitle 48 $Empty
1011 Set $HideMainWidgets = 1
1012 Set $UpdateEditorWidgets = 1
1016 # Up menu push button
1019 Flags NoReliefString
1029 Set $t={Msg: No Up Menu}
1034 Set $LevelMenu = (Add $LevelMenu -1)
1035 Set $cmd={perl -e '@l=split(" ","}$UP{"); print "$l[-1]\n"'}
1036 Set $Menu=(GetOutput $cmd 1 -1)
1037 Set $cmd={perl -e '@l=split(" ","}$UP{"); pop(@l); print "@l\n"'}
1038 Set $UP=(GetOutput $cmd 1 -1)
1040 Set $cmd={echo "}$UP{"|sed -e 's/ /->/g'}
1041 Set $t = (GetOutput $cmd 1 -1)
1044 Set $t = {Menu: }$t{->}$Menu
1049 If $UseRootMenusList <> {0} Then
1054 ChangeValue 2 $RootValue
1059 Set $t = {Menu: }$Menu
1064 ChangeFont 15 $ShadeFont
1066 Set $UpdateItemsList = 1
1067 Set $MenuListValueIsZero = 1
1072 #----------------------------------------------------------------------------
1077 Flags NoReliefString
1089 #----------------------------------------------------------------------------
1094 Flags NoReliefString
1107 Flags NoReliefString
1115 Set $SelValue = (GetValue 22)
1116 Set $tmpValue = (GetValue 4)
1117 If $tmpValue == 0 Then
1118 Set $tmpValue = $NbrOfItems
1119 If $SelValue == 0 Then
1121 Set $t={Msg: No "selection" item selected!}
1126 Set $cmd=$SendMsgAndGet{"copy-sel-item }$Menu{:}$tmpValue{:}$SelValue{"}
1127 Set $Err=(GetOutput $cmd 1 -1)
1130 Set $t = {Msg: No items in selection!}
1135 Set $Value = (Add $tmpValue 1)
1136 Set $UpdateTheItem = 1
1137 Set $UpdateItemsList = 1
1145 Flags NoReliefString
1153 Set $tmpValue = (GetValue 4)
1154 If $tmpValue == 0 Then
1155 Set $tmpValue = $NbrOfItems
1156 Set $cmd=$SendMsgAndGet{"copy-all-sel }$Menu{:}$tmpValue{"}
1157 Set $Err=(GetOutput $cmd 1 -1)
1161 Set $t = {Msg: No items in selection!}
1166 Set $Value = (Add $tmpValue $SelNumber)
1167 Set $UpdateTheItem = 1
1168 Set $UpdateItemsList = 1
1176 Flags NoReliefString
1184 Set $SelValue = (GetValue 22)
1185 If $SelValue == 0 Then
1187 Set $t={Msg: No "selection" item selected!}
1192 Set $cmd=$SendMsgAndGet{"remove-sel-item }$SelValue{"}
1193 Set $Err=(GetOutput $cmd 1 -1)
1197 Set $t = {Msg: No items in selection!}
1202 Set $UpdateSelectionList = 1
1203 Set $SelNumber = (Add $SelNumber -1)
1211 Flags NoReliefString
1219 Set $cmd=$SendMsgAndGet{"remove-all-sel-item"}
1220 Set $Err=(GetOutput $cmd 1 -1)
1223 Set $t = {Msg: Error!}
1226 ChangeTitle 22 $Empty
1232 ChangeFont $tmp $ShadeFont
1233 Set $tmp = (Add $tmp 1)
1241 Flags NoReliefString
1253 #-----------------------------------------------------------------------------
1258 Flags NoReliefString
1266 Set $cmd=$SendMsgAndGet{"try"}
1267 Do {PipeRead '}$cmd{'}
1277 Flags NoReliefString
1280 Title {Apply And Save}
1285 Set $cmd=$SendMsgAndGet{"try"}
1286 Do {PipeRead '}$cmd{'}
1288 #Set $cmd=$SendMsgAndGet{"save"}
1289 #Set $dummy = (GetOutput $cmd 1 -1)
1290 Set $cmd=$SendMsg{"save"}
1293 Set $cmd = {fvwm-themes-config --no-cfg-cache --load menus-extra@personal}
1296 # In the future we replace the above with something like:
1297 # FuncFvwmThemeLoad "menus-extra@personal"
1298 # the problem with the current method is that the GNOME and KDE menu are
1299 # lost and that the personal component are not updated at once but
1300 # at the next switching. We can fix that by using the current method
1301 # and in the place of the previous effective line:
1302 #Do {PipeRead '}$cmd{'}
1303 #Do {FuncFvwmThemesFresh}
1304 #But without the CCDS this not IMHO a good idea. So:
1305 Set $t={"Refresh the Current Theme" when leaving the Editor}
1313 Flags NoReliefString
1321 Set $arg={FvwmScript-Help --text-colorset }$TextColorset{ --message " Documentation in progress" --title "Help for the Menu Editor}
1322 Set $MenuIconBrowser = (LaunchScript $arg )
1328 Flags NoReliefString
1336 Set $cmd = $SendMsg{"exit"}
1342 #-----------------------------------------------------------------------------
1343 #-----------------------------------------------------------------------------
1346 ################### Editor
1348 #-----------------------------------------------------------------------------
1349 #-----------------------------------------------------------------------------
1350 # At first I do a special script and swallow it but I've got some
1351 # problems in communication between the two scripts ... We can do such
1352 # thing in the case of the communication do not need big message!
1357 Flags NoReliefString
1360 Title {Type of the Command:}
1370 Flags NoReliefString
1373 Title {Separator|X Application|Run in a Terminal|Tail File|Title|Fvwm Command|Sub Menu|Menu}
1379 Set $selTypeValue = (GetValue 37)
1381 If $selTypeValue == 1 Then
1382 Set $EditorType = {Separator}
1383 If $selTypeValue == 2 Then
1384 Set $EditorType = {X Application}
1385 If $selTypeValue == 3 Then
1386 Set $EditorType = {Run in a Terminal}
1387 If $selTypeValue == 4 Then
1388 Set $EditorType = {Tail File}
1389 If $selTypeValue == 5 Then
1390 Set $EditorType = {Title}
1391 If $selTypeValue == 6 Then
1392 Set $EditorType = {Fvwm Command}
1393 If $selTypeValue == 7 Then
1394 Set $EditorType = {Sub Menu}
1395 If $selTypeValue == 8 Then
1396 Set $EditorType = {Menu}
1397 Set $HideEditorWidgets = 1
1398 Set $UpdateEditorWidgets = 1
1403 #----------------------------------------------------------------------
1408 Flags NoReliefString
1421 Flags NoReliefString
1433 #---------------------------------------------------------------------------
1438 Flags NoReliefString
1451 Flags NoReliefString
1465 Flags NoReliefString
1474 If $MenuIconBrowser == {} Then
1476 Set $arg={FvwmScript-IconBrowser --dir } $ImagesDir { --icon-colorset }$IconColorset{ --text-colorset }$TextColorset
1477 Set $MenuIconBrowser = (LaunchScript $arg )
1482 #----------------------------------------------------------------------------
1487 Flags NoReliefString
1491 #Command, Exec, File, Menu
1501 Flags NoReliefString
1513 #----------------------------------------------------------------------------
1518 Flags NoReliefString
1526 Set $a = (GetTitle 44)
1527 Set $dt = (GetTitle 48)
1528 If $EditorType == {X Application} Then
1532 Set $a = {cd }$dt { ; ./}$a
1535 If $EditorType == {Run in a Terminal} Then
1536 Set $a = {FuncFvwmRunInXterm "}$dt{" "}$a{"}
1537 If $EditorType == {Tail File} Then
1538 Set $a = {FuncFvwmViewFileTail "}$dt{" "}$a{"}
1545 #----------------------------------------------------------------------------
1550 Flags NoReliefString
1559 If $FindItBrowser == {} Then
1563 If $EditorType == {Tail File} Then
1565 Set $mode = {browser}
1566 Set $tmp = (GetTitle 44)
1573 If $EditorType == {X Application} Then
1574 Set $tmp = (GetTitle 48)
1575 Set $t= {"files in the working directory"}
1579 Set $t = {"All files in the path"}
1584 Set $arg={FvwmScript-Browser --dir }$tmp { --text-colorset }$TextColorset{ --mode }$mode{ --list-title }$t
1585 Set $FindItBrowser = (LaunchScript $arg )
1591 #----------------------------------------------------------------------------
1596 Flags NoReliefString
1599 Title {Window Title:}
1610 Flags NoReliefString
1622 #----------------------------------------------------------------------------
1623 # Browser for working dir ...
1627 Flags NoReliefString
1636 If $FileDirBrowser == {} Then
1638 Set $tmp = (GetTitle 48)
1641 Set $arg={FvwmScript-Browser --dir }$tmp { --text-colorset }$TextColorset{ --type dir}
1642 Set $FileDirBrowser = (LaunchScript $arg )
1648 #----------------------------------------------------------------------------
1653 Flags NoReliefString
1656 Title {List of Menus:}
1666 Flags NoReliefString
1681 Flags NoReliefString
1684 Title {Special Menus:}
1694 Flags NoReliefString
1706 #----------------------------------------------------------------------------
1711 Flags NoReliefString
1719 Set $HideEditorWidgets = 1
1720 Set $ShowMainWidgets = 1
1721 # need to do some protection here!
1722 # problem with the { and }
1723 # get problem with space (fixable in menuapp) and ":" in $Menus
1724 # real problem is the action
1725 Set $EditMess = $SendMsgAndGet{'add-or-edit-item }$EditOrAdd{ --it="}$Menu{:}$EditorValue{" --ti="}$EditorType{" --na="}(GetTitle 39){" --mi="}$EditorMenuIcon{" --ac="}(GetTitle 44){" --wd="}(GetTitle 48){"'}
1726 #Do {Echo }$EditMess
1727 If $EditOrAdd == {A} Then
1728 Set $Value = (Add $EditorValue 1)
1730 Set $Value = $EditorValue
1731 Set $UpdateItemsList = 1
1732 Set $UpdateTheItem = 1
1738 Flags NoReliefString
1746 Set $HideEditorWidgets = 1
1747 Set $ShowMainWidgets = 1