Once again, about unset parameter in circular progress bar.

2013-02-21 Thread Vladimir Testov
1)
I've send message to grub-devel some time ago, but received no answer.
I've opened update-request on bugzilla
https://savannah.gnu.org/bugs/index.php?38363

2)
Also I want to discuss some thoughts about the boot menu list. I've written a 
message about than (one long message) but it also wasn't answered.

The last is about gfxmenu/gui_list.c
I see two ways of the modifications I did mention - either make item_height a 
overall item's height (with boxing) or make some corrections to selected 
item's height (now it's item_height-1 ), function get_num_shown_items (now 
it's incorrect, see previous message) and overall menu boxing (now it's drawn 
inside selected rectangle, but not outside - so we don't have "boxing" effect)

I would gladly make patches for either way.

3)
Am I beeing ignored? Or did I say something wrong? I'm just wish to help.

Waiting for feedback.

-- 
With best regards,
___
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: at boot-time echoed kernel is older that started kernel

2013-02-21 Thread Prarit Bhargava
On 02/19/2013 03:31 PM, poma wrote:
> On 02/18/13 21:39, Reindl Harald wrote:
> […]
> 
>> i would be thankful if even "grub2-mkconfig" would not create
>> this "advanced" submenu at all
>>
> 
> 
> Actually there is a patch proposal at 'grub-devel' by Prarit Bhargava,
> for such a case - disable submenu[1][2].

Reindl and poma,

FYI the latest fedora (it might be in rawhide by now) built grub2 has
GRUB_DISABLE_SUBMENU functionality.  It would be good to get testing on this...

http://koji.fedoraproject.org/koji/buildinfo?buildID=386531

* Thu Feb 14 2013 Peter Jones  - 2.00-16
- Allow the user to disable submenu generation

You can simply add 'GRUB_DISABLE_SUBMENU="true"' to /etc/default/grub and it
magically works :)

P.

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] fix last column in BIOS console

2013-02-21 Thread Andrey Borzenkov
BIOS console wrapped line at 79 characters. It became the issue
after recent changes when extra column for scrolling indications was
removed. The effect was that up/down arrows were printed in the first
column of the next line.

May be it would be easier to simply use INT10 AH=13. Available
documentation indicates that it is available since 1986, so I guess
any system that exists today should implement it.

Signed-off-by: Andrey Borzenkov 

---
 grub-core/term/i386/pc/console.c |   21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/grub-core/term/i386/pc/console.c b/grub-core/term/i386/pc/console.c
index 2aa1943..358611a 100644
--- a/grub-core/term/i386/pc/console.c
+++ b/grub-core/term/i386/pc/console.c
@@ -86,13 +86,9 @@ grub_console_gotoxy (struct grub_term_output *term 
__attribute__ ((unused)),
  * Put the character C on the console. Because GRUB wants to write a
  * character with an attribute, this implementation is a bit tricky.
  * If C is a control character (CR, LF, BEL, BS), use INT 10, AH = 0Eh
- * (TELETYPE OUTPUT). Otherwise, save the original position, put a space,
- * save the current position, restore the original position, write the
- * character and the attribute, and restore the current position.
- *
- * The reason why this is so complicated is that there is no easy way to
- * get the height of the screen, and the TELETYPE OUTPUT BIOS call doesn't
- * support setting a background attribute.
+ * (TELETYPE OUTPUT). Otherwise, use INT 10, AH = 9 to write character
+ * with attributes and advance cursor. If we are on the last column,
+ * let BIOS to wrap line correctly.
  */
 static void
 grub_console_putchar_real (grub_uint8_t c)
@@ -112,19 +108,18 @@ grub_console_putchar_real (grub_uint8_t c)
   /* get the current position */
   pos = grub_console_getxy (NULL);
   
+  /* write the character with the attribute */
+  int10_9 (c, 1);
+
   /* check the column with the width */
   if ((pos & 0xff00) >= (79 << 8))
 {
   grub_console_putchar_real (0x0d);
   grub_console_putchar_real (0x0a);
-  /* get the current position */
-  pos = grub_console_getxy (NULL);
 }
+  else
+grub_console_gotoxy (NULL, ((pos & 0xff00) >> 8) + 1, (pos & 0xff));
 
-  /* write the character with the attribute */
-  int10_9 (c, 1);
-
-  grub_console_gotoxy (NULL, ((pos & 0xff00) >> 8) + 1, (pos & 0xff));
 }
 
 static void
