Commit graph

1980 commits

Author SHA1 Message Date
Ray Strode
07d5f10f60 [set-default-theme] Add more compat goo
If there's no configured theme installed, return "text"
2010-05-07 15:35:49 -04:00
Ray Strode
8c390bea97 [terminal] Don't stomp over original tty lock settings
We were repetedly saving over the original tty lock settings,
causing the tty to stay locked after boot up.
2010-05-07 14:49:09 -04:00
Ray Strode
2ea21378ef [configure] bump to 0.8.3 2010-05-06 13:32:20 -04:00
Ray Strode
e64a8976a5 [two-step] Add optional header and throbber
These are just a few more bits for themes to optionally
make use of.  The throbber gets overlaid with the
progress animation, so they need to be concentric.
The header gets put on top.
2010-05-06 13:04:14 -04:00
Ray Strode
1aaaf1d39d [two-step] Add new ProgressFunction config option
We've historically used a expontial function for boot up,
to make it "feel" faster.  This equation was invented by
Will Woods.

Making progress linear with boot up is also useful though.

This commit makes it configurable.
2010-05-06 12:59:54 -04:00
Ray Strode
4da25e407c [main] Save progress cache file earlier
The cache file record milestones during boot, so we should
write it out:

1) only after the root filesystem is mounted
2) as soon as we're no longer going to get updates about boot
   progress.
2010-05-06 10:57:33 -04:00
Ray Strode
efc9999460 [boot-splash] Force progress to 1.0 when quitting
This potentially allows themes to move their progress
bars to the end before quiting.
2010-05-06 10:54:27 -04:00
Ray Strode
6a7be5ab6a [throbber] Change frame sequencer function
The throbber has a function for determining which frame
to show based on the current time.  This function was:

  ƒrame(t) = number_of_frames ∙ (⅟₂ sin(t) + ⅟₂)

Which basically oscillates between 0 and number_of_frames - 1,
over and over again.  There are two problems with this function;
  - after it runs through all the frames in order, it then procedes
    to run through them backward.
  - This function also starts in the middle of the set of throbber
    frames.

These problems don't matter for spinfinity, but will look wrong for most
other themes.

The new function is this:

  ƒrame(t) = number_of_frames ∙ (1⁄duration)(t mod duration)

This function solves both problems.  At time 0 it uses frame 0, and
after the last frame it jumps back to the first frame.
2010-05-06 10:04:26 -04:00
Ray Strode
7d6763e4ab [throbber] set is_stopped after stopping
The throbber variable has an is_stopped state
variable that decides whether or not draws happen.

It starts off false, and gets toggled when started.

Unfortunately, it never gets reset to false
after be stopped.  This commit fixes that.
2010-05-06 08:45:41 -04:00
Colin Watson
c859e580a1 Handle NULL boot_buffer
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet).  Handle this gracefully rather than segfaulting.
2010-05-03 10:00:38 -04:00
Colin Watson
7021306e43 Handle plymouth:splash or plymouth:debug as last argument
If plymouth:splash or plymouth:debug is the last argument in
/proc/cmdline, then it will be terminated with '\n' rather than ' '.
Handle this.
2010-05-03 10:00:38 -04:00
Colin Watson
38f681280a Fix parsing of plymouth:debug=file:
Short-circuit evaluation meant that the path variable was never set if
plymouth:debug=file: was used.  Switch the ordering around to fix this.
2010-05-03 10:00:38 -04:00
Ray Strode
8c7b2de691 [terminal] wait for vt switching to finish on quit
After changing the active vt during start up,
we get a signal when it finishes, because we're in
VT_PROCESS mode, so we don't need to explicitly block
waiting for it to finish.

During the quit path, though, we aren't in VT_PROCESS mode anymore,
won't get any signals, and still need to know that the VT switch
is finished before informing the client that the quit is
finished.

