Index: data/totem.glade
===================================================================
RCS file: /cvs/gnome/totem/data/totem.glade,v
retrieving revision 1.71
diff -u -r1.71 totem.glade
--- data/totem.glade	22 Dec 2003 02:35:05 -0000	1.71
+++ data/totem.glade	2 Jan 2004 11:46:09 -0000
@@ -267,74 +267,88 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="tmw_zoom_1_2_menu_item">
+			<widget class="GtkMenuItem" id="tmw_zoom_menu_item">
 			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Zoom to half size</property>
-			  <property name="label" translatable="yes">_Zoom 1:2</property>
+			  <property name="label" translatable="yes">Zoom</property>
 			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_zoom_1_2_activate" last_modification_time="Sat, 24 Aug 2002 12:55:50 GMT"/>
-			  <accelerator key="0" modifiers="0" signal="activate"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="tmw_zoom_1_2_menu_item_image">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-zoom-out</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
+			  <signal name="activate" handler="on_zoom1_activate" last_modification_time="Fri, 02 Jan 2004 05:42:04 GMT"/>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="tmw_zoom_1_1_menu_item">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Zoom to one for one size</property>
-			  <property name="label" translatable="yes">Zoom _1:1</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_zoom_1_1_activate" last_modification_time="Sat, 24 Aug 2002 12:49:15 GMT"/>
-			  <accelerator key="1" modifiers="0" signal="activate"/>
+			<widget class="GtkMenu" id="tmw_zoom_menu_item_menu">
 
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="tmw_zoom_1_1_menu_item_image">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-zoom-100</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
+			      <child>
+				<widget class="GtkImageMenuItem" id="tmw_zoom_1_2_menu_item">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Zoom to half size</property>
+				  <property name="label" translatable="yes">_Zoom 1:2</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_zoom_1_2_activate" last_modification_time="Fri, 02 Jan 2004 05:33:53 GMT"/>
+				  <accelerator key="0" modifiers="0" signal="activate"/>
 
-		      <child>
-			<widget class="GtkImageMenuItem" id="tmw_zoom_2_1_menu_item">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Switch to double size</property>
-			  <property name="label" translatable="yes">Zoom _2:1</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="on_zoom_2_1_activate" last_modification_time="Sat, 24 Aug 2002 12:49:15 GMT"/>
-			  <accelerator key="2" modifiers="0" signal="activate"/>
+				  <child internal-child="image">
+				    <widget class="GtkImage" id="tmw_zoom_1_2_menu_item_image">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-zoom-out</property>
+				      <property name="icon_size">1</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
 
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="tmw_zoom_2_1_menu_item_image">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-zoom-in</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
+			      <child>
+				<widget class="GtkImageMenuItem" id="tmw_zoom_1_1_menu_item">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Zoom to one for one size</property>
+				  <property name="label" translatable="yes">Zoom_1:1</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_zoom_1_1_activate" last_modification_time="Fri, 02 Jan 2004 05:32:58 GMT"/>
+				  <accelerator key="1" modifiers="0" signal="activate"/>
+
+				  <child internal-child="image">
+				    <widget class="GtkImage" id="tmw_zoom_1_1_menu_item_image">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-zoom-100</property>
+				      <property name="icon_size">1</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkImageMenuItem" id="tmw_zoom_2_1_menu_item">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Switch to double size</property>
+				  <property name="label" translatable="yes">Zoom_2:1</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_zoom_2_1_activate" last_modification_time="Fri, 02 Jan 2004 05:32:15 GMT"/>
+				  <accelerator key="2" modifiers="0" signal="activate"/>
+
+				  <child internal-child="image">
+				    <widget class="GtkImage" id="tmw_zoom_2_1_menu_item_image">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-zoom-in</property>
+				      <property name="icon_size">1</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
 			    </widget>
 			  </child>
 			</widget>
 		      </child>
-
+		      
 		      <child>
 			<widget class="GtkMenuItem" id="tmw_menu_view_separator_1">
 			  <property name="visible">True</property>
Index: src/bacon-video-widget-gst.c
===================================================================
RCS file: /cvs/gnome/totem/src/bacon-video-widget-gst.c,v
retrieving revision 1.52
diff -u -r1.52 bacon-video-widget-gst.c
--- src/bacon-video-widget-gst.c	23 Dec 2003 15:20:05 -0000	1.52
+++ src/bacon-video-widget-gst.c	2 Jan 2004 11:46:09 -0000
@@ -1148,7 +1148,7 @@
 }
 
 void
