seed r237 - trunk/examples/ide



Author: hortont
Date: Tue Nov 11 08:16:07 2008
New Revision: 237
URL: http://svn.gnome.org/viewvc/seed?rev=237&view=rev

Log:
Add IDEWindow subclass (more cleaning!)



Added:
   trunk/examples/ide/ide-window.js

Added: trunk/examples/ide/ide-window.js
==============================================================================
--- (empty file)
+++ trunk/examples/ide/ide-window.js	Tue Nov 11 08:16:07 2008
@@ -0,0 +1,40 @@
+IDEWindowType = {
+    parent: Gtk.Window.type,
+    name: "IDEWindow",
+    class_init: function(klass, prototype)
+    {
+		prototype.update_window_title = function (tab)
+		{
+			var new_filename = tab.header.label.label;
+			
+			if(new_filename != "")
+				this.title = "Seed IDE - " + new_filename;
+			else
+				this.title = "Seed IDE";
+		}
+    },
+    instance_init: function(klass)
+    {
+		this.signal.hide.connect(Gtk.main_quit);
+		
+		this.add_accel_group(init_actions());
+		
+		this.toolbar = new IDEToolbar();
+
+		this.tab_view = new IDETabView();
+
+		this.vbox = new Gtk.VBox();
+		this.vbox.pack_start(this.toolbar);
+		this.vbox.pack_start(this.tab_view, true, true);
+		this.vbox.show();
+
+		this.add(this.vbox);
+		this.resize(700, 700);
+		
+		this.tab_view.create_tab("../ls.js");
+		
+		this.show();
+    }};
+
+IDEWindow = new GType(IDEWindowType);
+



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