ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/menubar.C
(Generate patch)

Comparing rxvt-unicode/src/menubar.C (file contents):
Revision 1.22 by root, Fri Feb 4 11:41:23 2005 UTC vs.
Revision 1.25 by root, Wed Nov 30 14:23:29 2005 UTC

1563 /* what? ... skip this line */ 1563 /* what? ... skip this line */
1564 p[0] = COMMENT_CHAR; 1564 p[0] = COMMENT_CHAR;
1565 } 1565 }
1566 } 1566 }
1567 } 1567 }
1568
1568 /* 1569 /*
1569 * remove leading/trailing space 1570 * remove leading/trailing space
1570 * and strip-off leading/trailing quotes
1571 * skip blank or comment lines 1571 * skip blank or comment lines
1572 */ 1572 */
1573 rxvt_Str_trim (p); 1573 rxvt_Str_trim (p);
1574 if (*p && *p != '#') 1574 if (*p && *p != '#')
1575 { 1575 {
1944 break; 1944 break;
1945 } 1945 }
1946 else 1946 else
1947 BuildMenu = menu; 1947 BuildMenu = menu;
1948 } 1948 }
1949
1949 if (BuildMenu != NULL) 1950 if (BuildMenu != NULL)
1950 { 1951 {
1951 if (name == NULL || name[0] == '\0') 1952 if (name == NULL || name[0] == '\0')
1952 BuildMenu = menu_delete (BuildMenu); 1953 BuildMenu = menu_delete (BuildMenu);
1953 else 1954 else
1954 { 1955 {
1955 const char *n1; 1956 const char *n1;
1956 menuitem_t *item; 1957 menuitem_t *item;
1957 menu_t *BuildMenu = BuildMenu;
1958 1958
1959 n1 = strcmp (name, SEPARATOR_NAME) ? name : ""; 1959 n1 = strcmp (name, SEPARATOR_NAME) ? name : "";
1960 item = rxvt_menuitem_find (BuildMenu, n1); 1960 item = rxvt_menuitem_find (BuildMenu, n1);
1961 if (item != NULL && item->entry.type != MenuSubMenu) 1961 if (item != NULL && item->entry.type != MenuSubMenu)
1962 { 1962 {
1971 1971
1972 MAX_IT (BuildMenu->width, l); 1972 MAX_IT (BuildMenu->width, l);
1973 } 1973 }
1974 } 1974 }
1975 } 1975 }
1976
1976 menubar_expose (); 1977 menubar_expose ();
1977 } 1978 }
1978 break; 1979 break;
1979 } 1980 }
1980 break; 1981 break;
2248 break; 2249 break;
2249 2250
2250 case MenuAction: 2251 case MenuAction:
2251 case MenuTerminalAction: 2252 case MenuTerminalAction:
2252 drawbox_menuitem (this_y, -1); 2253 drawbox_menuitem (this_y, -1);
2253#ifdef HAVE_NANOSLEEP
2254 struct timespec rqt;
2255
2256 rqt.tv_sec = 0;
2257 rqt.tv_nsec = MENU_DELAY_USEC * 1000;
2258 nanosleep (&rqt, NULL);
2259#else
2260 /* use select for timing */
2261 struct timeval tv;
2262
2263 tv.tv_sec = 0;
2264 tv.tv_usec = MENU_DELAY_USEC; 2254 rxvt_usleep (MENU_DELAY_USEC);
2265 select (0, NULL, NULL, NULL, &tv);
2266#endif
2267 /* remove menu before sending keys to the application */ 2255 /* remove menu before sending keys to the application */
2268 menu_hide_all (); 2256 menu_hide_all ();
2269#ifndef DEBUG_MENU 2257#ifndef DEBUG_MENU
2270 action_dispatch (& (item->entry.action)); 2258 action_dispatch (& (item->entry.action));
2271#else /* DEBUG_MENU */ 2259#else /* DEBUG_MENU */
2349 if (ev.x >= (Arrows_x + (Width2Pixel (4 * i + i)) / 4) 2337 if (ev.x >= (Arrows_x + (Width2Pixel (4 * i + i)) / 4)
2350 && ev.x < (Arrows_x 2338 && ev.x < (Arrows_x
2351 + (Width2Pixel (4 * i + i + 4)) / 4)) 2339 + (Width2Pixel (4 * i + i + 4)) / 4))
2352 { 2340 {
2353 draw_Arrows (Arrows[i].name, -1); 2341 draw_Arrows (Arrows[i].name, -1);
2354 {
2355#ifdef HAVE_NANOSLEEP
2356 struct timespec rqt;
2357
2358 rqt.tv_sec = 0;
2359 rqt.tv_nsec = MENU_DELAY_USEC * 1000;
2360 nanosleep (&rqt, NULL);
2361#else
2362 /* use select for timing */
2363 struct timeval tv;
2364
2365 tv.tv_sec = 0;
2366 tv.tv_usec = MENU_DELAY_USEC; 2342 rxvt_usleep (MENU_DELAY_USEC);
2367 select (0, NULL, NULL, NULL, &tv);
2368#endif
2369
2370 }
2371 draw_Arrows (Arrows[i].name, +1); 2343 draw_Arrows (Arrows[i].name, +1);
2372#ifdef DEBUG_MENUARROWS 2344#ifdef DEBUG_MENUARROWS
2373 fprintf (stderr, "'%c': ", Arrows[i].name); 2345 fprintf (stderr, "'%c': ", Arrows[i].name);
2374 2346
2375 if (CurrentBar == NULL 2347 if (CurrentBar == NULL

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines