[ease/inspector] Fix saving new Documents.



commit c713c6502a09bfa8b6d4d8252383c6f3c102113e
Author: Nate Stedman <natesm gmail com>
Date:   Mon Jun 7 17:45:04 2010 -0400

    Fix saving new Documents.

 src/EditorWindow.vala  |    6 +++---
 src/WelcomeWindow.vala |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/EditorWindow.vala b/src/EditorWindow.vala
index 3166d6f..25792da 100644
--- a/src/EditorWindow.vala
+++ b/src/EditorWindow.vala
@@ -139,12 +139,12 @@ public class Ease.EditorWindow : Gtk.Window
 		
 		// save file
 		main_toolbar.save.clicked.connect(() => {
-			if (document.path == null)
+			if (document.filename == null)
 			{
 				var dialog =
 					new Gtk.FileChooserDialog(_("Save Document"),
 		        	                          null,
-		        	                          Gtk.FileChooserAction.SELECT_FOLDER,
+		        	                          Gtk.FileChooserAction.SAVE,
 		        	                          "gtk-cancel",
 		        	                          Gtk.ResponseType.CANCEL,
 		        	                          "gtk-open",
@@ -152,7 +152,7 @@ public class Ease.EditorWindow : Gtk.Window
 
 				if (dialog.run() == Gtk.ResponseType.ACCEPT)
 				{
-					document.path = dialog.get_filename();
+					document.filename = dialog.get_filename();
 				}
 				else
 				{
diff --git a/src/WelcomeWindow.vala b/src/WelcomeWindow.vala
index 17269ac..fcce850 100644
--- a/src/WelcomeWindow.vala
+++ b/src/WelcomeWindow.vala
@@ -202,6 +202,9 @@ public class Ease.WelcomeWindow : Gtk.Window
 			document.height = (int)y_res.get_value();
 			document.theme = selected_theme;
 			
+			// allocate a temp directory for the new document
+			document.path = Temp.request();
+			
 			// get the master
 			var master = selected_theme.slide_by_title(PREVIEW_ID);
 			



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