]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: refactor show_*_splash
authorRay Strode <rstrode@redhat.com>
Mon, 9 Dec 2013 15:37:51 +0000 (10:37 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 10 Dec 2013 05:15:59 +0000 (00:15 -0500)
Right now show_default_splash and show_detailed_splash,
load the relevant splash and then show it.

This commit drops the "show" part and renames the functions to
load_default_splash and load_detailed_splash, respectively.

It, of course, also updates the callers to call show_theme
explicitly.

This refactorization will make it easier to later move device
management out of main.c

src/main.c

index 3de6ac6260af7c008bed1c12bf3a782ab1c72836..7729d9cedb8dc5a81a64851bdd26221691310b00 100644 (file)
@@ -416,7 +416,7 @@ show_messages (state_t *state)
 }
 
 static void
-show_detailed_splash (state_t *state)
+load_detailed_splash (state_t *state)
 {
   ply_boot_splash_t *splash;
 
@@ -433,8 +433,6 @@ show_detailed_splash (state_t *state)
     }
 
   state->boot_splash = splash;
-
-  show_theme (state, state->boot_splash);
 }
 
 static const char *
@@ -559,7 +557,7 @@ find_distribution_default_splash (state_t *state)
 }
 
 static void
-show_default_splash (state_t *state)
+load_default_splash (state_t *state)
 {
   if (state->boot_splash != NULL)
     return;
@@ -613,8 +611,6 @@ show_default_splash (state_t *state)
       ply_error ("plymouthd: could not start boot splash: %m");
       return;
     }
-
-  show_theme (state, state->boot_splash);
 }
 
 static void
@@ -1011,14 +1007,15 @@ on_show_splash (state_t *state)
 
   if (plymouth_should_show_default_splash (state))
     {
-      show_default_splash (state);
+      load_default_splash (state);
       state->showing_details = false;
     }
   else
     {
-      show_detailed_splash (state);
+      load_detailed_splash (state);
       state->showing_details = true;
     }
+  show_theme (state, state->boot_splash);
   show_messages (state);
 }
 
@@ -1484,14 +1481,15 @@ toggle_between_splash_and_details (state_t *state)
 
   if (!state->showing_details)
     {
-      show_detailed_splash (state);
+      load_detailed_splash (state);
       state->showing_details = true;
     }
   else
     {
-      show_default_splash (state);
+      load_default_splash (state);
       state->showing_details = false;
     }
+  show_theme (state, state->boot_splash);
   update_display (state);
   show_messages (state);
 }