[PATCH 17/20] [throbgress] resume animations on display_normal

Scott James Remnant scott at ubuntu.com
Thu Mar 18 14:01:07 PDT 2010


Change the display_normal() function so that rather than being a no-op
if we already saved the state as normal, it restarts any animations and
redraws the views.

The only thing we now do if the state is not previously the same is
hide any prompt.

This allows this to be used to reanimate the plugin on reactivate.
---
 src/plugins/splash/throbgress/plugin.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/plugins/splash/throbgress/plugin.c b/src/plugins/splash/throbgress/plugin.c
index 02b334d..03b08cb 100644
--- a/src/plugins/splash/throbgress/plugin.c
+++ b/src/plugins/splash/throbgress/plugin.c
@@ -820,12 +820,11 @@ display_normal (ply_boot_splash_plugin_t *plugin)
 {
   pause_views (plugin);
   if (plugin->state != PLY_BOOT_SPLASH_DISPLAY_NORMAL)
-    {
-      plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
-      hide_prompt (plugin);
-      start_animation (plugin);
-      redraw_views (plugin);
-    }
+    hide_prompt (plugin);
+
+  plugin->state = PLY_BOOT_SPLASH_DISPLAY_NORMAL;
+  start_animation (plugin);
+  redraw_views (plugin);
   unpause_views (plugin);
 }
 
-- 
1.7.0



More information about the plymouth mailing list