summaryrefslogtreecommitdiff
path: root/debian/patches/0002-menu-Tweak-the-Debian-menu-files-for-official-packag.patch
blob: d19dbe8fa9d8fa7467c9b5b086d1e267317d346d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
From 310777dcc6bec3c86a8a8543b8866141053f75c8 Mon Sep 17 00:00:00 2001
From: Manoj Srivastava <srivasta@debian.org>
Date: Mon, 17 Apr 2006 14:33:17 +0000
Subject: [PATCH 2/2] [menu] Tweak the Debian menu files for official packages

Defer language translations for now

git-archimport-id: srivasta@debian.org--etch/wm-icons--debian--0.4--patch-2
(cherry picked from commit d8bea97e35db3fb856b1c6131ff79a21063f49e4)

git-archimport-id: srivasta@debian.org--etch/wm-icons--debian--0.4--patch-3
(cherry picked from commit 7e89639821ac681c3ed74037c2a7ac3d4567f6f3)

git-archimport-id: srivasta@debian.org--etch/wm-icons--debian--0.4--patch-4
(cherry picked from commit 3cfe2ea894a3599b943dc2546820b400ae161d58)

git-archimport-id: srivasta@debian.org--etch/wm-icons--debian--0.4--patch-5
(cherry picked from commit 7aa0bd600186e9d60a76be9b37499499ea6f0cfd)
---
 etc/debian-menu-system/README                   | 14 ++++----------
 etc/debian-menu-system/wm-icons-fvwm2rc-menu.in | 16 ++++++++++------
 etc/debian-menu-system/wm-icons.h.in            | 23 +++++++++++++++++------
 3 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/etc/debian-menu-system/README b/etc/debian-menu-system/README
index 73b9985..eaf3648 100644
--- a/etc/debian-menu-system/README
+++ b/etc/debian-menu-system/README
@@ -10,20 +10,14 @@ as a simple user.
   the "standard sections" and wm-icons icons and a map from packages name
   to wm-icons icons.
 
-* wm-icons-fvwm2rc-menu is a menu-method script for FVWM. You should edit
-  the lines:
-	rootprefix="/usr/local/share/fvwm/debian-menu-system/"
-	userprefix="/.fvwm/debian-menu-system/"
-  replace "/usr/local/share/fvwm/" by the FVWM configuration directory
-  and ".fvwm" by the FVWM user directory. Then, you should add
-	Read  debian-menu-system/wm-icons-menu
+* wm-icons-fvwm2rc-menu is a menu-method script for FVWM. You should add
+	Read  wm-icons/menudefs.hook
   in the configuration file and bind it in some ways e.g.:
   add:
-	+ "menu system%menu/programs.xpm" Popup MenuFvwmDebianMenuSystem
+	+ "menu system%menu/programs.xpm" Popup "/DebianWmIcons"
   in your root menu 
   or add say:
-	Mouse 1 R A Menu MenuFvwmDebianMenuSystem
-  You should also use the configuration file "this dir"/../fvwm2rc
+	Mouse 1 R A Menu "/DebianWmIcons"
 
 * Other window managers: just (copy and rename and) edit the correponding
   menu methods script; you should add "!include wm-icons.h" and then you
diff --git a/etc/debian-menu-system/wm-icons-fvwm2rc-menu.in b/etc/debian-menu-system/wm-icons-fvwm2rc-menu.in
index 55964e7..9b32f11 100755
--- a/etc/debian-menu-system/wm-icons-fvwm2rc-menu.in
+++ b/etc/debian-menu-system/wm-icons-fvwm2rc-menu.in
@@ -1,10 +1,11 @@
-#!/usr/sbin/install-menu
+#!/usr/bin/install-menu
 compat="menu-1"
+!include lang.h
 !include menu.h
 # you may/should edit/check the systemFindIcon in wm-icons.h
 !include wm-icons.h
 
-function ltitle()=translate(lang(),title())
+function ltitle()=translate($lang,title())
 
 # if you want wm-icons only:
 #	replace "wmIconsFindIcon" by wmIconsFindIconWmOnly
@@ -21,6 +22,9 @@ supported
   fvwm2module=  "+ \"" escfirst(ltitle(), $hotkey,"&") \
     	cond_surr(wmIconsFindIcon($icon,$package,$section,"menu/"),"%","%") \
 	"\" Module " $command "\n"
