3.14. 更改默認(rèn)程序(OLEX2使用手冊)
原文如下:
Change default programs
To change default text editor, html editor or folder browser, you need to set the Olex2 variables associated with these programs. To keep the changes permanent, create the file 'custom.xld' in the Olex2 installation directory. For example the following construct placed in that file sets programs for KDE:
<user_onstartup help="Executes on program start"
<body <args>?
<cmd?
<cmd1 "setvar(defeditor,'kate')">?
<cmd2 "setvar(defexplorer,'konqueror')">?
<cmd3 "setvar(defbrowser,'konqueror')">?
>?
>
This defines a function which is called when Olex2 starts up, please note if there are several functions with the same name are found in the files - the last one will be used. Please avoid overriding any functions in the macro.xld file as that may cause Olex2 to function incorrectly.
譯文如下:
3.14. 更改默認(rèn)程序
要更改默認(rèn)文本編輯器、html編輯器或文件夾瀏覽器,需要設(shè)置與這些程序關(guān)聯(lián)的Olex2變量。要使更改保持永久性,請在Olex2安裝目錄中創(chuàng)建'custom.xld'文件。例如,放置在該文件中的以下構(gòu)造為KDE設(shè)置程序:
<user_onstartup help="Executes on program start"
?<body
? <args
? >?
? <cmd
? ?<cmd1"setvar(defeditor,'kate')">
? ?<cmd2"setvar(defexplorer,'konqueror')">
? ?<cmd3"setvar(defbrowser,'konqueror')">
? >?
>?
>?
這定義了一個在Olex2啟動時調(diào)用的函數(shù),請注意,如果在文件中找到多個同名函數(shù),將使用最后一個函數(shù)。請避免重寫macro.xld文件中的任何函數(shù),因為這可能導(dǎo)致Olex2無法正常工作。
公眾號文章鏈接:
https://mp.weixin.qq.com/s?__biz=MzU0NjkzMTM1MQ==&mid=2247485364&idx=1&sn=66c0d9124a322775183a96b29dc80b08&chksm=fb57504ccc20d95abd6d2705569088557b893692c544d37ef085add201ab41efef37264d126a&token=1126004319&lang=zh_CN#rd