-bacon_video_widget_set_scale_ratio (BaconVideoWidget * bvw, gfloat ratio)
+bacon_video_widget_set_scale_ratio (BaconVideoWidget * bvw, gfloat ratio, gboolean resize)
 {
   g_return_if_fail (bvw != NULL);
   g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
Index: src/bacon-video-widget-xine.c
===================================================================
RCS file: /cvs/gnome/totem/src/bacon-video-widget-xine.c,v
retrieving revision 1.87
diff -u -r1.87 bacon-video-widget-xine.c
--- src/bacon-video-widget-xine.c	19 Dec 2003 09:49:49 -0000	1.87
+++ src/bacon-video-widget-xine.c	2 Jan 2004 11:46:10 -0000
@@ -1079,7 +1079,7 @@
 	switch (data->signal)
 	{
 	case RATIO:
-		bacon_video_widget_set_scale_ratio (bvw, 0);
+		bacon_video_widget_set_scale_ratio (bvw, 0, TRUE);
 		break;
 	case TITLE_CHANGE_ASYNC:
 		g_signal_emit (G_OBJECT (bvw),
@@ -2645,8 +2645,8 @@
 	return TRUE;
 }
 
-void
-bacon_video_widget_set_scale_ratio (BaconVideoWidget *bvw, gfloat ratio)
+gboolean
+bacon_video_widget_set_scale_ratio (BaconVideoWidget *bvw, gfloat ratio, gboolean resize)
 {
 	GtkWidget *toplevel, *widget;
 	int new_w, new_h, win_w, win_h;
@@ -2657,7 +2657,7 @@
 	g_return_if_fail (ratio >= 0);
 
 	if (bvw->priv->fullscreen_mode == TRUE)
-		return;
+		return FALSE;
 
 	/* Try best fit for the screen */
 	if (ratio == 0)
@@ -2672,13 +2672,13 @@
 				!= FALSE) {
 			ratio = 0.5;
 		} else {
-			return;
+			return FALSE;
 		}
 	} else {
 		/* don't scale to something bigger than the screen, and leave
 		 * us some room */
 		if (bacon_video_widget_ratio_fits_screen (bvw, ratio) == FALSE)
-			return;
+			return FALSE;
 	}
 
 	widget = GTK_WIDGET (bvw);
@@ -2705,8 +2705,12 @@
 				bvw->priv->video_width * ratio,
 				bvw->priv->video_height * ratio);
 	}
-
-	gtk_window_resize (GTK_WINDOW (toplevel), new_w, new_h);
+	
+	if ((new_w == win_w) && (new_h == win_h))
+		return FALSE;
+	if (resize)
+		gtk_window_resize (GTK_WINDOW (toplevel), new_w, new_h);
+	return TRUE;
 }
 
 int
Index: src/bacon-video-widget.h
===================================================================
RCS file: /cvs/gnome/totem/src/bacon-video-widget.h,v
retrieving revision 1.36
diff -u -r1.36 bacon-video-widget.h
--- src/bacon-video-widget.h	7 Oct 2003 13:59:50 -0000	1.36
+++ src/bacon-video-widget.h	2 Jan 2004 11:46:10 -0000
@@ -186,8 +186,8 @@
 gboolean bacon_video_widget_get_deinterlacing    (BaconVideoWidget *bvw);
 
 void bacon_video_widget_toggle_aspect_ratio      (BaconVideoWidget *bvw);
-void bacon_video_widget_set_scale_ratio          (BaconVideoWidget *bvw,
-						  gfloat ratio);
+gboolean bacon_video_widget_set_scale_ratio	(BaconVideoWidget *bvw,
+						 gfloat ratio, gboolean resize);
 
 int bacon_video_widget_get_video_property        (BaconVideoWidget *bvw,
 						  BaconVideoWidgetVideoProperty
Index: src/totem.c
===================================================================
RCS file: /cvs/gnome/totem/src/totem.c,v
retrieving revision 1.310
diff -u -r1.310 totem.c
--- src/totem.c	29 Dec 2003 14:44:50 -0000	1.310
+++ src/totem.c	2 Jan 2004 11:46:10 -0000
@@ -1011,10 +1011,10 @@
 	bacon_video_widget_toggle_aspect_ratio (totem->bvw);
 }
 
-void
-totem_action_set_scale_ratio (Totem *totem, gfloat ratio)
+gboolean
+totem_action_set_scale_ratio (Totem *totem, gfloat ratio, gboolean resize)
 {
-	bacon_video_widget_set_scale_ratio (totem->bvw, ratio);
+	return bacon_video_widget_set_scale_ratio (totem->bvw, ratio, resize);
 }
 
 static gboolean
@@ -1661,21 +1661,36 @@
 }
 
 static void
