? data/gnome-screensaver-preferences.glade.new
? src/gs-lock-plug.c.centered
? src/gs-lock-plug.c.tabular
Index: data/gnome-screensaver-preferences.glade
===================================================================
RCS file: /cvs/gnome/gnome-screensaver/data/gnome-screensaver-preferences.glade,v
retrieving revision 1.19
diff -p -u -r1.19 gnome-screensaver-preferences.glade
--- data/gnome-screensaver-preferences.glade	24 Feb 2006 20:08:27 -0000	1.19
+++ data/gnome-screensaver-preferences.glade	30 Mar 2006 19:06:39 -0000
@@ -121,26 +121,14 @@
 		      <child>
 			<widget class="GtkTable" id="table1">
 			  <property name="visible">True</property>
-			  <property name="n_rows">1</property>
+			  <property name="n_rows">2</property>
 			  <property name="n_columns">2</property>
 			  <property name="homogeneous">False</property>
 			  <property name="row_spacing">6</property>
 			  <property name="column_spacing">6</property>
 
 			  <child>
-			    <widget class="GtkDrawingArea" id="preview_area">
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+			    <widget class="GtkScrolledWindow" id="themes_scrolled_window">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
 			      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
@@ -173,6 +161,108 @@
 			      <property name="x_options">fill</property>
 			    </packing>
 			  </child>
+
+			  <child>
+			    <widget class="GtkDrawingArea" id="preview_area">
+			      <property name="visible">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">2</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHButtonBox" id="hbuttonbox1">
+			      <property name="visible">True</property>
+			      <property name="layout_style">GTK_BUTTONBOX_START</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkButton" id="preview_button">
+				  <property name="visible">True</property>
+				  <property name="can_default">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+
+				  <child>
+				    <widget class="GtkAlignment" id="alignment1">
+				      <property name="visible">True</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xscale">0</property>
+				      <property name="yscale">0</property>
+				      <property name="top_padding">0</property>
+				      <property name="bottom_padding">0</property>
+				      <property name="left_padding">0</property>
+				      <property name="right_padding">0</property>
+
+				      <child>
+					<widget class="GtkHBox" id="hbox10">
+					  <property name="visible">True</property>
+					  <property name="homogeneous">False</property>
+					  <property name="spacing">2</property>
+
+					  <child>
+					    <widget class="GtkImage" id="image3">
+					      <property name="visible">True</property>
+					      <property name="stock">gtk-fullscreen</property>
+					      <property name="icon_size">4</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					    </widget>
+					    <packing>
+					      <property name="padding">0</property>
+					      <property name="expand">False</property>
+					      <property name="fill">False</property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkLabel" id="preview_button_label">
+					      <property name="visible">True</property>
+					      <property name="label" translatable="yes">_Preview</property>
+					      <property name="use_underline">True</property>
+					      <property name="use_markup">False</property>
+					      <property name="justify">GTK_JUSTIFY_LEFT</property>
+					      <property name="wrap">False</property>
+					      <property name="selectable">False</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+					      <property name="width_chars">-1</property>
+					      <property name="single_line_mode">False</property>
+					      <property name="angle">0</property>
+					    </widget>
+					    <packing>
+					      <property name="padding">0</property>
+					      <property name="expand">False</property>
+					      <property name="fill">False</property>
+					    </packing>
+					  </child>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -373,6 +463,114 @@
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="fullscreen_preview_window">
+  <property name="can_focus">True</property>
+  <property name="has_focus">True</property>
+  <property name="title" translatable="yes">Screensaver Preview</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">True</property>
+  <property name="decorated">False</property>
+  <property name="skip_taskbar_hint">True</property>
+  <property name="skip_pager_hint">True</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox10">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox9">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image2">
+	      <property name="visible">True</property>
+	      <property name="stock">gtk-dialog-warning</property>
+	      <property name="icon_size">6</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">10</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label15">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Screensaver preview&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="fullscreen_preview_close">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-leave-fullscreen</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkDrawingArea" id="fullscreen_preview_area">
+	  <property name="visible">True</property>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
Index: src/gnome-screensaver-preferences.c
===================================================================
RCS file: /cvs/gnome/gnome-screensaver/src/gnome-screensaver-preferences.c,v
retrieving revision 1.29
diff -p -u -r1.29 gnome-screensaver-preferences.c
--- src/gnome-screensaver-preferences.c	27 Feb 2006 16:19:48 -0000	1.29
+++ src/gnome-screensaver-preferences.c	30 Mar 2006 19:06:39 -0000
@@ -1017,17 +1017,92 @@ key_changed_cb (GConfClient *client,
         }
 }
 
+static gboolean
+fullscreen_preview_canceled_cb (GtkWidget *fullscreen_preview_window,
+                                gpointer   user_data) 
+{
+
+        GtkWidget *fullscreen_preview_area;
+        GtkWidget *preview_area;
+        GtkWidget *dialog;
+
+        preview_area = glade_xml_get_widget (xml, "preview_area");
+        gs_job_set_widget (job, preview_area);
+
+        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)
+{
+        GtkWidget *fullscreen_preview_area;
+        GtkWidget *fullscreen_preview_window;
+        GtkWidget *dialog;
+
+        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");
+        gs_job_set_widget (job, fullscreen_preview_area);
+}
+
+static void
+constrain_list_size (GtkWidget      *widget,
+                     GtkRequisition *requisition,
+                     GtkWidget      *to_size)
+{
+        GtkRequisition req;
+        int            max_height;
+
+        /* constrain height to be the tree height up to a max */
+        max_height = (gdk_screen_get_height (gtk_widget_get_screen (widget))) / 4;
+
+        gtk_widget_size_request (to_size, &req);
+
+        requisition->height = MIN (req.height, max_height);
+}
+
+static void
+setup_list_size_constraint (GtkWidget *widget,
+                            GtkWidget *to_size)
+{
+        g_signal_connect (widget, "size-request",
+                          G_CALLBACK (constrain_list_size), to_size);
+}
+
 static void
 init_capplet (void)
 {
         GtkWidget *dialog;
         GtkWidget *preview;
         GtkWidget *treeview;
+        GtkWidget *list_scroller;
         GtkWidget *activate_delay_hscale;
         GtkWidget *activate_delay_hbox;
         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;
@@ -1058,10 +1133,15 @@ init_capplet (void)
         preview            = glade_xml_get_widget (xml, "preview_area");
         dialog             = glade_xml_get_widget (xml, "prefs_dialog");
         treeview           = glade_xml_get_widget (xml, "savers_treeview");
+        list_scroller      = glade_xml_get_widget (xml, "themes_scrolled_window");
         activate_delay_hscale = glade_xml_get_widget (xml, "activate_delay_hscale");
         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);
@@ -1088,9 +1168,10 @@ init_capplet (void)
         g_signal_connect (enabled_checkbox, "toggled",
                           G_CALLBACK (enabled_checkbox_toggled), NULL);
 
-            
+        setup_list_size_constraint (list_scroller, treeview);
+        gtk_widget_set_size_request (preview, 480, 300);
         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),
@@ -1145,6 +1226,13 @@ init_capplet (void)
 
         g_signal_connect (dialog, "response",
                           G_CALLBACK (response_cb), NULL);
+
+        g_signal_connect (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
Index: src/gs-job.c
===================================================================
RCS file: /cvs/gnome/gnome-screensaver/src/gs-job.c,v
retrieving revision 1.37
diff -p -u -r1.37 gs-job.c
--- src/gs-job.c	13 Feb 2006 20:56:52 -0000	1.37
+++ src/gs-job.c	30 Mar 2006 19:06:39 -0000
@@ -475,7 +475,15 @@ gs_job_set_widget  (GSJob     *job,
         g_return_if_fail (job != NULL);
         g_return_if_fail (GS_IS_JOB (job));
 
-        job->priv->widget = widget;
+        if (widget != job->priv->widget) {
+                job->priv->widget = widget;
+
+                /* restart job */
+                if (gs_job_is_running (job)) {
+                        gs_job_stop (job);
+                        gs_job_start (job);
+                }
+        }
 }
 
 gboolean
