Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
zh-cn:howto:customize-menu [2012/04/18 16:10] – [Hide only root entries] haobug | zh-cn:howto:customize-menu [2012/04/18 17:35] – [Forcing changes] haobug | ||
---|---|---|---|
Line 55: | Line 55: | ||
例如,把Web浏览器从根菜单中删除,复制它的 .desktop 文件,编辑并修改 '' | 例如,把Web浏览器从根菜单中删除,复制它的 .desktop 文件,编辑并修改 '' | ||
- | ===== Add entries | + | ===== 添加菜单项 |
- | Create a .desktop | + | |
+ | 为每个菜单项创建一个 | ||
[Desktop Entry] | [Desktop Entry] | ||
Version=1.0 | Version=1.0 | ||
Line 68: | Line 69: | ||
Name=Eclipse | Name=Eclipse | ||
Comment=Eclipse Java IDE | Comment=Eclipse Java IDE | ||
- | If you prefer to work in a GUI (allows browsing for the icon) you can create the .desktop | + | |
+ | 如果你喜欢用 | ||
exo-desktop-item-edit --create-new ~/ | exo-desktop-item-edit --create-new ~/ | ||
- | but the new file will only have category Application so will probably need editing afterwards. | ||
- | The categories determine where the new entry will be displayed. For display in the root menu, include category | + | 但这样新建的文件类别(Category)里面只有 Application, 可能需要再编辑才行。 |
+ | |||
+ | 类别(Category)决定菜单项会显示在哪。要在根菜单中显示,添加 | ||
<code xml> | <code xml> | ||
< | < | ||
Line 87: | Line 91: | ||
</ | </ | ||
</ | </ | ||
- | Any .desktop files with categories including Accessibility, | ||
- | ===== The Other sub-menu ===== | + | 任何包含 Accessibility, Core, Legacy 及 Utility 类别的并没有 '' |
- | If there are any .desktop files which are configured to be displayed in the xfdesktop menu but do not have any categories which include them in any of the defined menus, the Other sub-menu will be displayed and will display those entries. | + | |
- | If you have an Other sub-menu and do not want it, copy the .desktop file and modify its categories so it is included in one of the other sub-menus. | + | ===== ”其他“ 子菜单 ===== |
- | ===== Create sub-menus ===== | + | 如果有 .desktop 文件配置了要在菜单中显示,但没有任何已定义的类别(用于包含他们到已定义的菜单中),”其他“菜单就会显示这些菜单项。这条规则适用于 // |
- | To create a new sub-menu, add a new " | + | |
+ | 如果你的系统有”其他“,但你不想要它,复制菜单项的 .desktop 文件,修改它的类别,使它被包含到其他子菜单中去。 | ||
+ | |||
+ | ===== 创建子菜单 ===== | ||
+ | 创建一个新的子菜单, | ||
<code xml> | <code xml> | ||
< | < | ||
Line 107: | Line 112: | ||
</ | </ | ||
- | Next, create | + | 接下来,创建 |
[Desktop Entry] | [Desktop Entry] | ||
Version=1.0 | Version=1.0 | ||
Line 116: | Line 120: | ||
Comment=Folders viewed in a file manager | Comment=Folders viewed in a file manager | ||
- | This provides the displayed name of the subdirectory as well as an appropriate icon. | + | 这提供了子目录的显示名字及合适的图标。 |
- | Finally, create .desktop files in your ~/ | + | 最后,在 |
[Desktop Entry] | [Desktop Entry] | ||
Line 131: | Line 135: | ||
Comment=home displayed in Thunar | Comment=home displayed in Thunar | ||
- | With all this in place, you should have a new submenu called | + | 做完这些,你会发现多了一个叫 |
+ | ===== 强制修改 ===== | ||
+ | |||
+ | 这通常没有必要并且不一定起作用;注销然后再进入才总是有用的。 | ||
- | ===== Forcing changes ===== | + | 如果菜单没有自动更新,试一下 |
- | This is not usually necessary and may not work anyway; logging out of the Xfce session and back in always works. | + | |
- | If the menu is not automatically updated with your changes, try | ||
xfdesktop --reload | xfdesktop --reload | ||
- | If that doesn' | + | 如果没有超作用,再试一下 |
killall -HUP xfdesktop | killall -HUP xfdesktop | ||