+on_zoom1_activate (GtkButton *button, Totem *totem)
+{
+	GtkWidget *item;
+
+	item = glade_xml_get_widget (totem->xml, "tmw_zoom_1_2_menu_item");
+	gtk_widget_set_sensitive (item, totem_action_set_scale_ratio (totem, 0.5									, FALSE));
+
+	item = glade_xml_get_widget (totem->xml, "tmw_zoom_1_1_menu_item");
+	gtk_widget_set_sensitive (item, totem_action_set_scale_ratio (totem, 1, 									FALSE));
+
+	item = glade_xml_get_widget (totem->xml, "tmw_zoom_2_1_menu_item");
+	gtk_widget_set_sensitive (item, totem_action_set_scale_ratio (totem, 2, 									FALSE));
+}  
+
+static gboolean
 on_zoom_1_2_activate (GtkButton *button, Totem *totem)
 {
-	totem_action_set_scale_ratio (totem, 0.5); 
+	return totem_action_set_scale_ratio (totem, 0.5, TRUE); 
 }
 
-static void
+static gboolean
 on_zoom_1_1_activate (GtkButton *button, Totem *totem)
 {
-	totem_action_set_scale_ratio (totem, 1);
+	return totem_action_set_scale_ratio (totem, 1, TRUE);
 }
 
-static void
+static gboolean
 on_zoom_2_1_activate (GtkButton *button, Totem *totem)
 {                       
-	totem_action_set_scale_ratio (totem, 2);
+	return totem_action_set_scale_ratio (totem, 2, TRUE);
 }
 
 
@@ -2691,13 +2706,16 @@
 		break;
 	case GDK_0:
 	case GDK_onehalf:
-		totem_action_set_scale_ratio (totem, 0.5);
+	  	if (!(totem_action_set_scale_ratio (totem, 0.5, TRUE)))
+			g_print("Unable to set 1:2 Zoom with current screen configuration");
 		break;
 	case GDK_1:
-		totem_action_set_scale_ratio (totem, 1);
+		if (!(totem_action_set_scale_ratio (totem, 1, TRUE)))
+			g_print("Unable to set 1:1 Zoom with current screen configuration");
 		break;
 	case GDK_2:
-		totem_action_set_scale_ratio (totem, 2);
+		if (!(totem_action_set_scale_ratio (totem, 2, TRUE)))
+			g_print("Unable to set 2:1 Zoom with current screen configuration");
 		break;
 	case GDK_F10:
 		if (event->state & GDK_SHIFT_MASK)
@@ -3059,7 +3077,10 @@
 			G_CALLBACK (on_play1_activate), totem);
 	item = glade_xml_get_widget (totem->xml, "tmw_fullscreen_menu_item");
 	g_signal_connect (G_OBJECT (item), "activate",
-			G_CALLBACK (on_full_screen1_activate), totem);
+			  G_CALLBACK (on_full_screen1_activate), totem); 
+	item = glade_xml_get_widget (totem->xml, "tmw_zoom_menu_item");
+	g_signal_connect (G_OBJECT (item), "activate",
+			G_CALLBACK (on_zoom1_activate), totem);
 	item = glade_xml_get_widget (totem->xml, "tmw_zoom_1_2_menu_item");
 	g_signal_connect (G_OBJECT (item), "activate",
 			G_CALLBACK (on_zoom_1_2_activate), totem);
Index: src/totem.h
===================================================================
RCS file: /cvs/gnome/totem/src/totem.h,v
retrieving revision 1.10
diff -u -r1.10 totem.h
--- src/totem.h	4 Oct 2003 11:27:33 -0000	1.10
+++ src/totem.h	2 Jan 2004 11:46:10 -0000
@@ -45,7 +45,8 @@
 void	totem_action_play_media			(Totem *totem, MediaType type);
 
 void	totem_action_toggle_aspect_ratio	(Totem *totem);
-void	totem_action_set_scale_ratio		(Totem *totem, gfloat ratio);
+gboolean totem_action_set_scale_ratio	(Totem *totem, gfloat ratio,
+						 gboolean resize);
 void    totem_action_error                      (char *title, char *reason,
 						 Totem *totem);
 
Index: src/vanity.c
===================================================================
RCS file: /cvs/gnome/totem/src/vanity.c,v
retrieving revision 1.10
diff -u -r1.10 vanity.c
--- src/vanity.c	4 Oct 2003 11:27:33 -0000	1.10
+++ src/vanity.c	2 Jan 2004 11:46:11 -0000
@@ -140,7 +140,7 @@
 static void
 vanity_action_set_scale_ratio (Vanity *vanity, gfloat ratio)
 {
-	bacon_video_widget_set_scale_ratio (vanity->bvw, ratio);
+	bacon_video_widget_set_scale_ratio (vanity->bvw, ratio, TRUE);
 }
 
 static void
