Make details plugin go back to default plugin if escape is pressed again

This fixes the TODO item:

  - consider making details plugin go back to pretty plugin
    if user presses escape
calculate-0.9.5
Ray Strode 16 years ago
parent f0d9ecf425
commit 645f474d65

@ -5,7 +5,6 @@
- Make --ask-for-password take a prompt message
- consider making details plugin have stdin hooked up to the pty instead of tty so input works
- More on the last point, we need to have an escape hatch for fsck etc
- consider making details plugin go back to pretty plugin if user presses escape
- add expose handler for plugins to draw from. We need to reset some state every frame of the animation, so better to hide that.
- rotate boot.log per boot cycle (might be easiest to just fork/exec out to logrotate directly)
- fix error handling. In particular, ply_open_module gets it completely wrong (replies on errno instead of dlerror())

@ -57,6 +57,7 @@ typedef struct
long ptmx;
char kernel_command_line[PLY_MAX_COMMAND_LINE_SIZE];
uint32_t showing_details : 1;
} state_t;
static ply_boot_splash_t *start_boot_splash (state_t *state,
@ -124,7 +125,21 @@ on_system_initialized (state_t *state)
}
static void
on_show_splash (state_t *state)
show_detailed_splash (state_t *state)
{
ply_trace ("Showing detailed splash screen");
state->boot_splash = start_boot_splash (state,
PLYMOUTH_PLUGIN_PATH "details.so");
if (state->boot_splash == NULL)
{
ply_trace ("Could not start detailed splash screen, exiting");
exit (1);
}
}
static void
show_default_splash (state_t *state)
{
ply_trace ("Showing splash screen");
state->boot_splash = start_boot_splash (state,
@ -142,6 +157,12 @@ on_show_splash (state_t *state)
ply_error ("could not start boot splash: %m");
}
static void
on_show_splash (state_t *state)
{
show_default_splash (state);
}
static void
on_quit (state_t *state)
{
@ -190,9 +211,19 @@ on_escape_pressed (state_t *state)
{
ply_boot_splash_hide (state->boot_splash);
ply_boot_splash_free (state->boot_splash);
state->boot_splash = NULL;
}
state->boot_splash = start_boot_splash (state, PLYMOUTH_PLUGIN_PATH "details.so");
if (!state->showing_details)
{
show_detailed_splash (state);
state->showing_details = true;
}
else
{
show_default_splash (state);
state->showing_details = false;
}
}
static ply_window_t *

Loading…
Cancel
Save