Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15
icewm
icewm-susemenu.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File icewm-susemenu.patch of Package icewm
diff --git a/lib/menu.in b/lib/menu.in index 88a3d70..e79d828 100644 --- a/lib/menu.in +++ b/lib/menu.in @@ -13,5 +13,6 @@ prog XChat xchat xchat prog Gimp gimp gimp separator menuprog "Desktop Apps" folder icewm-menu-fdo -menufile Programs folder programs +#menufile Programs folder programs menufile Tool_bar folder toolbar +menuprog SUSE folder xdg_menu --format icewm diff --git a/src/wmprog.cc b/src/wmprog.cc index d1ce6b0..5190d80 100644 --- a/src/wmprog.cc +++ b/src/wmprog.cc @@ -429,7 +429,42 @@ char *parseMenus( if (progmenu) container->addContainer(name.cstr(), icon, progmenu); } - } else if (!strcmp(word, "menuprogreload")) { + } else if (!strcmp(word, "suseprog")) { + Argument name; + + p = YConfig::getArgument(&name, p); + if (p == 0) return p; + + Argument icons; + + p = YConfig::getArgument(&icons, p); + if (p == 0) return p; + + Argument command; + YStringArray args; + + p = getCommandArgs(p, &command, args); + if (p == 0) { + msg(_("Error at prog %s"), name.cstr()); + return p; + } + + ref<YIcon> icon; +#ifndef LITE + if (icons[0] != '-') + icon = YIcon::getIcon(icons); +#endif + MSG(("suseprog %s %s", name.cstr(), command.cstr())); + + upath fullPath = findPath(getenv("PATH"), X_OK, command.cstr()); + if (fullPath != null) { + ObjectMenu *progmenu = new MenuProgMenu( + app, smActionListener, wmActionListener, + name.cstr(), command.cstr(), args, 0); + if (progmenu) + container->addContainer(name.cstr(), icon, progmenu); + } + } else if (!strcmp(word, "menuprogreload")) { Argument name; p = YConfig::getArgument(&name, p);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor