[gnome-devel-docs] vala application window: removal of app id



commit d937d9507eb99e0b6a99918f1efd3c6c9fdc8a62
Author: Tiffany Antopolski <tiffany antopolski gmail com>
Date:   Wed May 30 19:56:59 2012 -0400

    vala application window: removal of app id
    
    and no longer subclassing application window.

 platform-demos/C/samples/GtkApplicationWindow.vala |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/platform-demos/C/samples/GtkApplicationWindow.vala b/platform-demos/C/samples/GtkApplicationWindow.vala
index 5be150b..986c172 100644
--- a/platform-demos/C/samples/GtkApplicationWindow.vala
+++ b/platform-demos/C/samples/GtkApplicationWindow.vala
@@ -1,25 +1,11 @@
-/* A window in the Application. */
-public class MyWindow : Gtk.ApplicationWindow {
-
-	/* Constructor */
-	internal MyWindow (MyApplication app) {
-		Object (application: app, title: "Welcome to GNOME");
-	}
-}
-
 /* This is the application. */
 public class MyApplication : Gtk.Application {
-
-	/* Constructor. */
-	internal MyApplication () {
-		Object (application_id: "org.example.MyApplication");
-	}
-
 	/* Override the 'activate' signal of GLib.Application. */
 	protected override void activate () {
-
 		/* Create the window of this application and show it. */
-		new MyWindow (this).show ();
+		var window = Gtk.ApplicationWindow (this);
+		window.title = "Welcome to GNOME";
+		window.show ();
 	}
 }
 



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