21ba79
commit 48a6bfa3bbed72d052324daa44e50bfb41b68efb
21ba79
Author: Kristian Høgsberg <krh@redhat.com>
21ba79
Date:   Mon Jun 16 16:37:23 2008 -0400
21ba79
21ba79
    Factor out background drawing code in throbber helper.
21ba79
21ba79
diff --git a/src/libplybootsplash/ply-throbber.c b/src/libplybootsplash/ply-throbber.c
21ba79
index 2349864..0dd6dc5 100644
21ba79
--- a/src/libplybootsplash/ply-throbber.c
21ba79
+++ b/src/libplybootsplash/ply-throbber.c
21ba79
@@ -122,6 +122,14 @@ ply_throbber_free (ply_throbber_t *throbber)
21ba79
 }
21ba79
 
21ba79
 static void
21ba79
+draw_background (ply_throbber_t *throbber)
21ba79
+{
21ba79
+  ply_frame_buffer_fill_with_gradient (throbber->frame_buffer, &throbber->frame_area,
21ba79
+                                       PLYMOUTH_BACKGROUND_START_COLOR,
21ba79
+                                       PLYMOUTH_BACKGROUND_END_COLOR);
21ba79
+}
21ba79
+
21ba79
+static void
21ba79
 animate_at_time (ply_throbber_t *throbber,
21ba79
                  double      time)
21ba79
 {
21ba79
@@ -141,9 +149,7 @@ animate_at_time (ply_throbber_t *throbber,
21ba79
 
21ba79
   ply_frame_buffer_pause_updates (throbber->frame_buffer);
21ba79
   if (throbber->frame_area.width > 0)
21ba79
-    ply_frame_buffer_fill_with_gradient (throbber->frame_buffer, &throbber->frame_area,
21ba79
-                                         PLYMOUTH_BACKGROUND_START_COLOR,
21ba79
-                                         PLYMOUTH_BACKGROUND_END_COLOR);
21ba79
+    draw_background (throbber);
21ba79
 
21ba79
   frames = (ply_image_t * const *) ply_array_get_elements (throbber->frames);
21ba79
 
21ba79
@@ -305,8 +311,8 @@ void
21ba79
 ply_throbber_stop (ply_throbber_t *throbber)
21ba79
 {
21ba79
   if (throbber->frame_area.width > 0)
21ba79
-    ply_frame_buffer_fill_with_hex_color (throbber->frame_buffer, &throbber->frame_area,
21ba79
-                                          PLYMOUTH_BACKGROUND_COLOR);
21ba79
+    draw_background (throbber);
21ba79
+
21ba79
   throbber->frame_buffer = NULL;
21ba79
   throbber->window = NULL;
21ba79
 
21ba79
21ba79
commit 34862aa8d3711c207f62b125fd37ceb5597451d9
21ba79
Author: Kristian Høgsberg <krh@redhat.com>
21ba79
Date:   Mon Jun 16 17:14:58 2008 -0400
21ba79
21ba79
    Don't go to text mode on exit.
21ba79
21ba79
diff --git a/src/libplybootsplash/ply-window.c b/src/libplybootsplash/ply-window.c
21ba79
index e0d90c0..62dd73c 100644
21ba79
--- a/src/libplybootsplash/ply-window.c
21ba79
+++ b/src/libplybootsplash/ply-window.c
21ba79
@@ -338,8 +338,6 @@ ply_window_open (ply_window_t *window)
21ba79
 void
21ba79
 ply_window_close (ply_window_t *window)
21ba79
 {
21ba79
-  ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT);
21ba79
-
21ba79
   if (ply_frame_buffer_device_is_open (window->frame_buffer))
21ba79
     ply_frame_buffer_close (window->frame_buffer);
21ba79
 
21ba79
@@ -408,7 +406,6 @@ ply_window_free (ply_window_t *window)
21ba79
                                            ply_window_detach_from_event_loop,
21ba79
                                            window);
21ba79
 
21ba79
-  ply_window_set_mode (window, PLY_WINDOW_MODE_TEXT);
21ba79
   ply_window_close (window);
21ba79
 
21ba79
   ply_buffer_free (window->keyboard_input_buffer);
21ba79
diff --git a/src/splash-plugins/spinfinity/plugin.c b/src/splash-plugins/spinfinity/plugin.c
21ba79
index fe8f644..454071b 100644
21ba79
--- a/src/splash-plugins/spinfinity/plugin.c
21ba79
+++ b/src/splash-plugins/spinfinity/plugin.c
21ba79
@@ -243,8 +243,6 @@ static void
21ba79
 detach_from_event_loop (ply_boot_splash_plugin_t *plugin)
21ba79
 {
21ba79
   plugin->loop = NULL;
21ba79
-
21ba79
-  ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT);
21ba79
 }
21ba79
 
21ba79
 void
21ba79
@@ -384,9 +382,9 @@ hide_splash_screen (ply_boot_splash_plugin_t *plugin,
21ba79
 
21ba79
   plugin->frame_buffer = NULL;
21ba79
 
21ba79
-  ply_window_set_mode (plugin->window, PLY_WINDOW_MODE_TEXT);
21ba79
   plugin->window = NULL;
21ba79
 }
21ba79
+
21ba79
 static void
21ba79
 draw_password_entry (ply_boot_splash_plugin_t *plugin)
21ba79
 {