If you want to integrate this text editor into CDE, please take a following method.
Please install this editor with normal method.Distribute needed files and set paths.
Save needed icons into "$HOME/.dt/icons" directory.
You need icons that shows an application and documents. Icons file format is XPM, and sizes are 16x16, 24x24, 32x32 and 48x48.
You need to name icons following method.
"NAME" is any names O.K. if icon size is 48x48, "SIZE is "l", if icon size is 32x32, "SIZE" is "m", if icon size is 24x24, "SIZE" is "s", if icon size is 16x16, "SIZE" is "t".
To create an action, easy way is that to use "Create Action" tool. In this article, we create "syuhitu" action.
If you create "Syuhitu" action with "Create Action" tool, a "Syuhitu.dt" file is created in "$HOME/.dt/type" derectory. That file include following script.
ACTION Syuhitu { LABEL Syuhitu TYPE COMMAND EXEC_STRING /usr/local/syuhitu/syuhitu.sh ICON Syuhitu WINDOW_TYPE NO_STDIO }
There are some deferences by your configurations.
In that script, add "/file:%Args%" to value of "EXEC_STRING" item.(e.g. "EXEC_STRING /usr/local/syuhitu/syuhitu.sh /file:%Args%" ) It is needed when syuhitu opens a double clicked file.
In this article, we create relations of "*.c" and "*.h" files. And we assume that there are "c" and "h" icon files. (There are 8 icon files. "c.l.pm", "c.m.pm", "c.s.pm", "c.t.pm", "h.l.pm", "h.m.pm", "h.s.pm" and "h.t.pm".)
Add the following script to "$HOME/.dt/types/Syuhitu.dt" file.
DATA_ATTRIBUTES SyuhituCSource { ACTIONS Open ICON c } DATA_CRITERIA SyuhituCSource_criteria1 { DATA_ATTRIBUTES_NAME SyuhituCSource MODE r&!d NAME_PATTERN *.c } DATA_ATTRIBUTES SyuhituHSource { ACTIONS Open ICON h } DATA_CRITERIA SyuhituHSource_criteria1 { DATA_ATTRIBUTES_NAME SyuhituHSource MODE r&!d NAME_PATTERN *.h } ACTION Open { ARG_TYPE SyuhituCSource,SyuhituHSource TYPE MAP MAP_ACTION Syuhitu }
After save and close this file, reload actions. May be, it is in popup menu that is showed when "*.dt" files are right clicked.
If you use "Create Action" tool, may be, you have a "$HOME/Syuhitu" file. Otherwise, create a "Syuhitu" file and set Execute permissions.
After move this file to your position, Drag & Drop this file to "Install icon" menu in front panel.
Copyright(C) 2005 nabiki_t All Rights Reserved.