rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / mrxvt / patches / 01.menubar.patch
blob9dd2e7332b2f62d1d06ab2820e84a7d912a58094
1 diff -Naur mrxvt-0.5.4.orig/src/menubar.c mrxvt-0.5.4/src/menubar.c
2 --- mrxvt-0.5.4.orig/src/menubar.c 2008-05-16 13:23:32.000000000 -0400
3 +++ mrxvt-0.5.4/src/menubar.c 2008-09-17 10:57:54.895205000 -0400
4 @@ -137,7 +137,7 @@
6 if (item->entry.itemType == MenuSubMenu)
8 - if (!STRCMP(name, (item->entry.submenu.menu)->name))
9 + if (!STRCMP(name, (item->entry.eu.submenu.menu)->name))
10 break;
12 else if ((isSeparator(name) && isSeparator(item->name))
13 @@ -178,13 +178,13 @@
14 switch (item->entry.itemType)
16 case MenuSubMenu:
17 - rxvt_menu_delete(r, item->entry.submenu.menu);
18 - SET_NULL(item->entry.submenu.menu);
19 + rxvt_menu_delete(r, item->entry.eu.submenu.menu);
20 + SET_NULL(item->entry.eu.submenu.menu);
21 break;
23 case MenuItem:
24 - rxvt_free(item->entry.action.str);
25 - SET_NULL(item->entry.action.str);
26 + rxvt_free(item->entry.eu.action.str);
27 + SET_NULL(item->entry.eu.action.str);
28 break;
31 @@ -419,13 +419,13 @@
32 switch (item->entry.itemType)
34 case MenuSubMenu:
35 - rxvt_menu_delete(r, item->entry.submenu.menu);
36 - SET_NULL(item->entry.submenu.menu);
37 + rxvt_menu_delete(r, item->entry.eu.submenu.menu);
38 + SET_NULL(item->entry.eu.submenu.menu);
39 break;
41 case MenuItem:
42 - rxvt_free(item->entry.action.str);
43 - SET_NULL(item->entry.action.str);
44 + rxvt_free(item->entry.eu.action.str);
45 + SET_NULL(item->entry.eu.action.str);
46 break;
48 goto Item_Found;
49 @@ -435,7 +435,7 @@
50 /* allocate a new itemect */
51 item = (menuitem_t *) rxvt_malloc( sizeof( menuitem_t) );
53 - SET_NULL(item->entry.action.str); /* If not null will be freed by
54 + SET_NULL(item->entry.eu.action.str); /* If not null will be freed by
55 rxvt_action_set */
57 item->len2 = 0;
58 @@ -496,9 +496,9 @@
59 /* str = rxvt_malloc(len + 1); */
61 STRCPY(str, action);
62 - SET_NULL(item->entry.action.str);
63 + SET_NULL(item->entry.eu.action.str);
65 - if( rxvt_set_action( &(item->entry.action), str) )
66 + if( rxvt_set_action( &(item->entry.eu.action), str) )
67 item->entry.itemType = MenuItem;
70 @@ -598,10 +598,10 @@
72 if (
73 item->entry.itemType == MenuSubMenu
74 - && !STRCMP(path, (item->entry.submenu.menu)->name)
75 + && !STRCMP(path, (item->entry.eu.submenu.menu)->name)
78 - m = (item->entry.submenu.menu);
79 + m = (item->entry.eu.submenu.menu);
80 break;
83 @@ -666,10 +666,10 @@
84 for (item = parent->tail; NOT_NULL(item); item = item->prev)
86 if (item->entry.itemType == MenuSubMenu
87 - && item->entry.submenu.menu == menu)
88 + && item->entry.eu.submenu.menu == menu)
90 /* Unlink from the parent menu */
91 - SET_NULL(item->entry.submenu.menu);
92 + SET_NULL(item->entry.eu.submenu.menu);
93 rxvt_menuitem_free(r, menu->parent, item);
94 break;
96 @@ -801,7 +801,7 @@
97 assert(item->entry.itemType == MenuLabel);
98 #endif
99 item->entry.itemType = MenuSubMenu;
100 - item->entry.submenu.menu = menu;
101 + item->entry.eu.submenu.menu = menu;
104 return menu;
105 @@ -936,7 +936,7 @@
106 for (item = menu->parent->head; NOT_NULL(item); item = item->next)
108 if (item->entry.itemType == MenuSubMenu &&
109 - item->entry.submenu.menu == menu)
110 + item->entry.eu.submenu.menu == menu)
112 break;
114 @@ -977,10 +977,10 @@
116 if (item->entry.itemType == MenuSubMenu)
118 - if (IS_NULL(item->entry.submenu.menu))
119 + if (IS_NULL(item->entry.eu.submenu.menu))
120 rxvt_dbgmsg ((DBG_DEBUG, DBG_MENUBAR, "> %s == NULL\n", item->name));
121 else
122 - rxvt_print_menu_descendants(item->entry.submenu.menu);
123 + rxvt_print_menu_descendants(item->entry.eu.submenu.menu);
125 else
127 @@ -1195,7 +1195,7 @@
129 int x1, y1;
130 menuitem_t *it;
131 - menu_t *menu = item->entry.submenu.menu;
132 + menu_t *menu = item->entry.eu.submenu.menu;
134 rxvt_menubar_draw_triangle(r, amenu_width, y, +1);
136 @@ -1622,10 +1622,10 @@
138 /* remove menu before sending keys to the application */
139 rxvt_menu_hide_all(r);
140 - rxvt_dispatch_action(r, &(item->entry.action),
141 + rxvt_dispatch_action(r, &(item->entry.eu.action),
142 (XEvent *) ev );
143 #ifdef DEBUG /* DEBUG */
144 - rxvt_dbgmsg ((DBG_VERBOSE, DBG_MENUBAR, "%s: %s\n", item->name, item->entry.action.str));
145 + rxvt_dbgmsg ((DBG_VERBOSE, DBG_MENUBAR, "%s: %s\n", item->name, item->entry.eu.action.str));
146 #endif /* DEBUG */
147 break;
149 @@ -1656,9 +1656,9 @@
151 x = ev->x + ActiveMenu->x;
153 - if (x >= item->entry.submenu.menu->x)
154 + if (x >= item->entry.eu.submenu.menu->x)
156 - r->h->ActiveMenu = item->entry.submenu.menu;
157 + r->h->ActiveMenu = item->entry.eu.submenu.menu;
158 rxvt_menu_show(r);
159 return 1;
161 @@ -2729,8 +2729,8 @@
162 width = PTEXTWIDTH( r, item->name2, item->len2);
163 if( menu->rwidth < width ) menu->rwidth = width;
165 - if( item->entry.itemType == MenuSubMenu && item->entry.submenu.menu)
166 - resizeSubMenus( r, item->entry.submenu.menu );
167 + if( item->entry.itemType == MenuSubMenu && item->entry.eu.submenu.menu)
168 + resizeSubMenus( r, item->entry.eu.submenu.menu );
172 diff -Naur mrxvt-0.5.4.orig/src/menubar.h mrxvt-0.5.4/src/menubar.h
173 --- mrxvt-0.5.4.orig/src/menubar.h 2008-02-17 17:04:50.000000000 -0500
174 +++ mrxvt-0.5.4/src/menubar.h 2008-09-17 10:57:54.934688000 -0400
175 @@ -41,7 +41,7 @@
176 union {
177 action_t action;
178 submenu_t submenu;
179 - };
180 + } eu;
181 } entry;
182 } menuitem_t;