summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Basemenu.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Basemenu.cc b/src/Basemenu.cc
index 659d4d7..d92b3db 100644
--- a/src/Basemenu.cc
+++ b/src/Basemenu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Basemenu.cc,v 1.6 2002/01/11 09:26:33 fluxgen Exp $ 25// $Id: Basemenu.cc,v 1.7 2002/01/26 11:22:06 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -118,15 +118,15 @@ Basemenu::Basemenu(BScreen *scrn) {
118 118
119 //set attributes for menu window 119 //set attributes for menu window
120 unsigned long attrib_mask = CWBackPixmap | CWBackPixel | CWBorderPixel | 120 unsigned long attrib_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
121 CWColormap | CWOverrideRedirect | CWEventMask; 121 CWColormap | CWOverrideRedirect | CWEventMask;
122 XSetWindowAttributes attrib; 122 XSetWindowAttributes attrib;
123 attrib.background_pixmap = None; 123 attrib.background_pixmap = None;
124 attrib.background_pixel = attrib.border_pixel = 124 attrib.background_pixel = attrib.border_pixel =
125 screen->getBorderColor()->getPixel(); 125 screen->getBorderColor()->getPixel();
126 attrib.colormap = screen->getColormap(); 126 attrib.colormap = screen->getColormap();
127 attrib.override_redirect = True; 127 attrib.override_redirect = True;
128 attrib.event_mask = ButtonPressMask | ButtonReleaseMask | 128 attrib.event_mask = ButtonPressMask | ButtonReleaseMask |
129 ButtonMotionMask | ExposureMask; 129 ButtonMotionMask | ExposureMask;
130 130
131 //create menu window 131 //create menu window
132 menu.window = 132 menu.window =
@@ -245,9 +245,10 @@ int Basemenu::remove(int index) {
245 Basemenu *tmp = (Basemenu *) item->submenu(); 245 Basemenu *tmp = (Basemenu *) item->submenu();
246 246
247 if (! tmp->internal_menu) { 247 if (! tmp->internal_menu) {
248 delete tmp; 248 delete tmp;
249 } else 249 } else
250 tmp->internal_hide(); 250
251 tmp->internal_hide();
251 } 252 }
252 253
253 if (item->label()) 254 if (item->label())
@@ -275,7 +276,7 @@ void Basemenu::update(void) {
275 menu.item_h = screen->getMenuStyle()->framefont.set_extents->max_ink_extent.height + 276 menu.item_h = screen->getMenuStyle()->framefont.set_extents->max_ink_extent.height +
276 menu.bevel_w; 277 menu.bevel_w;
277 menu.title_h = screen->getMenuStyle()->titlefont.set_extents->max_ink_extent.height + 278 menu.title_h = screen->getMenuStyle()->titlefont.set_extents->max_ink_extent.height +
278 (menu.bevel_w * 2); 279 (menu.bevel_w * 2);
279 } else { 280 } else {
280 menu.item_h = screen->getMenuStyle()->framefont.fontstruct->ascent + 281 menu.item_h = screen->getMenuStyle()->framefont.fontstruct->ascent +
281 screen->getMenuStyle()->framefont.fontstruct->descent + 282 screen->getMenuStyle()->framefont.fontstruct->descent +
@@ -314,7 +315,7 @@ void Basemenu::update(void) {
314 BasemenuItem *itmp = it.current(); 315 BasemenuItem *itmp = it.current();
315 316
316 const char *s = ((itmp->u && *itmp->u) ? *itmp->u : 317 const char *s = ((itmp->u && *itmp->u) ? *itmp->u :
317 ((itmp->l) ? itmp->l : (const char *) 0)); 318 ((itmp->l) ? itmp->l : (const char *) 0));
318 int l = strlen(s); 319 int l = strlen(s);
319 320
320 if (i18n->multibyte()) { 321 if (i18n->multibyte()) {