-- 
tg: (cc35b49..) u/console-last-column (depends on: master)

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] fix menu size calculation in presence of selected item pixmap

2013-02-21 Thread Andrey Borzenkov
draw_menu() acconted for upper border of selected item pixmap, but not
for lower. So it could happen that lower border was visually cut off.

Also various calculations of menu vertical size did not account for
space for lower border

Signed-off-by: Andrey Borzenkov 

---
 grub-core/gfxmenu/gui_list.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c
index 1982d9a..5c83383 100644
--- a/grub-core/gfxmenu/gui_list.c
+++ b/grub-core/gfxmenu/gui_list.c
@@ -97,8 +97,14 @@ get_num_shown_items (list_impl_t self)
   grub_gfxmenu_box_t box = self->menu_box;
   int box_top_pad = box->get_top_pad (box);
   int box_bottom_pad = box->get_bottom_pad (box);
+
+  grub_gfxmenu_box_t selbox = self->selected_item_box;
+  int sel_top_pad = selbox->get_top_pad (selbox);
+  int sel_bottom_pad = selbox->get_bottom_pad (selbox);
+  
   
   return (self->bounds.height + item_vspace - 2 * boxpad
+ - sel_top_pad - sel_bottom_pad
  - box_top_pad - box_bottom_pad) / (item_height + item_vspace);
 }
 
@@ -392,7 +398,8 @@ list_get_minimal_size (void *vself, unsigned *width, 
unsigned *height)
   unsigned width_s;
 
   grub_gfxmenu_box_t selbox = self->selected_item_box;
-  int sel_toppad = selbox->get_top_pad (selbox);
+  int sel_top_pad = selbox->get_top_pad (selbox);
+  int sel_bottom_pad = selbox->get_bottom_pad (selbox);
   
   *width = grub_font_get_string_width (self->item_font, "Typical OS");
   width_s = grub_font_get_string_width (self->selected_item_font,
@@ -406,7 +413,7 @@ list_get_minimal_size (void *vself, unsigned *width, 
unsigned *height)
   *height = (item_height * num_items
  + item_vspace * (num_items - 1)
  + 2 * boxpad
- + box_top_pad + box_bottom_pad + sel_toppad);
+ + box_top_pad + box_bottom_pad + sel_top_pad + 
sel_bottom_pad);
 }
   else
 {
-- 
tg: (cc35b49..) e/menu-selected-pad (depends on: master)

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: fixed item-height, item-spacing, max-elements-shown etc

2013-02-21 Thread Andrey Borzenkov
Sorry for delay.

В Thu, 07 Feb 2013 14:07:08 +0400
Vladimir Testov  пишет:

> >I am not sure whether it is appropriate fix. After your patch "box
> >effect" on selected item is effectively lost (it makes
> >selected_item_box the same height as selected item itself).
> About "box effect" - there is no "box effect" in menu_box. The menu's box is 
> drawn inside given area. So the idea of "box effect" was unclear to me. 
> (Also, 
> the height of selected element (with box) is item_height + box_pad_top + 
> box_pad_bottom - 1... that "-1" makes the "box effect" totally unclear. My 
> idea 
> was to make GRUB theme be countable to pixel.

But it is. You know exactly which size you need. But in practice most
themes would probably use dynamic sizing by specifying screen
size percentage. I am not sure if grub2 currently dynamically adjusts
size to ensure whole number of items fit into it.  
 
>  Also, with my patch (when we can 
> have a box for every unselected element) item_spacing loses it's meaning 
> totally. It has uncertain meaning in current GRUB state too.
> 

It is pretty much certain meaning. Of course I agree that having more
detailed "style guide" for writing grub theme would definitely help.

As I understand current code, it lays out quite predictably

outer image top border
selected item box top border
item 1
inter-item space
item 2
iter-item space
...
item n
selected item box lower border
outer image lower border

selected item box itself is overlayed (or, rather, underlayed). It does
not change layout. So you, as theme author, has to ensure suitable
space to draw selected item box so that it fits without changing
existing layout.

Your patch changes text layout for selected item (by reducing available
space). As text is vertically aligned, this results in "jumping effect"
or part of text may be cut off.

In your example setting menu size to 118 provides for full 4 items +
selected item box.

> I thought that idea of menu's box was more valuable because it has influence 
> to 
> the code.
> 
> So, when we need to calculate exact values so the result will request our 
> expectations, the idea of item_height as total height is more acceptable.
> 

selected item box is not really used to layout items. Only to adjust
where the first item is placed, to allow for full top border to be
displayed. Patch I just sent also adds space for lower border.

Anyway, this is just my 2c. Hopefully somebody with commit rights
or one of original theme authors can chime in :)

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Console Resolution with GRUB2

