- Add back icewm menu as it is used by us

* icewm-susemenu.patch

OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/icewm?expand=0&rev=57
This commit is contained in:
Tomáš Chvátal 2016-03-08 12:26:31 +00:00 committed by Git OBS Bridge
parent 782c8c4767
commit 1382ccc4c4
3 changed files with 65 additions and 0 deletions

56
icewm-susemenu.patch Normal file
View File

@ -0,0 +1,56 @@
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
@@ -250,6 +250,14 @@ char *parseIncludeStatement(IApp *app, YSMListener *smActionListener, YActionLis
return p;
}
+void loadMenusProg(
+ IApp *app,
+ YSMListener *smActionListener,
+ YActionListener *wmActionListener,
+ const char *command,
+ char *const argv[],
+ ObjectContainer *container);
+
char *parseMenus(IApp *app, YSMListener *smActionListener, YActionListener *wmActionListener, char *data, ObjectContainer *container) {
char *p = data;
char word[32];
@@ -416,7 +424,23 @@ char *parseMenus(IApp *app, YSMListener *smActionListener, YActionListener *wmAc
delete[] name;
delete[] icons;
delete[] command;
- } else if (!strcmp(word, "menuprogreload")) {
+ } else if(!strcmp(word, "suseprog")) {
+ char *command;
+ YStringArray args;
+
+ p = getCommandArgs(p, &command, args);
+ if (p == 0) {
+ msg(_("Error at prog %s"), "susemenu"); return p;
+ }
+
+ MSG(("suseprog %s", command));
+
+ upath fullPath = findPath(getenv("PATH"), X_OK, command);
+ if (fullPath != null) {
+ loadMenusProg(app,smActionListener,wmActionListener,command,args.getCArray(),container);
+ }
+ delete[] command;
+ } else if(!strcmp(word, "menuprogreload")) {
char *name;
p = YConfig::getArgument(&name, p, false);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 8 12:25:59 UTC 2016 - tchvatal@suse.com
- Add back icewm menu as it is used by us
* icewm-susemenu.patch
-------------------------------------------------------------------
Thu Feb 18 11:27:10 UTC 2016 - alarrosa@suse.com

View File

@ -28,6 +28,8 @@ Source0: https://github.com/bbidulock/icewm/archive/%{version}.tar.gz
Source1: icewm.desktop
# PATCH-FIX-OPENSUSE icewm-mate.patch sor.alexei@meowr.ru -- Add MATE Menus support.
Patch0: icewm-mate.patch
# PATCH-FEATURE-SUSE icewm-susemenu.patch tyang@suse.com -- Add xdg-menu for SLED icewm
Patch1: icewm-susemenu.patch
Patch99: icewm-preferences.patch
BuildRequires: autoconf
BuildRequires: automake
@ -126,6 +128,7 @@ mailbox status, and a digital clock. It is fast and small.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# Do not require needlessly new gettext.
sed -i 's/0.19.6/0.18.3/g' configure.ac