]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Remove unjustified hard dependency of normal.mod on gfxterm.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 21 May 2012 20:17:11 +0000 (22:17 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 21 May 2012 20:17:11 +0000 (22:17 +0200)
* include/grub/term.h (grub_term_output): New member fullscreen.
* include/grub/gfxterm.h (grub_gfxterm_fullscreen): Removed.
* grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Make static.
(grub_gfxterm): Set .fullscreen.
* grub-core/normal/menu.c (menu_init): Use fullscreen.
* grub-core/gfxmenu/gfxmenu.c (GRUB_MOD_INIT): Likewise.

ChangeLog
grub-core/gfxmenu/gfxmenu.c
grub-core/normal/menu.c
grub-core/term/gfxterm.c
include/grub/gfxterm.h
include/grub/term.h

index eb4d6b5270b01f7b2470c4437d60b6306e0c51e8..bfd84017d75dee818fa38b06e0b125bec83b1741 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,19 @@
+2012-05-21  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Remove unjustified hard dependency of normal.mod on gfxterm.
+
+       * include/grub/term.h (grub_term_output): New member fullscreen.
+       * include/grub/gfxterm.h (grub_gfxterm_fullscreen): Removed.
+       * grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Make static.
+       (grub_gfxterm): Set .fullscreen.
+       * grub-core/normal/menu.c (menu_init): Use fullscreen.
+       * grub-core/gfxmenu/gfxmenu.c (GRUB_MOD_INIT): Likewise.
+
 2012-05-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * docs/grub.texi (Internationalisation/Filesystems): Add precisions
        mentioning possible problems with non-ASCII (non-compliant) ISOs.
-       MEntion case-insensitive AFFS, SFS and JFS.
+       Mention case-insensitive AFFS, SFS and JFS.
 
 2012-05-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
index 3bd7951381148908efeb413258c06fb91c2cd729..09e86213ff854e447754a7898da4daa0aa4a8333 100644 (file)
@@ -121,9 +121,9 @@ GRUB_MOD_INIT (gfxmenu)
   struct grub_term_output *term;
 
   FOR_ACTIVE_TERM_OUTPUTS(term)
-    if (grub_gfxmenu_try_hook && grub_strcmp (term->name, "gfxterm") == 0)
+    if (grub_gfxmenu_try_hook && term->fullscreen)
       {
-       grub_gfxterm_fullscreen ();
+       term->fullscreen ();
        break;
       }
 
index a0ab2297d304066b00aca1a5fc0c1671187726f5..7e0a15859073cb0a703bb9a5e795b6cfef09c282 100644 (file)
@@ -349,7 +349,7 @@ menu_init (int entry, grub_menu_t menu, int nested)
   int gfxmenu = 0;
 
   FOR_ACTIVE_TERM_OUTPUTS(term)
-    if (grub_strcmp (term->name, "gfxterm") == 0)
+    if (term->fullscreen)
       {
        if (grub_env_get ("theme"))
          {
@@ -376,7 +376,7 @@ menu_init (int entry, grub_menu_t menu, int nested)
            grub_wait_after_message ();
          }
        grub_errno = GRUB_ERR_NONE;
-       grub_gfxterm_fullscreen ();
+       term->fullscreen ();
        break;
       }
 
index 1407109f23214ccdd8298e8eb4dbf831d2f5cc23..c995b845f9254368cd24c2fe19edc0c893bc74c5 100644 (file)
@@ -313,7 +313,7 @@ grub_gfxterm_set_window (struct grub_video_render_target *target,
   return grub_errno;
 }
 
-grub_err_t
+static grub_err_t
 grub_gfxterm_fullscreen (void)
 {
   const char *font_name;
@@ -1242,6 +1242,7 @@ static struct grub_term_output grub_video_term =
     .setcolorstate = grub_virtual_screen_setcolorstate,
     .setcursor = grub_gfxterm_setcursor,
     .refresh = grub_gfxterm_refresh,
+    .fullscreen = grub_gfxterm_fullscreen,
     .flags = GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS,
     .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
     .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
index 295354bafb71117a097794286986c77f5cd71d16..3fc8d92d9c124c12ab9798e4225a5dbf99f55166 100644 (file)
@@ -37,8 +37,6 @@ void grub_gfxterm_set_repaint_callback (grub_gfxterm_repaint_callback_t func);
 
 void EXPORT_FUNC (grub_gfxterm_schedule_repaint) (void);
 
-grub_err_t EXPORT_FUNC (grub_gfxterm_fullscreen) (void);
-
 extern void (*EXPORT_VAR (grub_gfxterm_decorator_hook)) (void);
 
 #endif /* ! GRUB_GFXTERM_HEADER */
index e28279015cdff9329e133723170491e7fa37c2f0..bf4dcb4633b6b0393265ab77727d26bdf4458f04 100644 (file)
@@ -215,6 +215,9 @@ struct grub_term_output
   /* Update the screen.  */
   void (*refresh) (struct grub_term_output *term);
 
+  /* gfxterm only: put in fullscreen mode.  */
+  grub_err_t (*fullscreen) (void);
+
   /* The feature flags defined above.  */
   grub_uint32_t flags;