+  fvwm=  "+ \"" escfirst(ltitle() ,$hotkey,"&") \
+    	cond_surr(wmIconsFindIcon($icon,$package,$section,"menu/"),"%","%") \
+	"\" " $command "\n"
   fvwm2=  "+ \"" escfirst(ltitle() ,$hotkey,"&") \
     	cond_surr(wmIconsFindIcon($icon,$package,$section,"menu/"),"%","%") \
 	"\" " $command "\n"
@@ -46,8 +50,8 @@ submenutitle= "+ \"" escfirst(ltitle() ,$hotkey,"&") \
 	cond_surr(wmIconsFindSectionIcon($section,$icon,"menu/"),"%","%") \
 	"\" PopUp \"" replacewith($section, " ", "_") "\"\n"
 
-rootprefix="/usr/local/share/fvwm/debian-menu-system/"
-userprefix="/.fvwm/debian-menu-system/"
+rootprefix="/etc/X11/fvwm/wm-icons/"
+userprefix="/.fvwm/wm-icons/"
 treewalk="c(m)"
-genmenu="wm-icons-menu"
-rootsection="MenuFvwmDebianMenuSystem"
+genmenu="menudefs.hook"
+rootsection="/DebianWmIcons"
diff --git a/etc/debian-menu-system/wm-icons.h.in b/etc/debian-menu-system/wm-icons.h.in
index 8bff428..bf3a177 100644
--- a/etc/debian-menu-system/wm-icons.h.in
+++ b/etc/debian-menu-system/wm-icons.h.in
@@ -13,13 +13,24 @@
 # need to replace /urs/local/share/fvwm by "fvwm-themes @datadir@"/fvwm
 function systemFindIcon($filename)= \
     ifeqelse($filename, "", "", \
+    ifelsefile("/usr/share/icons/wm-icons/mini/" $filename, \
+        "/usr/share/icons/wm-icons/mini/" $filename, \
     ifelsefile("/usr/share/icons/mini/" $filename, \
-	"/usr/share/icons/mini/" $filename, \
+        "/usr/share/icons/mini/" $filename, \
+    ifelsefile("/usr/share/icons/wm-icons/16x16-general/" $filename, \
+        "/usr/share/icons/wm-icons/16x16-general/" $filename, \
+    ifelsefile("/usr/share/icons/wm-icons/16x16-gnome/" $filename, \
+        "/usr/share/icons/wm-icons/16x16-gnome/" $filename, \
+    ifelsefile("/usr/share/icons/wm-icons/16x16-kde/" $filename, \
+        "/usr/share/icons/wm-icons/16x16-kde/" $filename, \
+    ifelsefile("/usr/share/fvwm-crystal/fvwm/icons/Default/" $filename, \
+        "/usr/share/fvwm-crystal/fvwm/icons/Default/" $filename, \
     ifelsefile("/usr/local/share/fvwm/tr-images/16x16-gnome/" $filename, \
-	"/usr/local/share/fvwm/tr-images/16x16-gnome/" $filename, \
+        "/usr/local/share/fvwm/tr-images/16x16-gnome/" $filename, \
     ifelsefile("/usr/local/share/fvwm/tr-images/16x16-kde2/" $filename, \
-	"/usr/local/share/fvwm/tr-images/16x16-kde2/" $filename,\
-    ""))))
+        "/usr/local/share/fvwm/tr-images/16x16-kde2/" $filename, \
+    "")))))))))
+
 
 # return the wm-icons associated to a standard section. If the section is
 # not standard return the "system/user" icons for this section and if not
@@ -30,7 +41,7 @@ function wmIconsFindSectionIcon($s,$i,$t)= \
   ifeqelse(systemFindIcon($i),"",\
   ifeqelse(wmIconsGetSectionIcon(parent($s)),"",\
   ifeqelse(wmIconsGetSectionIcon(parent(parent($s))),"",\
-	   $t "folder.xpm",\ 
+	   $t "folder.xpm",\
 	   $t wmIconsGetSectionIcon(parent(parent($s)))),\
 	   $t wmIconsGetSectionIcon(parent($s))),\
 	   systemFindIcon($i)),\
@@ -41,7 +52,7 @@ function wmIconsFindSectionIconWmOnly($s,$i,$t)= \
   ifeqelse(wmIconsGetSectionIcon($s),"",\
   ifeqelse(wmIconsGetSectionIcon(parent($s)),"",\
   ifeqelse(wmIconsGetSectionIcon(parent(parent($s))),"",\
-	   $t "folder.xpm",\ 
+	   $t "folder.xpm",\
 	   $t wmIconsGetSectionIcon(parent(parent($s)))),\
 	   $t wmIconsGetSectionIcon(parent($s))),\
 	   $t wmIconsGetSectionIcon($s))
-- 
1.9.1