2013-02-21 Thread D.J.J. Ring, Jr.
Hello Peter and the rest of the group.

I appreciate Peter's efforts to help.

However, nothing so far works as needed.

With the old grub users who needed larger size characters simply added a
vga= line to the boot code.  It was simple.

Now it seems to be very complex.

In fact all the answers I can find on the various newsgroups no longer
work.  Also there is no one answer, but many answers, and then there are
comments like "this no longer works".
font
Would someone make it so that users can make large fonts in the console?
There are those of us who are nearly blind but still like to see the
characters on the screen.  We are comfortable using 640 x 480 configuration.

Completely blind people of course have no need to change the font size.  I
understand and have changed the font size in the grub menu, but unless I
can keep that resolution in the console, it is not what I want and need.

If I could keep that character size in console while running the screen at
high resolution it would be perfect.

However, the problem still remains:  It is very difficult to do for a new
user who wishes to use a console only system as many blind users wish to.

I am disappointed that I cannot find an answer to this question, if there
is a better place to ask, I would be most happy to know of it, and I will
ask there.

Thank you for your work.

David
One of the www.vinuxproject.org team
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Console Resolution with GRUB2

2013-02-21 Thread Bruce Dubbs

D.J.J. Ring, Jr. wrote:

Hello Peter and the rest of the group.

I appreciate Peter's efforts to help.

However, nothing so far works as needed.

With the old grub users who needed larger size characters simply added a
vga= line to the boot code.  It was simple.

Now it seems to be very complex.

In fact all the answers I can find on the various newsgroups no longer
work.  Also there is no one answer, but many answers, and then there are
comments like "this no longer works".
font
Would someone make it so that users can make large fonts in the console?
There are those of us who are nearly blind but still like to see the
characters on the screen.  We are comfortable using 640 x 480 configuration.

Completely blind people of course have no need to change the font size.  I
understand and have changed the font size in the grub menu, but unless I
can keep that resolution in the console, it is not what I want and need.

If I could keep that character size in console while running the screen at
high resolution it would be perfect.

However, the problem still remains:  It is very difficult to do for a new
user who wishes to use a console only system as many blind users wish to.

I am disappointed that I cannot find an answer to this question, if there
is a better place to ask, I would be most happy to know of it, and I will
ask there.


I don't know what others may say, but I just use a custom grub.cfg file. 
 Avoid the scripts in /etc/grub.d.  After all the only thing really 
needed in grub.cfg is:


### grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,1)

menuentry "entry1" {}
menuentry "entry2" {}

etc.  Adjust values to need.

Using this simple configuration, grub never changes the screen 
resolution.  Any other changes are OS specific.


  -- Bruce

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel