Adjust file.menu when regenerating menus.

SVN revision: 62759
This commit is contained in:
Kim Woelders 2011-08-24 20:45:08 +00:00
parent 7589f02945
commit 844cd5444d
3 changed files with 10 additions and 3 deletions

View File

@ -188,7 +188,7 @@ const char *txt[] = {
_("User Menus"),
_("User Application List"),
_("Other"),
_("Applications"),
_("Epplets"),
_("Restart"),
_("Log Out"),

View File

@ -71,7 +71,7 @@ sub x() {
@sl = (
"User Menus",
"User Application List",
"Other",
"Applications",
"Epplets",
"Restart",
"Log Out"

View File

@ -472,7 +472,14 @@ foreach $d (split(':', $AppDirs)) {
MkDir("$EdirMenus");
# Make the menus
MakeMenu("file.menu", \@MainMenu);
# If file.menu exists replace old GNOME/KDE/Other menus with combined one
$f = "$EdirMenus/file.menu";
if (-f $f) {
$cmd = 'print unless (/menus_(GNOME|KDE|Other)/); print "\"Applications\" NULL menu \"menus_apps/index.menu\"\n" if (/menus_Other/);';
system("perl -ni -e '$cmd' $f");
} else {
MakeMenu("file.menu", \@MainMenu);
}
MakeMenu("user_apps.menu", \@UserAppsMenu);
MakeEppsMenu("epplets.menu");
MakeAppsMenu("apps");