Send plymouth mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.freedesktop.org/mailman/listinfo/plymouth
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of plymouth digest..."


Today's Topics:

   1. [PATCH 3/4] build: fix typo in configure.ac (Jan Engelhardt)
   2. [PATCH 2/4] ply-terminal: remove pointless casts (Jan Engelhardt)
   3. [PATCH 4/4] ply-text-progress-bar: strip quotes if present
      (Jan Engelhardt)
   4. Additions for text splash (Jan Engelhardt)
   5. [PATCH 1/4] ply-text-display: support bright colors
      (Jan Engelhardt)


----------------------------------------------------------------------

Message: 1
Date: Sun, 29 Jul 2012 20:32:54 +0200
From: Jan Engelhardt <[email protected]>
To: [email protected]
Subject: [PATCH 3/4] build: fix typo in configure.ac
Message-ID: <[email protected]>

---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2444a27..6b8c2de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,7 +309,7 @@ AC_SUBST(background_start_color)
 AC_ARG_WITH(background-end-color-stop, 
AS_HELP_STRING([--with-background-end-color-stop],[first color end in 
background gradients used by boot splash 
plugins]),background_end_color=${withval},background_end_color=0x3a362f)
 AC_SUBST(background_end_color)
 
-AC_ARG_WITH(release-file, 
AS_HELP_STRING([--with-release-file=<path_to_release_file>],[Release File to 
use to detect distribution (by default 
/etc/system-reelase)]),RELEASE_FILE=${withval},RELEASE_FILE=/etc/system-release)
+AC_ARG_WITH(release-file, 
AS_HELP_STRING([--with-release-file=<path_to_release_file>],[Release File to 
use to detect distribution (by default 
/etc/system-relase)]),RELEASE_FILE=${withval},RELEASE_FILE=/etc/system-release)
 
 AC_SUBST(RELEASE_FILE)
 AC_DEFINE_UNQUOTED(RELEASE_FILE, "$RELEASE_FILE", [Release file path])
-- 
1.7.7



------------------------------

Message: 2
Date: Sun, 29 Jul 2012 20:32:53 +0200
From: Jan Engelhardt <[email protected]>
To: [email protected]
Subject: [PATCH 2/4] ply-terminal: remove pointless casts
Message-ID: <[email protected]>

The target variables are already of the desired type.
---
 src/libply-splash-core/ply-terminal.c |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/libply-splash-core/ply-terminal.c 
b/src/libply-splash-core/ply-terminal.c
index 8876aa0..2e95dc8 100644
--- a/src/libply-splash-core/ply-terminal.c
+++ b/src/libply-splash-core/ply-terminal.c
@@ -728,18 +728,15 @@ ply_terminal_get_color_hex_value (ply_terminal_t       
*terminal,
                                   ply_terminal_color_t  color)
 {
   uint8_t red, green, blue;
-  uint32_t hex_value;
 
   assert (terminal != NULL);
   assert (color <= PLY_TERMINAL_COLOR_WHITE);
 
-  red = (uint8_t) *(terminal->color_palette + 3 * color);
-  green = (uint8_t) *(terminal->color_palette + 3 * color + 1);
-  blue = (uint8_t) *(terminal->color_palette + 3 * color + 2);
+  red   = terminal->color_palette[3*color];
+  green = terminal->color_palette[3*color+1];
+  blue  = terminal->color_palette[3*color+2];
 
-  hex_value = red << 16 | green << 8 | blue;
-
-  return hex_value;
+  return red << 16 | green << 8 | blue;
 }
 
 void
@@ -747,18 +744,12 @@ ply_terminal_set_color_hex_value (ply_terminal_t       
*terminal,
                                   ply_terminal_color_t  color,
                                   uint32_t              hex_value)
 {
-  uint8_t red, green, blue;
-
   assert (terminal != NULL);
   assert (color <= PLY_TERMINAL_COLOR_WHITE);
 
-  red = (uint8_t) ((hex_value >> 16) & 0xff);
-  green = (uint8_t) ((hex_value >> 8) & 0xff);
-  blue = (uint8_t) (hex_value & 0xff);
-
-  *(terminal->color_palette + 3 * color) = red;
-  *(terminal->color_palette + 3 * color + 1) = green;
-  *(terminal->color_palette + 3 * color + 2) = blue;
+  terminal->color_palette[3*color]   = (hex_value >> 16) & 0xff;
+  terminal->color_palette[3*color+1] = (hex_value >> 8) & 0xff;
+  terminal->color_palette[3*color+2] = hex_value & 0xff;
 
   ply_terminal_change_color_palette (terminal);
 }
