diff options
author | Ray Strode <rstrode@redhat.com> | 2014-02-05 15:09:13 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2014-02-05 15:09:13 -0500 |
commit | e41af2d6459d471a9b613728bdbecf2a462b8dc6 (patch) | |
tree | 4c335175e17d4725231b1890b373e0baa8e842cf | |
parent | f30df6c44048b6b01311176a775103b1ba1524dc (diff) |
main: don't show splash from cancel_pending_delayed_show
It was a weird to show something in a function called "cancel..show"
Instead move the logic to the one caller that actually needed that
functionality (on_ask_for_password)
-rw-r--r-- | src/main.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -482,8 +482,6 @@ show_default_splash (state_t *state) static void cancel_pending_delayed_show (state_t *state) { - bool has_open_seats; - if (isnan (state->splash_delay)) return; @@ -492,13 +490,6 @@ cancel_pending_delayed_show (state_t *state) show_splash, state); state->splash_delay = NAN; - has_open_seats = ply_device_manager_has_open_seats (state->device_manager); - - if (state->is_shown && has_open_seats) - { - ply_trace ("splash delay cancelled, showing splash immediately"); - show_splash (state); - } } static void @@ -515,8 +506,21 @@ on_ask_for_password (state_t *state, */ if (state->is_shown) { - ply_trace ("splash still coming up, waiting a bit"); + bool has_open_seats; + cancel_pending_delayed_show (state); + + has_open_seats = ply_device_manager_has_open_seats (state->device_manager); + + if (has_open_seats) + { + ply_trace ("seats open now, showing splash immediately"); + show_splash (state); + } + else + { + ply_trace ("splash still coming up, waiting a bit"); + } } else { |