]>
Commit | Line | Data |
---|---|---|
80276dbf | 1 | --- blackbox-0.65.0/src/Screen.cc.orig Fri Nov 1 18:00:26 2002 |
2 | +++ blackbox-0.65.0/src/Screen.cc Fri Nov 1 18:14:37 2002 | |
3 | @@ -1159,7 +1159,13 @@ | |
4 | bool defaultMenu = True; | |
4d92b146 | 5 | |
6 | if (blackbox->getMenuFilename()) { | |
7 | - FILE *menu_file = fopen(blackbox->getMenuFilename(), "r"); | |
8 | + int pipe_menu = 0; | |
80276dbf | 9 | + FILE *menu_file; |
10 | + if (*(blackbox->getMenuFilename()) == '|') { | |
11 | + pipe_menu = 1; | |
12 | + menu_file = popen((blackbox->getMenuFilename()) + 1, "r"); | |
13 | + } | |
4d92b146 | 14 | + else menu_file = fopen(blackbox->getMenuFilename(), "r"); |
15 | ||
16 | if (!menu_file) { | |
17 | perror(blackbox->getMenuFilename()); | |
80276dbf | 18 | @@ -1207,7 +1213,8 @@ |
19 | } | |
20 | } | |
4d92b146 | 21 | } |
22 | - fclose(menu_file); | |
80276dbf | 23 | + if (pipe_menu) pclose(menu_file); |
4d92b146 | 24 | + else fclose(menu_file); |
25 | } | |
26 | } | |
27 |