3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
10 console = imports.console;
11 XObject = imports.XObject.XObject;
12 RooProjectProperties=new XObject({
16 // get the active project.
17 var file = this.get('/Window.LeftTree').getActiveFile();
19 this.get('/StandardErrorDialog').show("No file is currently active");
22 var project = this.get('/Window.LeftTree').getActiveFile().project;
24 project.runhtml = project.runhtml || '';
25 this.get('view').el.get_buffer().set_text(project.runhtml, project.runhtml.length);
26 this.get('dbcon').el.set_text(project.dbcon || '');
27 print("project db: " + project.dbcon);
32 delete_event : function (self, event) {
36 response : function (self, response_id) {
43 var buf = this.get('view').el.get_buffer()
47 buf.get_start_iter(s);
50 var str = buf.get_text(s.iter,e.iter,false);
52 // ideally we should syntax check it.. but it's html!?
54 var project = this.get('/Window.LeftTree').getActiveFile().project;
57 project.runhtml = str;
59 project.dbcon = this.get('dbcon').el.get_text();
62 imports.ProjectManager.ProjectManager.saveConfig();
64 // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);
72 pack : function(p,e) {
73 p.el.get_content_area().add(e.el);
79 pack : "pack_start,false,true,3",
85 pack : "pack_start,false,false,0",
86 label : "Database Name"
99 pack : "pack_start,false,false,0",
100 label : "HTML To insert at end of <HEAD>"
103 xtype: Gtk.ScrolledWindow,
104 pack : "pack_end,true,true,0",
107 xtype: GtkSource.View,
126 pack : "add_action_widget,1",
131 pack : "add_action_widget,0",
136 RooProjectProperties.init();
137 XObject.cache['/RooProjectProperties'] = RooProjectProperties;