Index: src/gnome-screensaver-preferences.c
===================================================================
RCS file: /cvs/gnome/gnome-screensaver/src/gnome-screensaver-preferences.c,v
retrieving revision 1.27
diff -u -r1.27 gnome-screensaver-preferences.c
--- src/gnome-screensaver-preferences.c	14 Jan 2006 22:57:03 -0000	1.27
+++ src/gnome-screensaver-preferences.c	30 Jan 2006 18:18:51 -0000
@@ -86,6 +86,7 @@
 
 static GladeXML *xml = NULL;
 static GSJob    *job = NULL;
+static GSJob    *job_fullscreen_preview = NULL;
 
 static gint32
 config_get_activate_delay (gboolean *is_writable)
@@ -345,7 +346,8 @@
 
 static void
 preview_set_theme (GtkWidget  *widget,
-                   const char *theme)
+                   const char *theme, 
+                   GSJob      *job)
 {
         GError *error = NULL;
 
@@ -469,7 +471,7 @@
         if (! theme)
                 return;
 
-        preview_set_theme (preview, theme);
+        preview_set_theme (preview, theme, job);
         config_set_theme (theme);
 
         g_free (theme);
@@ -996,6 +998,70 @@
         }
 }
 
+static gboolean
+fullscreen_preview_canceled_cb (GtkWidget *fullscreen_preview_window, gpointer user_data) 
+{
+
+        GtkWidget *fullscreen_preview_area;
+        GtkWidget *dialog;
+        
+        if (job_fullscreen_preview) {
+                gs_job_stop (job_fullscreen_preview);
+        }
+
+        fullscreen_preview_area = glade_xml_get_widget (xml, "fullscreen_preview_area");
+        preview_clear (fullscreen_preview_area);
+        
+        fullscreen_preview_window = glade_xml_get_widget (xml, "fullscreen_preview_window");
+        gtk_widget_hide (fullscreen_preview_window);
+
+        dialog = glade_xml_get_widget (xml, "prefs_dialog");
+        gtk_widget_show (dialog);
+
+        return FALSE;
+}
+
+static void
+fullscreen_preview_start_cb (GtkWidget  *widget, gpointer user_data)
+{
+        GtkTreeView      *tree;
+        GtkTreeIter      iter;
+        GtkTreeSelection *selection;
+        char             *theme;
+        GtkTreeModel     *model;
+        GtkWidget        *fullscreen_preview_area;
+        GtkWidget        *fullscreen_preview_window;
+        GtkWidget        *dialog;
+
+
+        tree = GTK_TREE_VIEW(user_data);
+        selection = gtk_tree_view_get_selection(tree);
+        if (selection == NULL) {
+        		return;
+        }
+        
+        if (! gtk_tree_selection_get_selected(selection, &model, &iter)) {
+        		return;
+        }
+        gtk_tree_model_get (model, &iter, ID_COLUMN, &theme, -1);
+
+
+        dialog = glade_xml_get_widget (xml, "prefs_dialog");
+				gtk_widget_hide(dialog);
+        
+        fullscreen_preview_window = glade_xml_get_widget (xml, "fullscreen_preview_window");
+        gtk_widget_show (fullscreen_preview_window);
+        gtk_widget_grab_focus (fullscreen_preview_window);
+
+        gtk_window_fullscreen (GTK_WINDOW (fullscreen_preview_window));
+				gtk_window_set_keep_above (GTK_WINDOW (fullscreen_preview_window), TRUE);
+				
+        fullscreen_preview_area = glade_xml_get_widget (xml, "fullscreen_preview_area");
+        preview_set_theme (fullscreen_preview_area, theme, job_fullscreen_preview);
+        
+        g_free(theme);
+}
+
 static void
 init_capplet (void)
 {
@@ -1007,6 +1073,10 @@
         GtkWidget *label;
         GtkWidget *enabled_checkbox;
         GtkWidget *lock_checkbox;
+        GtkWidget *preview_button;
+        GtkWidget *fullscreen_preview_window;
+        GtkWidget *fullscreen_preview_area;
+        GtkWidget *fullscreen_preview_close;
         char      *glade_file;
         char      *string;
         gdouble    activate_delay;
@@ -1041,6 +1111,10 @@
         activate_delay_hbox   = glade_xml_get_widget (xml, "activate_delay_hbox");
         enabled_checkbox   = glade_xml_get_widget (xml, "enable_checkbox");
         lock_checkbox      = glade_xml_get_widget (xml, "lock_checkbox");
+        preview_button     = glade_xml_get_widget (xml, "preview_button");
+        fullscreen_preview_window = glade_xml_get_widget (xml, "fullscreen_preview_window");
+        fullscreen_preview_area = glade_xml_get_widget (xml, "fullscreen_preview_area");
+        fullscreen_preview_close = glade_xml_get_widget (xml, "fullscreen_preview_close");
 
         label              = glade_xml_get_widget (xml, "activate_delay_label");
         gtk_label_set_mnemonic_widget (GTK_LABEL (label), activate_delay_hscale);
@@ -1069,7 +1143,7 @@
 
             
         gtk_window_set_icon_name (GTK_WINDOW (dialog), "screensaver");
-
+        gtk_window_set_icon_name (GTK_WINDOW (fullscreen_preview_window), "screensaver");
 
         gtk_drag_dest_set (dialog, GTK_DEST_DEFAULT_ALL,
                            drop_types, G_N_ELEMENTS (drop_types),
@@ -1115,15 +1189,26 @@
 
         preview_clear (preview);
         gs_job_set_widget (job, preview);
+        gs_job_set_widget (job_fullscreen_preview, fullscreen_preview_area);
+
 
         setup_treeview (treeview, preview);
         setup_treeview_selection (treeview);
 
+
         g_signal_connect (activate_delay_hscale, "value-changed",
                           G_CALLBACK (activate_delay_value_changed_cb), NULL);
 
         g_signal_connect (dialog, "response",
                           G_CALLBACK (response_cb), NULL);
+
+
+        g_signal_connect (G_OBJECT (preview_button), "clicked",
+                          G_CALLBACK (fullscreen_preview_start_cb),
+                          treeview);
+
+        g_signal_connect (fullscreen_preview_close, "clicked", 
+                          G_CALLBACK (fullscreen_preview_canceled_cb), NULL);
 }
 
 int
@@ -1143,12 +1228,14 @@
                             GNOME_PARAM_NONE);
 
         job = gs_job_new ();
+        job_fullscreen_preview = gs_job_new ();
 
         init_capplet ();
 
         gtk_main ();
 
         g_object_unref (job);
+        g_object_unref (job_fullscreen_preview);
 
 	return 0;
 }
