Index: gnome-panel-screenshot.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gnome-screenshot/gnome-panel-screenshot.c,v
retrieving revision 1.84
diff -u -p -r1.84 gnome-panel-screenshot.c
--- gnome-panel-screenshot.c	22 Dec 2004 17:57:01 -0000	1.84
+++ gnome-panel-screenshot.c	10 Mar 2005 20:19:44 -0000
@@ -60,6 +60,7 @@ static gboolean save_immediately = FALSE
 static gboolean take_window_shot = FALSE;
 static gboolean include_border = FALSE;
 static char *border_effect = NULL;
+static int delay = 0;
 
 /* some local prototypes */
 static void display_help           (ScreenshotDialog *dialog);
@@ -356,8 +357,44 @@ prepare_screenshot (void)
 static gboolean
 prepare_screenshot_timeout (gpointer data)
 {
-  gtk_main_quit ();
-  prepare_screenshot ();
+  static GtkWidget *window = NULL;
+  static GtkWidget *label = NULL;
+
+  if (delay > 0) 
+    {
+      char *str;
+
+      if (window==NULL) 
+	{
+	  GtkWidget *frame;
+	  int width, height;
+	  
+	  window = gtk_window_new (GTK_WINDOW_POPUP);
+	  frame = gtk_frame_new (NULL);
+	  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
+	  gtk_container_add (GTK_CONTAINER (window), frame);
+	  label = gtk_label_new ("");
+	  gtk_misc_set_padding (GTK_MISC (label), 3, 3);
+	  gtk_container_add (GTK_CONTAINER (frame), label);
+	  gtk_widget_show_all (frame);
+	  width = gdk_screen_get_width (gdk_screen_get_default());
+	  height = gdk_screen_get_height (gdk_screen_get_default ());
+	  gtk_window_move (GTK_WINDOW(window), width/2, height/2);
+	}
+
+      str = g_strdup_printf ("<span size='xx-large'>%d</span>", delay);
+      gtk_label_set_markup (GTK_LABEL (label), str);
+      g_free (str);
+      gtk_window_present (GTK_WINDOW (window));
+      delay --;
+      g_timeout_add (1000, prepare_screenshot_timeout, NULL);
+    } 
+  else 
+    {
+      gtk_widget_destroy (window);
+      gtk_main_quit ();
+      prepare_screenshot ();
+    }
 
   return FALSE;
 }
@@ -403,7 +440,7 @@ main (int argc, char *argv[])
   gboolean window_arg = FALSE;
   gboolean include_border_arg = FALSE;
   gchar *border_effect_arg = NULL;
-  guint delay_arg = 0;
+  guint delay_arg = 5;
 
   struct poptOption opts[] =
     {
@@ -448,9 +485,8 @@ main (int argc, char *argv[])
 
   if (delay_arg > 0)
     {      
-      g_timeout_add (delay_arg * 1000,
-		     prepare_screenshot_timeout,
-		     NULL);
+      delay = delay_arg;
+      prepare_screenshot_timeout (NULL);
       gtk_main ();
     }
   else