-- 
1.7.7



------------------------------

Message: 3
Date: Sun, 29 Jul 2012 20:32:55 +0200
From: Jan Engelhardt <[email protected]>
To: [email protected]
Subject: [PATCH 4/4] ply-text-progress-bar: strip quotes if present
Message-ID: <[email protected]>

The syntax for sysconfig-style files allows for quotes.
---
 src/libply-splash-core/ply-text-progress-bar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/libply-splash-core/ply-text-progress-bar.c 
b/src/libply-splash-core/ply-text-progress-bar.c
index 0f4d74e..0b29690 100644
--- a/src/libply-splash-core/ply-text-progress-bar.c
+++ b/src/libply-splash-core/ply-text-progress-bar.c
@@ -137,6 +137,11 @@ get_os_string (void)
           if (pos2 != NULL)
             *pos2 = '\0';
 
+          if ((*pos == '\"' && pos2[-1] == '\"') ||
+              (*pos == '\'' && pos2[-1] == '\'')) {
+               ++pos;
+               *--pos2 = '\0';
+          }
           asprintf (&os_string, " %s", pos);
         }
       goto out;
-- 
1.7.7



------------------------------

Message: 4
Date: Sun, 29 Jul 2012 20:32:51 +0200
From: Jan Engelhardt <[email protected]>
To: [email protected]
Subject: Additions for text splash
Message-ID: <[email protected]>


The following changes since commit c8e548d5e4266ce1583e5b532fe3a3559932d3be:

  systemd: don't run read-write service from initrd (2012-07-26 13:05:22 -0400)

are available in the git repository at:
  git://git.inai.de/plymouth master

Jan Engelhardt (4):
      ply-text-display: support bright colors
      ply-terminal: remove pointless casts
      build: fix typo in configure.ac
      ply-text-progress-bar: strip quotes if present

 configure.ac                                   |    2 +-
 src/libply-splash-core/ply-terminal.c          |   23 +++++++----------------
 src/libply-splash-core/ply-terminal.h          |   10 +++++++++-
 src/libply-splash-core/ply-text-display.c      |   21 +++++++++++++++++++--
 src/libply-splash-core/ply-text-progress-bar.c |    9 +++++++--
 src/plugins/splash/text/plugin.c               |    2 +-
 6 files changed, 44 insertions(+), 23 deletions(-)


------------------------------

Message: 5
Date: Sun, 29 Jul 2012 20:32:52 +0200
From: Jan Engelhardt <[email protected]>
To: [email protected]
Subject: [PATCH 1/4] ply-text-display: support bright colors
Message-ID: <[email protected]>

---
 src/libply-splash-core/ply-terminal.h          |   10 +++++++++-
 src/libply-splash-core/ply-text-display.c      |   21 +++++++++++++++++++--
 src/libply-splash-core/ply-text-progress-bar.c |    4 ++--
 src/plugins/splash/text/plugin.c               |    2 +-
 4 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/src/libply-splash-core/ply-terminal.h 
b/src/libply-splash-core/ply-terminal.h
index 8b4b017..bf572cc 100644
--- a/src/libply-splash-core/ply-terminal.h
+++ b/src/libply-splash-core/ply-terminal.h
@@ -44,8 +44,16 @@ typedef enum
   PLY_TERMINAL_COLOR_BLUE,
   PLY_TERMINAL_COLOR_MAGENTA,
   PLY_TERMINAL_COLOR_CYAN,
+  PLY_TERMINAL_COLOR_GRAY,
+  PLY_TERMINAL_COLOR_DARKGRAY,
+  PLY_TERMINAL_COLOR_BRIGHTRED,
+  PLY_TERMINAL_COLOR_BRIGHTGREEN,
+  PLY_TERMINAL_COLOR_YELLOW,
+  PLY_TERMINAL_COLOR_BRIGHTBLUE,
+  PLY_TERMINAL_COLOR_BRIGHTMAGENTA,
+  PLY_TERMINAL_COLOR_BRIGHTCYAN,
   PLY_TERMINAL_COLOR_WHITE,
