[Pkg-wmaker-commits] [wmaker] 01/04: debian/patches/11_XDG-menu-categories.patch: New patch; add missing XDG menu categories to wmmenugen utility.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Jul 24 02:42:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmaker.
commit 2c59b2a094a03f48dfc97c8ae74699113bbfc2f2
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Mon Jul 10 08:21:57 2017 -0400
debian/patches/11_XDG-menu-categories.patch: New patch; add missing XDG
menu categories to wmmenugen utility.
---
debian/patches/11_XDG-menu-categories.patch | 57 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 58 insertions(+)
diff --git a/debian/patches/11_XDG-menu-categories.patch b/debian/patches/11_XDG-menu-categories.patch
new file mode 100644
index 0000000..76900a9
--- /dev/null
+++ b/debian/patches/11_XDG-menu-categories.patch
@@ -0,0 +1,57 @@
+Description: Include more XDG menu categories when parsing with wmmenugen.
+Origin: http://repo.or.cz/wmaker-crm.git/commit/c261f8e
+Origin: http://repo.or.cz/wmaker-crm.git/commit/ac0690b
+Origin: http://repo.or.cz/wmaker-crm.git/commit/adc1687
+Origin: http://repo.or.cz/wmaker-crm.git/commit/ff865c3
+Last-Update: 2017-07-09
+
+--- a/util/wmmenugen_parse_xdg.c
++++ b/util/wmmenugen_parse_xdg.c
+@@ -178,6 +178,9 @@
+ getMenuHierarchyFor(&xdg->Category);
+ }
+
++ if (xdg->Category == NULL)
++ xdg->Category = wstrdup(_("Other"));
++
+ wfree(key);
+ key = NULL;
+ }
+@@ -523,6 +526,9 @@
+ } else if (strcmp(p, "Office") == 0) {
+ snprintf(buf, sizeof(buf), "%s", _("Office"));
+ break;
++ } else if (strcmp(p, "Science") == 0) {
++ snprintf(buf, sizeof(buf), "%s", _("Science"));
++ break;
+ } else if (strcmp(p, "Settings") == 0) {
+ snprintf(buf, sizeof(buf), "%s", _("Settings"));
+ break;
+@@ -532,13 +538,26 @@
+ } else if (strcmp(p, "Utility") == 0) {
+ snprintf(buf, sizeof(buf), "%s", _("Utility"));
+ break;
++ /* reserved categories */
++ } else if (strcmp(p, "Screensaver") == 0) {
++ snprintf(buf, sizeof(buf), "%s", _("Screensaver"));
++ break;
++ } else if (strcmp(p, "TrayIcon") == 0) {
++ snprintf(buf, sizeof(buf), "%s", _("Tray Icon"));
++ break;
++ } else if (strcmp(p, "Applet") == 0) {
++ snprintf(buf, sizeof(buf), "%s", _("Applet"));
++ break;
++ } else if (strcmp(p, "Shell") == 0) {
++ snprintf(buf, sizeof(buf), "%s", _("Shell"));
++ break;
+ }
+ p = strtok(NULL, ";");
+ }
+
+
+ if (!*buf) /* come up with something if nothing found */
+- snprintf(buf, sizeof(buf), "%s", _("Applications"));
++ snprintf(buf, sizeof(buf), "%s", _("Other"));
+
+ *xdgmenuspec = wstrdup(buf);
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 73ea661..b43c247 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
10_util-fix-parsing-of-XDG-menus-with-multiple-groups.patch
+11_XDG-menu-categories.patch
53_Debian_WMState.diff
54_Debian_wmmacros.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git
More information about the Pkg-wmaker-commits
mailing list