]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* term/gfxterm.c (grub_gfxterm_background_image_cmd): Fix
authorColin Watson <cjwatson@ubuntu.com>
Wed, 7 Jul 2010 13:12:16 +0000 (14:12 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Wed, 7 Jul 2010 13:12:16 +0000 (14:12 +0100)
indentation.

ChangeLog
term/gfxterm.c

index 91f48f0d1adbc618ebd48b0e0bab46c5d215a09b..e4b5143d40bbe202e2ef923ffa7acae1bee7cfc2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-07  Colin Watson  <cjwatson@ubuntu.com>
+
+       * term/gfxterm.c (grub_gfxterm_background_image_cmd): Fix
+       indentation.
+
 2010-07-06  Colin Watson  <cjwatson@ubuntu.com>
 
        * conf/common.rmk (grub_probe_SOURCES): Add disk/raid5_recover.c
index 44f6b191a2d2c652e04273e2cce01a14b73340ba..bf9705abd880aa1f0ea218c83ed851711e50f4a9 100644 (file)
@@ -1134,44 +1134,44 @@ grub_gfxterm_background_image_cmd (grub_extcmd_t cmd __attribute__ ((unused)),
   /* If filename was provided, try to load that.  */
   if (argc >= 1)
     {
-    /* Try to load new one.  */
-    grub_video_bitmap_load (&bitmap, args[0]);
-    if (grub_errno != GRUB_ERR_NONE)
-      return grub_errno;
-
-    /* Determine if the bitmap should be scaled to fit the screen.  */
-    if (!state[BACKGROUND_CMD_ARGINDEX_MODE].set
-        || grub_strcmp (state[BACKGROUND_CMD_ARGINDEX_MODE].arg,
-                        "stretch") == 0)
+      /* Try to load new one.  */
+      grub_video_bitmap_load (&bitmap, args[0]);
+      if (grub_errno != GRUB_ERR_NONE)
+        return grub_errno;
+
+      /* Determine if the bitmap should be scaled to fit the screen.  */
+      if (!state[BACKGROUND_CMD_ARGINDEX_MODE].set
+          || grub_strcmp (state[BACKGROUND_CMD_ARGINDEX_MODE].arg,
+                          "stretch") == 0)
+          {
+            if (window.width != grub_video_bitmap_get_width (bitmap)
+                || window.height != grub_video_bitmap_get_height (bitmap))
+              {
+                struct grub_video_bitmap *scaled_bitmap;
+                grub_video_bitmap_create_scaled (&scaled_bitmap,
+                                                 window.width, 
+                                                 window.height,
+                                                 bitmap,
+                                                 GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
+                if (grub_errno == GRUB_ERR_NONE)
+                  {
+                    /* Replace the original bitmap with the scaled one.  */
+                    grub_video_bitmap_destroy (bitmap);
+                    bitmap = scaled_bitmap;
+                  }
+              }
+          }
+
+      /* If bitmap was loaded correctly, display it.  */
+      if (bitmap)
         {
-          if (window.width != grub_video_bitmap_get_width (bitmap)
-              || window.height != grub_video_bitmap_get_height (bitmap))
-            {
-              struct grub_video_bitmap *scaled_bitmap;
-              grub_video_bitmap_create_scaled (&scaled_bitmap,
-                                               window.width, 
-                                               window.height,
-                                               bitmap,
-                                               GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
-              if (grub_errno == GRUB_ERR_NONE)
-                {
-                  /* Replace the original bitmap with the scaled one.  */
-                  grub_video_bitmap_destroy (bitmap);
-                  bitmap = scaled_bitmap;
-                }
-            }
-        }
-
-    /* If bitmap was loaded correctly, display it.  */
-    if (bitmap)
-      {
-        /* Determine bitmap dimensions.  */
-        bitmap_width = grub_video_bitmap_get_width (bitmap);
-        bitmap_height = grub_video_bitmap_get_height (bitmap);
+          /* Determine bitmap dimensions.  */
+          bitmap_width = grub_video_bitmap_get_width (bitmap);
+          bitmap_height = grub_video_bitmap_get_height (bitmap);
 
-        /* Mark whole screen as dirty.  */
-        dirty_region_add (0, 0, window.width, window.height);
-      }
+          /* Mark whole screen as dirty.  */
+          dirty_region_add (0, 0, window.width, window.height);
+        }
     }
 
   /* All was ok.  */