-  PLY_TERMINAL_COLOR_DEFAULT = PLY_TERMINAL_COLOR_WHITE + 2
+  PLY_TERMINAL_COLOR_DEFAULT,
 } ply_terminal_color_t;
 
 typedef enum
diff --git a/src/libply-splash-core/ply-text-display.c 
b/src/libply-splash-core/ply-text-display.c
index 7cabd98..c538c59 100644
--- a/src/libply-splash-core/ply-text-display.c
+++ b/src/libply-splash-core/ply-text-display.c
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -178,6 +179,12 @@ void
 ply_text_display_set_background_color (ply_text_display_t   *display,
                                        ply_terminal_color_t  color)
 {
+  /* Generally no support for bright backgrounds by hardware */
+  assert(!(color >= PLY_TERMINAL_COLOR_DARKGRAY &&
+         color <= PLY_TERMINAL_COLOR_WHITE));
+
+  if (color == PLY_TERMINAL_COLOR_DEFAULT)
+               color = 9;
 
   ply_terminal_write (display->terminal,
                       COLOR_SEQUENCE_FORMAT,
@@ -190,9 +197,19 @@ void
 ply_text_display_set_foreground_color (ply_text_display_t       *display,
                                        ply_terminal_color_t  color)
 {
+  bool hi = false;
+
+  if (color >= PLY_TERMINAL_COLOR_DARKGRAY &&
+      color <= PLY_TERMINAL_COLOR_WHITE) {
+               color -= PLY_TERMINAL_COLOR_DARKGRAY;
+               hi = true;
+  } else if (color == PLY_TERMINAL_COLOR_DEFAULT) {
+               color = 9;
+  }
   ply_terminal_write (display->terminal,
-                      COLOR_SEQUENCE_FORMAT,
-                      FOREGROUND_COLOR_BASE + color);
+                      "\x1b\x5b""%d;%u;%um", hi,
+                      FOREGROUND_COLOR_BASE + color,
+                      BACKGROUND_COLOR_BASE + display->background_color);
 
   display->foreground_color = color;
 }
diff --git a/src/libply-splash-core/ply-text-progress-bar.c 
b/src/libply-splash-core/ply-text-progress-bar.c
index 7c9d688..0f4d74e 100644
--- a/src/libply-splash-core/ply-text-progress-bar.c
+++ b/src/libply-splash-core/ply-text-progress-bar.c
@@ -190,7 +190,7 @@ ply_text_progress_bar_draw (ply_text_progress_bar_t 
*progress_bar)
         f = (double) i / (double) width;
         if (f < white_fraction)
             ply_text_display_set_background_color (progress_bar->display,
-                                                   PLY_TERMINAL_COLOR_WHITE);
+                                                   PLY_TERMINAL_COLOR_GRAY);
         else if (f < blue_fraction)
             ply_text_display_set_background_color (progress_bar->display,
                                              PLY_TERMINAL_COLOR_BLUE);
@@ -209,7 +209,7 @@ ply_text_progress_bar_draw (ply_text_progress_bar_t 
*progress_bar)
     if (brown_fraction > 0.5) {
         if (white_fraction > 0.875)
             ply_text_display_set_foreground_color (progress_bar->display,
-                                                   PLY_TERMINAL_COLOR_WHITE);
+                                                   PLY_TERMINAL_COLOR_GRAY);
         else if (blue_fraction > 0.66)
             ply_text_display_set_foreground_color (progress_bar->display,
                                                    PLY_TERMINAL_COLOR_BLUE);
diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c
index 50059be..78feb59 100644
--- a/src/plugins/splash/text/plugin.c
+++ b/src/plugins/splash/text/plugin.c
@@ -179,7 +179,7 @@ view_start_animation (view_t *view)
                                     PLY_TERMINAL_COLOR_BLACK,
                                     0x000000);
   ply_terminal_set_color_hex_value (terminal,
-                                    PLY_TERMINAL_COLOR_WHITE,
+                                    PLY_TERMINAL_COLOR_GRAY,
                                     0xffffff);
   ply_terminal_set_color_hex_value (terminal,
                                     PLY_TERMINAL_COLOR_BLUE,
-- 
1.7.7



------------------------------

_______________________________________________
plymouth mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/plymouth


End of plymouth Digest, Vol 42, Issue 5
***************************************

Reply via email to