icewm/icewm-susemenu.patch
Yifan Jiang c4d6cb3d47 Accepting request 1071409 from home:polslinux:branches:X11:windowmanagers
- Update to 3.3.2:
  * Add yimage_gdk.h.
  * Add "loop" and "pick" commands to icesh. Add "Fullscreen" and "AboveAll"
    layer symbols to icesh.
  * Check for libiconv in configure for OpenBSD.
  * Modify a copy of the WM_CLASS. Prevent messages for loop.
  * Update layer from winoptions when WM_CLASS is changed.
  * Don't set WM_PROTOCOLS on frames.
  * Handle failure of XGetWindowAttributes more graceful in icesh.
  * Faster synchronization.
  * Set a timeout on synchronization. Make window picking more reliable and
    tab-aware.  Add resize handles to "bordered" when client is resizable.
  * Update _NET_WM_ALLOWED_ACTIONS when changing tabs.
  * Let icesh support picking window by frame or title bar.
  * Add "unset" to "icewm-env" to unset environment variables by
    icewm-session.
  * For for "PointerFocusDelay" when mouse crosses different frame border
    subwindows.
  * Check prefs and state before starting delay focus timer.
  * Use "hasBorders" in layoutShape to fix "HideBordersMaximized".
  * When restoring a window, automatically focus it, if nothing has focus.
  * Consider ClickToFocus and StrongPointerFocus when hiding or rolling up.
  * Improve the detection of overlapping windows to the focused window for
    grabbing/releasing the mouse buttons.
  * Cleanup details.
  * Include ClickToFocus in maybeFocus.
  * Document all layer names.
  * Preserve the stacking order for fullscreen windows when Alt+Tabbing for
    issue #611.  When hitting Escape while Alt+Tabbing abandon any
    selection.

OBS-URL: https://build.opensuse.org/request/show/1071409
OBS-URL: https://build.opensuse.org/package/show/X11:windowmanagers/icewm?expand=0&rev=133
2023-03-15 01:43:26 +00:00

86 lines
2.8 KiB
Diff

Index: icewm-3.3.2/lib/menu.in
===================================================================
--- icewm-3.3.2.orig/lib/menu.in
+++ icewm-3.3.2/lib/menu.in
@@ -11,5 +11,6 @@ prog Firefox mozilla firefox
prog Hexchat xchat hexchat
prog Gimp gimp gimp
includeprog icewm-menu-fdo --sep-before --no-sep-others
-menufile Programs folder programs
+#menufile Programs folder programs
menufile Tool_bar folder toolbar
+menuprog SUSE folder xdg_menu --format icewm
Index: icewm-3.3.2/src/wmmenu.cc
===================================================================
--- icewm-3.3.2.orig/src/wmmenu.cc
+++ icewm-3.3.2/src/wmmenu.cc
@@ -294,6 +294,46 @@ char* MenuLoader::parseMenuProg(char *p,
return p;
}
+char* MenuLoader::parseSuseProg(char *p, ObjectContainer *container)
+{
+ Argument name;
+
+ p = YConfig::getArgument(&name, p);
+ if (p == nullptr) return p;
+
+ Argument icons;
+
+ p = YConfig::getArgument(&icons, p);
+ if (p == nullptr) return p;
+
+ Argument command;
+ YStringArray args;
+
+ p = getCommandArgs(p, &command, args);
+ if (p == nullptr) {
+ msg(_("Error at menuprog '%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()));
+
+ csmart path(path_lookup(command.cstr()));
+ if (path) {
+ ObjectMenu *progmenu = new MenuProgMenu(
+ app, smActionListener, wmActionListener,
+ name.cstr(), command.cstr(), args);
+ if (progmenu)
+ container->addContainer(name.cstr(), icon, progmenu);
+ }
+
+ return p;
+}
+
char* MenuLoader::parseMenuProgReload(char *p, ObjectContainer *container)
{
Argument name;
@@ -395,6 +435,9 @@ char* MenuLoader::parseWord(char *word,
else if (!strcmp(word, "menuprogreload")) {
p = parseMenuProgReload(p, container);
}
+ else if (!strcmp(word, "suseprog")) {
+ p = parseSuseProg(p, container);
+ }
else if (!strcmp(word, "include")) {
p = parseIncludeStatement(p, container);
}
Index: icewm-3.3.2/src/wmprog.h
===================================================================
--- icewm-3.3.2.orig/src/wmprog.h
+++ icewm-3.3.2/src/wmprog.h
@@ -30,6 +30,7 @@ private:
char* parseAMenu(char *data, ObjectContainer *container);
char* parseMenuFile(char *data, ObjectContainer *container);
char* parseMenuProg(char *data, ObjectContainer *container);
+ char* parseSuseProg(char *p, ObjectContainer *container);
char* parseMenuProgReload(char *data, ObjectContainer *container);
char* parseKey(char *word, char *p);
char* parseProgram(char *word, char *p, ObjectContainer *container);