[ease] Added -w option for windowed presentations.



commit 394c4315f54bfdee114cab1c3cabbca2d4403200
Author: Nate Stedman <natesm gmail com>
Date:   Fri Jun 11 00:54:42 2010 -0400

    Added -w option for windowed presentations.

 src/Main.vala   |    3 +++
 src/Player.vala |    4 +---
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Main.vala b/src/Main.vala
index 7d44a3a..130bb37 100644
--- a/src/Main.vala
+++ b/src/Main.vala
@@ -36,10 +36,13 @@ public static class Ease.Main : GLib.Object
 	// options
 	static string play_filename;
 	static string[] filenames;
+	public static bool presentation_windowed = false;
 	
 	private const OptionEntry[] options = {
 		{ "play", 'p', 0, OptionArg.FILENAME, ref play_filename,
 		   "Play the specified file", "FILE" },
+		{ "window", 'w', 0, OptionArg.NONE, ref presentation_windowed,
+		  "Display presentations in a window", null},
 		{ "", 0, 0, OptionArg.FILENAME_ARRAY, ref filenames, null, "FILE..." },
 		{ null } };
 	
diff --git a/src/Player.vala b/src/Player.vala
index 658c133..6b1ef91 100644
--- a/src/Player.vala
+++ b/src/Player.vala
@@ -41,7 +41,6 @@ public class Ease.Player : GLib.Object
 	private float scale = 1;
 	
 	// constants
-	private const bool PRESENTATION_FULLSCREEN = false;
 	private const uint FADE_IN_TIME = 1000;
 
 	public Player(Document doc)
@@ -75,7 +74,6 @@ public class Ease.Player : GLib.Object
 		stage.title = "Ease Presentation";
 		stage.use_fog = false;
 		
-		stage.set_fullscreen(PRESENTATION_FULLSCREEN);
 		stage.hide_cursor();
 		
 		stage.show_all();
@@ -101,7 +99,7 @@ public class Ease.Player : GLib.Object
 		align.add(embed);
 
 		// show the window
-		if (PRESENTATION_FULLSCREEN)
+		if (!Main.presentation_windowed)
 		{
 			window.fullscreen();
 		}



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