* How can I contribute the patch to the upstream?
@ 2012-11-29 14:07 Vladimir Testov
2012-11-29 15:27 ` Andrey Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Testov @ 2012-11-29 14:07 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
Hello!
I've made the patch for ./grub-core/gfxmenu/gui_list.c and would like to
contribute it to the upstream.
This patch makes possible to make gui_box for non-active menu items.
(item_box in theme.txt, just like selected_item_box)
See included file for example of usage.
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: upstream_gnu_grub2.png --]
[-- Type: image/png, Size: 25776 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How can I contribute the patch to the upstream?
2012-11-29 14:07 Vladimir Testov
@ 2012-11-29 15:27 ` Andrey Borzenkov
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Borzenkov @ 2012-11-29 15:27 UTC (permalink / raw)
To: The development of GNU GRUB
В Thu, 29 Nov 2012 18:07:55 +0400
Vladimir Testov <vladimir.testov@rosalab.ru> пишет:
> Hello!
>
> I've made the patch for ./grub-core/gfxmenu/gui_list.c and would like to
> contribute it to the upstream.
>
> This patch makes possible to make gui_box for non-active menu items.
> (item_box in theme.txt, just like selected_item_box)
>
> See included file for example of usage.
>
You could just send this patch to the list :) And/or open enhancement
request on GRUB2 bugzilla.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How can I contribute the patch to the upstream?
@ 2012-11-29 15:41 Vladimir Testov
2012-12-01 19:59 ` Gerard Butler
2013-01-20 21:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Testov @ 2012-11-29 15:41 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
You're welcome to add this patch to the upstream.
=(^_^)=
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: grub2-theme-not_selected_item_box.patch --]
[-- Type: text/x-patch, Size: 3813 bytes --]
diff -Naur grub-2.00/grub-core/gfxmenu/gui_list.c grub-new/grub-core/gfxmenu/gui_list.c
--- grub-2.00/grub-core/gfxmenu/gui_list.c 2011-12-14 14:36:07.000000000 +0400
+++ grub-new/grub-core/gfxmenu/gui_list.c 2012-11-29 16:00:36.642209919 +0400
@@ -58,8 +58,10 @@
int need_to_recreate_boxes;
char *theme_dir;
char *menu_box_pattern;
+ char *item_box_pattern;
char *selected_item_box_pattern;
grub_gfxmenu_box_t menu_box;
+ grub_gfxmenu_box_t item_box;
grub_gfxmenu_box_t selected_item_box;
grub_gfxmenu_icon_manager_t icon_manager;
@@ -76,11 +78,14 @@
grub_free (self->theme_dir);
grub_free (self->menu_box_pattern);
+ grub_free (self->item_box_pattern);
grub_free (self->selected_item_box_pattern);
if (self->menu_box)
self->menu_box->destroy (self->menu_box);
if (self->selected_item_box)
self->selected_item_box->destroy (self->selected_item_box);
+ if (self->item_box)
+ self->item_box->destroy (self->item_box);
if (self->icon_manager)
grub_gfxmenu_icon_manager_destroy (self->icon_manager);
@@ -115,10 +120,14 @@
self->selected_item_box_pattern,
self->theme_dir);
+ grub_gui_recreate_box (&self->item_box,
+ self->item_box_pattern,
+ self->theme_dir);
+
self->need_to_recreate_boxes = 0;
}
- return (self->menu_box != 0 && self->selected_item_box != 0);
+ return (self->menu_box != 0 && self->selected_item_box != 0 && self->item_box != 0);
}
static int
@@ -212,7 +221,7 @@
static void
draw_menu (list_impl_t self, int num_shown_items)
{
- if (! self->menu_box || ! self->selected_item_box)
+ if (! self->menu_box || ! self->selected_item_box || !self->item_box)
return;
int boxpad = self->item_padding;
@@ -225,6 +234,7 @@
make_selected_item_visible (self);
+ grub_gfxmenu_box_t itbox = self->item_box;
grub_gfxmenu_box_t selbox = self->selected_item_box;
int sel_leftpad = selbox->get_left_pad (selbox);
int sel_toppad = selbox->get_top_pad (selbox);
@@ -256,7 +266,15 @@
selbox->draw (selbox, 0,
item_top - sel_toppad);
}
-
+ else
+ {
+ int cwidth = oviewport.width - 2 * boxpad - 2;
+ if (itbox->get_border_width)
+ cwidth -= itbox->get_border_width (itbox);
+ itbox->set_content_size (itbox, cwidth, item_height - 1);
+ itbox->draw (itbox, 0,
+ item_top - sel_toppad);
+ }
icon = get_item_icon (self, menu_index);
if (icon != 0)
grub_video_blit_bitmap (icon, GRUB_VIDEO_BLIT_BLEND,
@@ -302,7 +320,7 @@
check_boxes (self);
- if (! self->menu_box || ! self->selected_item_box)
+ if (! self->menu_box || ! self->selected_item_box || ! self->item_box)
return;
grub_gui_set_viewport (&self->bounds, &vpsave);
@@ -487,6 +505,12 @@
grub_free (self->menu_box_pattern);
self->menu_box_pattern = value ? grub_strdup (value) : 0;
}
+ else if (grub_strcmp (name, "item_pixmap_style") == 0)
+ {
+ self->need_to_recreate_boxes = 1;
+ grub_free (self->item_box_pattern);
+ self->item_box_pattern = value ? grub_strdup (value) : 0;
+ }
else if (grub_strcmp (name, "selected_item_pixmap_style") == 0)
{
self->need_to_recreate_boxes = 1;
@@ -604,8 +628,10 @@
self->need_to_recreate_boxes = 0;
self->theme_dir = 0;
self->menu_box_pattern = 0;
+ self->item_box_pattern = 0;
self->selected_item_box_pattern = 0;
self->menu_box = grub_gfxmenu_create_box (0, 0);
+ self->item_box = grub_gfxmenu_create_box (0, 0);
self->selected_item_box = grub_gfxmenu_create_box (0, 0);
self->icon_manager = grub_gfxmenu_icon_manager_new ();
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: How can I contribute the patch to the upstream?
2012-11-29 15:41 How can I contribute the patch to the upstream? Vladimir Testov
@ 2012-12-01 19:59 ` Gerard Butler
2013-01-20 21:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 5+ messages in thread
From: Gerard Butler @ 2012-12-01 19:59 UTC (permalink / raw)
To: grub-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
Oh wow this is pretty neato. This opens up some new ideas for grub themes.
From: vladimir.testov@rosalab.ru
To: grub-devel@gnu.org
Subject: Re: How can I contribute the patch to the upstream?
Date: Thu, 29 Nov 2012 19:41:26 +0400
You're welcome to add this patch to the upstream.
=(^_^)=
--
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
[-- Attachment #2: Type: text/html, Size: 880 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How can I contribute the patch to the upstream?
2012-11-29 15:41 How can I contribute the patch to the upstream? Vladimir Testov
2012-12-01 19:59 ` Gerard Butler
@ 2013-01-20 21:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 5+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-01-20 21:48 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On 29.11.2012 16:41, Vladimir Testov wrote:
> You're welcome to add this patch to the upstream.
>
Can you elaborate what this patch is for?
> =(^_^)=
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-20 21:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 15:41 How can I contribute the patch to the upstream? Vladimir Testov
2012-12-01 19:59 ` Gerard Butler
2013-01-20 21:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2012-11-29 14:07 Vladimir Testov
2012-11-29 15:27 ` Andrey Borzenkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.