Dash:
[t2.git] / package / boot / grub / no-menu-border.patch
blobe27fc85694251e889d4a914d750b5fc28667587d
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../grub/no-menu-border.patch
5 # Copyright (C) 2004 - 2008 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 Well, this menu border is ugly and so much 1980 DOS style, ...
18 Simply get rid of it.
20 - Rene Rene <rene@exactcode.de>
22 --- grub-0.97/stage2/stage2.c.vanilla 2005-03-19 18:51:57.000000000 +0100
23 +++ grub-0.97/stage2/stage2.c 2010-06-25 13:32:32.000000000 +0200
24 @@ -134,10 +134,13 @@
25 else
26 grub_putchar (*entry++);
28 - else
29 + else {
30 grub_putchar (' ');
31 + if (current_term->setcolorstate)
32 + current_term->setcolorstate (COLOR_STATE_NORMAL);
33 + }
35 - gotoxy (74, y);
36 + gotoxy (2, y);
38 if (current_term->setcolorstate)
39 current_term->setcolorstate (COLOR_STATE_STANDARD);
40 @@ -176,7 +179,7 @@
41 else
42 grub_putchar (' ');
44 - gotoxy (74, y + entryno + 1);
45 + gotoxy (2, y + entryno + 1);
48 static void
49 @@ -413,13 +416,12 @@
50 if (current_term->flags & TERM_DUMB)
51 print_entries_raw (num_entries, first_entry, menu_entries);
52 else
53 - print_border (3, 12);
54 + /*print_border (3, 12);*/
55 + gotoxy (74, 3 + 12);
57 -#if 0
58 - grub_printf ("\n\
59 + grub_printf ("\n\n\
60 Use the %c and %c keys to select which entry is highlighted.\n",
61 DISP_UP, DISP_DOWN);
62 -#endif
64 if (! auth && password)
66 @@ -433,7 +435,7 @@
68 if (!toggle_print_status(3, 18))
70 - printf ("\n\n\
71 + printf ("\n\
72 Press enter or %c to boot the selected OS, \'e\' to edit the\n\
73 commands before booting, \'r\' to reload, \'c\' for a command-line,\n\
74 \'/?nN\' to search or %c to go back if possible.",
75 @@ -478,10 +480,10 @@
76 entryno, grub_timeout);
77 else
79 - gotoxy (3, 22);
80 + gotoxy (4, 2);
81 grub_printf ("The highlighted entry will be booted automatically in %d seconds. ",
82 grub_timeout);
83 - gotoxy (74, 4 + entryno);
84 + gotoxy (2, 4 + entryno);
87 grub_timeout--;
88 @@ -504,9 +506,8 @@
89 /* current entry */
90 gotoxy(69, 3);
91 grub_printf("[%d]", first_entry + entryno);
92 - grub_putchar(DISP_HORIZ);
93 - grub_putchar(DISP_HORIZ);
95 + grub_putchar(' ');
96 + grub_putchar(' ');
98 /* print shortcut buffer */
99 gotoxy(5, 3);
100 @@ -514,21 +515,23 @@
102 x = search_direction ? '?' : '/';
103 grub_printf("%c%s%c%c%c%c",
104 - x, search_buf, x, DISP_HORIZ,
105 - search_found >= 0 ? DISP_HORIZ : 'X', DISP_HORIZ);
106 + x, search_buf, x, ' ',
107 + search_found >= 0 ? ' ': 'X', ' ');
109 else if (shortcut_buf[0])
110 grub_printf("<%s..>", shortcut_buf);
111 else
112 for (x = 0; x < 24; x++)
113 - grub_putchar(DISP_HORIZ);
114 + grub_putchar(' ');
116 +#if 0
117 gotoxy(52, 16);
118 l = grub_strlen(search_buf);
119 for (i = SEARCH_BUF_SIZE + 2 -
120 ((search_found >= 0 && (l || search_mode)) ? l + 2 : 0);
121 i; i--)
122 grub_putchar(DISP_HORIZ);
123 +#endif
124 if (search_found >= 0 && (l || search_mode))
126 x = search_direction ? '?' : '/';
127 @@ -541,7 +544,7 @@
128 if (current_term->setcolorstate)
129 current_term->setcolorstate (COLOR_STATE_STANDARD);
131 - gotoxy(74, 4 + entryno);
132 + gotoxy(2, 4 + entryno);
136 @@ -565,7 +568,7 @@
137 if (current_term->flags & TERM_DUMB)
138 grub_putchar ('\r');
139 else
140 - gotoxy (3, 22);
141 + gotoxy (4, 2);
142 printf (" ");
143 grub_timeout = -1;
144 fallback_entryno = -1;