- add ctrl-r to rotate text color palette back to stock values
This commit is contained in:
parent
27362621b1
commit
823b541a24
@ -1,7 +1,7 @@
|
|||||||
Summary: Plymouth Graphical Boot Animation and Logger
|
Summary: Plymouth Graphical Boot Animation and Logger
|
||||||
Name: plymouth
|
Name: plymouth
|
||||||
Version: 0.5.0
|
Version: 0.5.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
|
Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
|
||||||
@ -16,6 +16,7 @@ Requires: elfutils
|
|||||||
Requires: system-plymouth-plugin >= %{version}-%{release}
|
Requires: system-plymouth-plugin >= %{version}-%{release}
|
||||||
|
|
||||||
Patch0: plymouth-0.5.0-fix-ppc.patch
|
Patch0: plymouth-0.5.0-fix-ppc.patch
|
||||||
|
Patch1: restore-color-palette.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Plymouth provides an attractive graphical boot animation in
|
Plymouth provides an attractive graphical boot animation in
|
||||||
@ -69,6 +70,7 @@ spins in the shape of an infinity sign.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%patch0 -p1 -b .fix-ppc
|
%patch0 -p1 -b .fix-ppc
|
||||||
|
%patch1 -p1 -b .restore-color-palette
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-tracing --disable-tests --without-boot-entry \
|
%configure --enable-tracing --disable-tests --without-boot-entry \
|
||||||
@ -174,6 +176,9 @@ fi
|
|||||||
%{_libdir}/plymouth/spinfinity.so
|
%{_libdir}/plymouth/spinfinity.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 9 2008 Ray Strode <rstrode@redhat.com> - 0.5.0-4
|
||||||
|
- add ctrl-r to rotate text color palette back to stock values
|
||||||
|
|
||||||
* Tue Jul 8 2008 Ray Strode <rstrode@redhat.com> - 0.5.0-3
|
* Tue Jul 8 2008 Ray Strode <rstrode@redhat.com> - 0.5.0-3
|
||||||
- Fix populate script on ppc (bug 454353)
|
- Fix populate script on ppc (bug 454353)
|
||||||
|
|
||||||
|
113
restore-color-palette.patch
Normal file
113
restore-color-palette.patch
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
commit d10b3eb6da0521dc1bb0a2a1d62f619a2460d73c
|
||||||
|
Author: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Wed Jul 9 17:36:44 2008 -0400
|
||||||
|
|
||||||
|
Add debugging feature to restore text palette
|
||||||
|
|
||||||
|
diff --git a/src/libplybootsplash/ply-window.c b/src/libplybootsplash/ply-window.c
|
||||||
|
index 90f9cc6..d718203 100644
|
||||||
|
--- a/src/libplybootsplash/ply-window.c
|
||||||
|
+++ b/src/libplybootsplash/ply-window.c
|
||||||
|
@@ -45,6 +45,7 @@
|
||||||
|
#include "ply-logger.h"
|
||||||
|
#include "ply-utils.h"
|
||||||
|
|
||||||
|
+#define KEY_CTRL_P ('\100' ^'P')
|
||||||
|
#define KEY_CTRL_T ('\100' ^'T')
|
||||||
|
#define KEY_CTRL_U ('\100' ^'U')
|
||||||
|
#define KEY_CTRL_W ('\100' ^'W')
|
||||||
|
@@ -143,6 +144,40 @@ ply_window_new (int vt_number)
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static bool
|
||||||
|
+ply_window_look_up_color_palette (ply_window_t *window)
|
||||||
|
+{
|
||||||
|
+ if (ioctl (window->tty_fd, GIO_CMAP, window->color_palette) < 0)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static bool
|
||||||
|
+ply_window_change_color_palette (ply_window_t *window)
|
||||||
|
+{
|
||||||
|
+ if (ioctl (window->tty_fd, PIO_CMAP, window->color_palette) < 0)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+ply_window_save_color_palette (ply_window_t *window)
|
||||||
|
+{
|
||||||
|
+ memcpy (window->original_color_palette, window->color_palette,
|
||||||
|
+ TEXT_PALETTE_SIZE);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+ply_window_restore_color_palette (ply_window_t *window)
|
||||||
|
+{
|
||||||
|
+ memcpy (window->color_palette, window->original_color_palette,
|
||||||
|
+ TEXT_PALETTE_SIZE);
|
||||||
|
+
|
||||||
|
+ ply_window_change_color_palette (window);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
process_backspace (ply_window_t *window)
|
||||||
|
{
|
||||||
|
@@ -188,6 +223,12 @@ process_keyboard_input (ply_window_t *window,
|
||||||
|
{
|
||||||
|
switch (key)
|
||||||
|
{
|
||||||
|
+
|
||||||
|
+ case KEY_CTRL_P:
|
||||||
|
+ ply_trace ("restore text palette to original value!");
|
||||||
|
+ ply_window_restore_color_palette (window);
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
case KEY_CTRL_T:
|
||||||
|
ply_trace ("toggle text mode!");
|
||||||
|
window->should_force_text_mode = !window->should_force_text_mode;
|
||||||
|
@@ -362,40 +403,6 @@ ply_window_look_up_geometry (ply_window_t *window)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static bool
|
||||||
|
-ply_window_look_up_color_palette (ply_window_t *window)
|
||||||
|
-{
|
||||||
|
- if (ioctl (window->tty_fd, GIO_CMAP, window->color_palette) < 0)
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- return true;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static bool
|
||||||
|
-ply_window_change_color_palette (ply_window_t *window)
|
||||||
|
-{
|
||||||
|
- if (ioctl (window->tty_fd, PIO_CMAP, window->color_palette) < 0)
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- return true;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-ply_window_save_color_palette (ply_window_t *window)
|
||||||
|
-{
|
||||||
|
- memcpy (window->original_color_palette, window->color_palette,
|
||||||
|
- TEXT_PALETTE_SIZE);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void
|
||||||
|
-ply_window_restore_color_palette (ply_window_t *window)
|
||||||
|
-{
|
||||||
|
- memcpy (window->color_palette, window->original_color_palette,
|
||||||
|
- TEXT_PALETTE_SIZE);
|
||||||
|
-
|
||||||
|
- ply_window_change_color_palette (window);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
bool
|
||||||
|
ply_window_open (ply_window_t *window)
|
||||||
|
{
|
Loading…
Reference in New Issue
Block a user