This commit forces ply_terminal_deactivate_vt to block until the
VT switch it initiates finishes.
2010-04-29 13:23:18 -04:00
Ray Strode
ee41b742ad [terminal] Add some debug spew 2010-04-29 12:46:53 -04:00
Frederic Crozat
54a498c82d [splash] export config and policy directories
Export configuration and policy directories used by plymouth.
2010-04-21 15:40:40 +02:00
Frederic Crozat
979aeacb4a [main] do not set state->keyboard twice
state->keyboard is set already in set_keyboard, there is no need to do
the work twice.
2010-04-21 11:48:57 +02:00
Charlie Brej
d737df27ba [script] Remove debugging trace line 2010-04-21 00:09:25 +01:00
Charlie Brej
e9c668c0f2 [script] Allow passing of values from the .plymouth file to the script
An example in the script.plymouth shows a value being set. These values are
then present at the first execution of the script set in the global scope.
2010-04-21 00:02:42 +01:00
Charlie Brej
dd69e80ff9 [key-file] Add foreach function to access all stored values
Supplying a callback function, you can get each group/key/value triple. Allows
accessing values in the key file for which you may not know the keys.
2010-04-20 21:07:58 +01:00
Charlie Brej
d163fb2a3d [script] Default to text color alpha of 1 if nothing was passed
If NULL or no variable was passed, the aplha variable would be read as NaN
which gets clamped to 0 so the text would be completely transparent.
2010-04-20 14:00:01 +01:00
Steve Langasek
5de9b303bb [main] Create a list of messages and when showing splash display them
The system now keeps a list of messages so they can be shown again when the
user flips themes or if the messages were passed before the splash was shown.

This also enables the splashes to show multiple messages (should they choose to
do so). There will later be a way of undisplaying a message.
2010-04-20 12:08:05 +01:00
Charlie Brej
9124886efe [progress-animation] Typo bug in calculating max height
Was looking at the width rather than the height of the second image
2010-04-18 21:44:49 +01:00
Charlie Brej
fb7fa46b7b [progress-animation] Remove unnecessary draw area
Must have been left over from some debugging
2010-04-18 21:43:41 +01:00
Charlie Brej
4e1d670c8a [progress-animation] Remove some now unnecessary area calculations 2010-04-18 21:17:58 +01:00
Charlie Brej
f07024331d [progress-animation] Convert more functions to use buffer fill with buffer 2010-04-18 21:09:00 +01:00
Charlie Brej
6ee88aaec7 [image] Give get buffer function more sensible name
There was a "_convert_" in the middle of the function name from a clumsy copy
paste.
2010-04-18 20:43:06 +01:00
Charlie Brej
f9316f97a4 [progress-animation] Use buffer fill with buffer instead of with raw data 2010-04-18 20:32:27 +01:00
Charlie Brej
e98b8f1e3e [entry] Allow setting of text color
Default color is black.
2010-04-18 20:20:34 +01:00
Charlie Brej
f4a1cca351 [entry] Fix ask question entry text
The text was not being shown because show was not called. Also the default
colour is white which was not showing up on white background.
2010-04-18 20:10:17 +01:00
Charlie Brej
0f28114270 [entry] Convert from drawing image raw data to using pixel buffers 2010-04-18 20:01:26 +01:00
Charlie Brej
b9ad6d5af3 [image] Add asserts to make sure NULL is not passed as the image 2010-04-18 19:27:46 +01:00
Charlie Brej
b6028cb412 [image] Allow access to the internal image buffer
Adds ply_image_convert_get_buffer to get the image buffer without destroying
the image. Forgot to add the .c.
2010-04-18 19:24:08 +01:00
Charlie Brej
b604415ceb [image] Allow access to the internal image buffer
Adds ply_image_convert_get_buffer to get the image buffer without destroying
the image.
2010-04-18 19:22:49 +01:00
Charlie Brej
1eb3bfef85 [script] Simplify sprite area calculation
The sprite area no longer needs to be calculated as the buffer holds that
information.
2010-04-18 17:53:11 +01:00
Charlie Brej
8852b247bb [script] Use fill with buffer function 2010-04-18 17:38:23 +01:00
Charlie Brej
7c63590c06 [animation] Use fill with buffer function 2010-04-18 17:20:52 +01:00
Charlie Brej
cf609f0338 [throbber] Use fill with buffer function 2010-04-18 17:17:08 +01:00
Charlie Brej
d93ae6cdc7 [pixel-buffer] Add fill buffer with buffer functions
These draw the content of one buffer into another. This is cleaner than using
the raw data and passing the width and height of the data separately.
2010-04-18 17:14:21 +01:00
Charlie Brej
1cce2033ea [animation] Move frames from image to pixel-buffers
The frames are now stored as pixel-buffers which will be cleaner to draw from
in the future.
2010-04-18 16:17:00 +01:00
Charlie Brej
8c455e2383 [throbber] Move frames from image to pixel-buffers
The frames are now stored as pixel-buffers which will be cleaner to draw from
in the future.
2010-04-18 15:51:17 +01:00
Charlie Brej
28ca40f6d5 [pixel-buffer] Add get width and height functions
These were accessible by the get_size function, but individual functions are
more convenient.
2010-04-18 15:47:00 +01:00
Ray Strode
9f79d59d51 [main] Ignore keyboard changes when deactivating
There is a small window after plymouth is told
to quit or deactivate before it actually does.

