f-spot r3788 - in trunk: . src



Author: sdelcroix
Date: Wed Mar 26 15:51:24 2008
New Revision: 3788
URL: http://svn.gnome.org/viewvc/f-spot?rev=3788&view=rev

Log:
2008-03-26  Stephane Delcroix  <sdelcroix novell com>

	* src/MainWindow.cs:
	* src/SingleView.cs:
	* src/FullScreenView.cs: Open the fullscreen on the same screen as the
	parent. Original patch from wrobell. Fixes bgo #310933.


Modified:
   trunk/ChangeLog
   trunk/src/FullScreenView.cs
   trunk/src/MainWindow.cs
   trunk/src/SingleView.cs

Modified: trunk/src/FullScreenView.cs
==============================================================================
--- trunk/src/FullScreenView.cs	(original)
+++ trunk/src/FullScreenView.cs	Wed Mar 26 15:51:24 2008
@@ -31,8 +31,16 @@
 		const string SlideShow = "SlideShow";
 		const string Info = "Info";
 		
-		public FullScreenView (IBrowsableCollection collection) : base ("Full Screen Mode")
+		public FullScreenView (IBrowsableCollection collection, Gtk.Window parent) : base ("Full Screen Mode")
 		{
+			//going fullscreen on the same screen the parent window
+			Gdk.Screen screen = Screen;
+			int monitor = screen.GetMonitorAtWindow (parent.GdkWindow);
+			Gdk.Rectangle bounds = screen.GetMonitorGeometry(monitor);
+			Move(bounds.X, 0);
+			SetDefaultSize(bounds.Width, bounds.Height);
+
+
 			string style = "style \"test\" {\n" +
 				"GtkToolbar::shadow_type = GTK_SHADOW_NONE\n" +
 				"}\n" +

Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs	(original)
+++ trunk/src/MainWindow.cs	Wed Mar 26 15:51:24 2008
@@ -2068,7 +2068,7 @@
 	{
 		int active = Math.Max (ActiveIndex (), 0);
 		if (fsview == null) {
-			fsview = new FSpot.FullScreenView (query);
+			fsview = new FSpot.FullScreenView (query, main_window);
 			fsview.Destroyed += HandleFullScreenViewDestroy;
 			fsview.View.Item.Index = active;
 			ColorDialog.SwitchViews (fsview.View);

Modified: trunk/src/SingleView.cs
==============================================================================
--- trunk/src/SingleView.cs	(original)
+++ trunk/src/SingleView.cs	Wed Mar 26 15:51:24 2008
@@ -269,14 +269,7 @@
 
 		private void HandleViewSlideshow (object sender, System.EventArgs args)
 		{
-			if (fsview != null)
-				fsview.Destroy ();
-
-			fsview = new FSpot.FullScreenView (collection);
-			fsview.Destroyed += HandleFullScreenViewDestroy;
-
-			fsview.View.Item.Index = image_view.Item.Index;
-			fsview.Show ();
+			HandleViewFullscreen (sender, args);
 			fsview.PlayPause ();
 		}
 	
@@ -373,7 +366,7 @@
 			if (fsview != null)
 				fsview.Destroy ();
 
-			fsview = new FSpot.FullScreenView (collection);
+			fsview = new FSpot.FullScreenView (collection, window);
 			fsview.Destroyed += HandleFullScreenViewDestroy;
 
 			fsview.View.Item.Index = image_view.Item.Index;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]