From 1382ccc4c4c163553b39a7575f15362290834a4d69239653ac6ce2da38e5cfe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 8 Mar 2016 12:26:31 +0000 Subject: [PATCH] - 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 --- icewm-susemenu.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++ icewm.changes | 6 +++++ icewm.spec | 3 +++ 3 files changed, 65 insertions(+) create mode 100644 icewm-susemenu.patch diff --git a/icewm-susemenu.patch b/icewm-susemenu.patch new file mode 100644 index 0000000..8e32885 --- /dev/null +++ b/icewm-susemenu.patch @@ -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); diff --git a/icewm.changes b/icewm.changes index 9459990..3cb624e 100644 --- a/icewm.changes +++ b/icewm.changes @@ -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 diff --git a/icewm.spec b/icewm.spec index 60d11f7..10c630f 100644 --- a/icewm.spec +++ b/icewm.spec @@ -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