During this window, if the user happens to hit
escape, bad things could happen.

We really don't want to mess with, e.g., the tty
settings when we're about to exit.

This commit puts plymouth in a sort of "degraded"
mode while it's deactivating.  During this time
frame, user input is ignored.
2010-04-14 15:42:54 -04:00
Ray Strode
559a1b2ff4 [terminal] Lock terminal settings
From time to time, various external programs
will muck with the tty we're using and make
the users password for encrypted disks show
up, make the enter key not work, etc.

We used to work around this by resetting the
tty the way we like it everytime we write the
screen.

We no longer do that after commit

e9a22723da

Instead of changing it every time, it's probably
better to just prevent other programs from messing
up the settings in the first place.

This commit locks the terminal so if those programs
try to change the settings, they fail.

A better long term solution might be to get user input
/dev/input instead of the tty
2010-04-14 15:09:23 -04:00
Charlie Brej
4c9b12fd2e [pixel-buffer] Remove offsets from buffet fill with data functions
The x and y offsets were supposed to allow only a part of the image data to be
drawn, but this didn't work correctly. Instead the clip region can be used to
emulate the same effect. So the x and y paramiters in these functions are now
dropped. The only instance that used these now uses a clip. All other calls had
x and y set to zero.
2010-04-13 21:05:04 +01:00
Ray Strode
5daa29168d [event-loop] Add reference count to event sources
This prevents the event loop from freeing sources
early in an iteration of the loop, and then dispatching
handlers for the source later in that same iteration.
2010-04-13 14:24:35 -04:00
Frederic Crozat
52757e5801 [drm] Drop drm/ from include directives
One file was missing the fix.
2010-04-13 17:43:13 +02:00
Ray Strode
c4f46b6262 [configure] bump to 0.8.1 2010-04-12 13:39:58 -04:00
Ray Strode
63e9bbd44f [boot-splash] Remove displays before unloading plugin
If we don't do this, then the splash display handler will
still be set, causing all sorts of undefined and weird
behavior.

This makes hitting the escape key multiple times act more
reliable.
2010-04-12 13:18:15 -04:00
Ray Strode
1285196e59 [main] Use updated terminal attrs on crash
In commit ea394383c5 I changed
the terminal settings used by ply-terminal.  This commit puts
those same settings into effect in the crash path.
2010-04-09 16:07:11 -04:00
Ray Strode
fe9d56bee8 [main] add more debugging messages 2010-04-09 16:06:15 -04:00