[ease/builder] Fix segfault.



commit 320a2a588c4a2440a933fb35f03ec9fbbd9a76ab
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date:   Sat Jul 17 21:28:12 2010 -0500

    Fix segfault.

 data/ui/welcome-window.ui    |    2 +-
 src/ease-document.vala       |    4 ----
 src/ease-welcome-window.vala |    6 ++----
 3 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/welcome-window.ui b/data/ui/welcome-window.ui
index 2f351f1..ed237c7 100644
--- a/data/ui/welcome-window.ui
+++ b/data/ui/welcome-window.ui
@@ -47,7 +47,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="ease_welcome_window_new_document"/>
+            <signal name="clicked" handler="ease_welcome_window_create_new_document"/>
           </object>
           <packing>
             <property name="position">3</property>
diff --git a/src/ease-document.vala b/src/ease-document.vala
index 24e903b..d941f18 100644
--- a/src/ease-document.vala
+++ b/src/ease-document.vala
@@ -65,20 +65,16 @@ public class Ease.Document : SlideSet
 	 */
 	public Document.from_theme(Theme doc_theme, int w, int h) throws GLib.Error
 	{
-		debug ("Creating a new document with a theme.");
 		width = w;
 		height = h;
 		theme = doc_theme;
 		
 		assert (doc_theme != null);
-		debug ("Allocating temp dir");
 		// allocate a temp directory for the new document
 		path = Temp.request();
 		
-		debug ("Copying media");
 		// copy media to the new path
 		doc_theme.copy_media(path);
-		debug ("Getting master");
 		// get the master
 		var master = theme.slide_by_title(DEFAULT_SLIDE);
 		
diff --git a/src/ease-welcome-window.vala b/src/ease-welcome-window.vala
index 9e55871..40a7b23 100644
--- a/src/ease-welcome-window.vala
+++ b/src/ease-welcome-window.vala
@@ -243,7 +243,7 @@ public class Ease.WelcomeWindow : Gtk.Window
 			a.button_press_event.connect ((act, event) =>
                 {
                     if (event.click_count == 2) {
-						new_document ();
+						create_new_document (null);
 					}
 					(act as WelcomeActor).clicked ();
 					selected_theme = (act as WelcomeActor).theme;
@@ -273,9 +273,8 @@ public class Ease.WelcomeWindow : Gtk.Window
 	}
 
 	[CCode (instance_pos = -1)]
-	public void new_document()
+	public void create_new_document (Gtk.Widget? sender)
 	{
-		debug ("Creating a new document.");
 		try
 		{
 			// create a new Document
@@ -285,7 +284,6 @@ public class Ease.WelcomeWindow : Gtk.Window
 			var document = new Document.from_theme(selected_theme,
 												   (int)x_res.get_value(),
 												   (int)y_res.get_value());
-			debug ("Creating an editor window");
 			// create an EditorWindow for the new Document
 			var editor = new EditorWindow(document);
 



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