Use text window for display_file
The text window is assumed to use a monospaced font.
This commit is contained in:
committed by
Pasi Kallinen
parent
84bf23640c
commit
cadde6d317
+3
-11
@@ -2170,11 +2170,8 @@ X11_display_file(const char *str, boolean complain)
|
|||||||
dlb *fp;
|
dlb *fp;
|
||||||
winid newwin;
|
winid newwin;
|
||||||
struct xwindow *wp;
|
struct xwindow *wp;
|
||||||
anything any;
|
|
||||||
menu_item *menu_list;
|
|
||||||
#define LLEN 128
|
#define LLEN 128
|
||||||
char line[LLEN];
|
char line[LLEN];
|
||||||
int clr = 0;
|
|
||||||
|
|
||||||
/* Use the port-independent file opener to see if the file exists. */
|
/* Use the port-independent file opener to see if the file exists. */
|
||||||
fp = dlb_fopen(str, RDTMODE);
|
fp = dlb_fopen(str, RDTMODE);
|
||||||
@@ -2184,14 +2181,11 @@ X11_display_file(const char *str, boolean complain)
|
|||||||
return; /* it doesn't exist, ignore */
|
return; /* it doesn't exist, ignore */
|
||||||
}
|
}
|
||||||
|
|
||||||
newwin = X11_create_nhwindow(NHW_MENU);
|
newwin = X11_create_nhwindow(NHW_TEXT);
|
||||||
wp = &window_list[newwin];
|
wp = &window_list[newwin];
|
||||||
X11_start_menu(newwin, MENU_BEHAVE_STANDARD);
|
|
||||||
|
|
||||||
any = cg.zeroany;
|
|
||||||
while (dlb_fgets(line, LLEN, fp)) {
|
while (dlb_fgets(line, LLEN, fp)) {
|
||||||
X11_add_menu(newwin, &nul_glyphinfo, &any, 0, 0, ATR_NONE,
|
X11_putstr(newwin, 0, line);
|
||||||
clr, line, MENU_ITEMFLAGS_NONE);
|
|
||||||
}
|
}
|
||||||
(void) dlb_fclose(fp);
|
(void) dlb_fclose(fp);
|
||||||
|
|
||||||
@@ -2199,9 +2193,7 @@ X11_display_file(const char *str, boolean complain)
|
|||||||
if (str)
|
if (str)
|
||||||
wp->title = dupstr(str);
|
wp->title = dupstr(str);
|
||||||
|
|
||||||
wp->menu_information->permi = FALSE;
|
(void) X11_display_nhwindow(newwin, TRUE);
|
||||||
wp->menu_information->disable_mcolors = TRUE;
|
|
||||||
(void) X11_select_menu(newwin, PICK_NONE, &menu_list);
|
|
||||||
X11_destroy_nhwindow(newwin);
|
X11_destroy_nhwindow(newwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user