[ease] [welcome] Properly hide the welcome window



commit c159c3cfa8eddfb780529be24cbf39c46f998d0c
Author: Nate Stedman <natesm gmail com>
Date:   Sat Aug 7 04:04:40 2010 -0400

    [welcome] Properly hide the welcome window
    
    Hidden when opening a document or creating a new
    document.

 ease/ease-main.vala           |    6 ++++--
 ease/ease-welcome-window.vala |    2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/ease/ease-main.vala b/ease/ease-main.vala
index 763b23a..ae6de00 100644
--- a/ease/ease-main.vala
+++ b/ease/ease-main.vala
@@ -157,7 +157,9 @@ internal class Ease.Main : GLib.Object
 		try
 		{
 			var doc = new Document.from_saved(path);
-			add_window(new EditorWindow(doc));
+			var win = new EditorWindow(doc);
+			add_window(win);
+			win.present();
 		}
 		catch (Error e)
 		{
@@ -176,7 +178,7 @@ internal class Ease.Main : GLib.Object
 			var document = new Document.from_theme(theme, width, height);
 			var editor = new EditorWindow(document);
 			add_window(editor);
-			remove_welcome();
+			editor.present();
 		}
 		catch (Error e)
 		{
diff --git a/ease/ease-welcome-window.vala b/ease/ease-welcome-window.vala
index 3168a65..ad13991 100644
--- a/ease/ease-welcome-window.vala
+++ b/ease/ease-welcome-window.vala
@@ -271,6 +271,7 @@ internal class Ease.WelcomeWindow : Gtk.Window
 	{
 		var filename = Dialogs.open(_("Open Document"), this);
 		if (filename != null) Main.open_file(filename);
+		hide();
 	}
 
 	[CCode (instance_pos = -1)]
@@ -279,6 +280,7 @@ internal class Ease.WelcomeWindow : Gtk.Window
 		Main.new_from_theme(selected_theme,
 		                    (int)x_res.get_value(),
 		                    (int)y_res.get_value());
+		hide();
 	}
 	
 	private void set_resolution_box(int width, int height)



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