2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# Xcls_MainWindow win" : "",
8 "Gdk.Pixbuf missing_thumb_pixbuf" : "",
9 "Gee.HashMap<string,Gdk.Pixbuf> image_cache" : "",
10 "Project.Project selectedProject" : "",
11 "bool in_onprojectselected" : false,
12 "bool is_loading" : false,
14 "bool new_window" : false,
15 "int default_height" : 550,
16 "int default_width" : 1000,
19 "$ homogeneous" : false,
22 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
24 "int margin_bottom" : 10,
25 "int margin_end" : 10,
26 "int margin_start" : 10,
27 "int margin_top" : 10,
31 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
32 "bool hexpand" : true,
38 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
39 "bool hexpand" : true,
40 "bool homogeneous" : false,
41 "bool vexpand" : true,
49 " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
52 "* prop" : "start_child",
54 "bool has_frame" : true,
55 "bool hexpand" : true,
56 "bool vexpand" : true,
57 "id" : "projectscroll",
58 "int width_request" : 150,
63 "Gtk.CssProvider css" : "",
64 "id" : "project_list",
69 "bool can_unselect" : true,
70 "id" : "projectselection",
75 "bool incremental" : true,
81 "GLib.Type item_type" : "typeof(Project.Project)",
82 "id" : "projectmodel",
83 "xtype" : "ListStore",
85 "(Project.Project p) {",
87 "\tfor (var i =0;i < this.el.n_items; i++ ) {",
88 "\t\tvar pr = (Project.Project) this.el.get_item(i);",
89 "\t\tif (p.path == pr.path) {",
90 "\t\t\tthis.el.remove(i);",
105 "* prop" : "expression",
106 "GLib.Type this_type" : "typeof(Project.Project)",
107 "string property_name" : "name",
108 "xtype" : "PropertyExpression"
111 "xtype" : "StringSorter"
114 "xtype" : "SortListModel"
118 "notify[\"selected\"]" : [
119 "(position, n_items) => {",
121 " if (_this.is_loading) {",
125 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
126 "\t\t_this.btn_delproj.el.hide();",
127 "\t\t_this.btn_projprop.el.hide();",
128 "\t\t_this.btn_addfile.el.hide();",
129 "\t\t//_this.btn_delfile.el.hide();",
132 "\t\t_this.btn_delproj.el.show();",
133 "\t\t_this.btn_projprop.el.show();",
134 "\t\t_this.btn_addfile.el.show();",
135 "\t\t//_this.btn_delfile.el.show(); // ??",
142 " if (_this.is_loading) {",
146 "\t Project.Project project = this.el.selected == Gtk.INVALID_LIST_POSITION ? null :",
147 "\t\t \t(Project.Project) _this.projectsort.el.get_item(this.el.selected);",
149 "\t GLib.debug(\"selection changed to %s\", project == null ? \"none\" : project.name);",
151 " _this.onProjectSelected(project);",
156 "xtype" : "SingleSelection"
160 "* pack" : "append_column",
161 "bool expand" : true,
165 "* prop" : "factory",
170 "\tvar lbl = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();",
172 "\tvar item = (Project.Project) ((Gtk.ListItem)listitem).get_item();",
174 "\titem.bind_property(\"name\",",
176 " GLib.BindingFlags.SYNC_CREATE);",
184 "\t//var j = (JsRender.JsRender) item;",
185 "\tvar gi = (Gtk.ListItem)item;",
187 "\tvar lbl = new Gtk.Label(\"\");",
188 "\tlbl.halign = Gtk.Align.START;",
189 "\tgi.set_child(lbl);",
197 "xtype" : "SignalListItemFactory"
200 "string title" : "Project",
201 "xtype" : "ColumnViewColumn"
204 "string name" : "project-list",
205 "xtype" : "ColumnView"
208 "xtype" : "ScrolledWindow"
212 "* prop" : "end_child",
213 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
214 "bool visible" : false,
216 "int position" : 200,
220 "* prop" : "end_child",
221 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
222 "bool hexpand" : true,
223 "bool vexpand" : true,
228 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
229 "bool hexpand" : true,
237 "this.css = new Gtk.CssProvider();",
239 "\tthis.css.load_from_data(\"#popover-files-iconsearch { font: 10px monospace;}\".data);",
240 "} catch (Error e) {}",
241 "this.el.get_style_context().add_provider(this.css,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
246 "Gtk.CssProvider css" : "",
247 "bool hexpand" : true,
253 "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
254 "\t_this.iconsearch.el.set_search(this.el.text);",
259 "string name" : "popover-files-iconsearch",
260 "string placeholder_text" : "type to filter results",
261 "uint search_delay" : 1000,
262 "xtype" : "SearchEntry"
270 " this.el.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);",
273 "bool has_frame" : true,
274 "bool hexpand" : true,
275 "bool vexpand" : true,
287 "(n_press, x, y) => {",
288 "\tif (n_press == 2) {",
289 "\t\tGLib.debug(\"double cliced\");",
293 "\tvar f = (JsRender.JsRender)_this.iconsel.el.selected_item;",
295 "\tGLib.debug(\"Click %s\", f.name);",
296 "\tif (f.xtype == \"Dir\") {",
301 " \t_this.win.windowstate.fileViewOpen(f, _this.new_window);",
302 "\t_this.el.hide();",
311 "xtype" : "GestureClick"
316 "bool can_unselect" : true,
331 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
333 "xtype" : "ListStore",
335 "(JsRender.JsRender p) {",
337 "\tfor (var i =0;i < this.el.n_items; i++ ) {",
338 "\t\tvar pr = (JsRender.JsRender) this.el.get_item(i);",
339 "\t\tif (p.path == pr.path) {",
340 "\t\t\tthis.el.remove(i);",
351 "bool ignore_case" : true,
355 "* prop" : "expression",
356 "GLib.Type this_type" : "typeof(JsRender.JsRender)",
357 "string property_name" : "name",
358 "xtype" : "PropertyExpression"
361 "xtype" : "StringSorter"
364 "xtype" : "SortListModel"
367 "$ Gtk.StringFilterMatchMode match_mode" : "Gtk.StringFilterMatchMode.SUBSTRING",
370 "bool ignore_case" : true,
375 "* prop" : "expression",
376 "GLib.Type this_type" : "typeof(JsRender.JsRender)",
377 "string property_name" : "name",
378 "xtype" : "PropertyExpression"
381 "xtype" : "StringFilter"
384 "xtype" : "FilterListModel"
388 "notify[\"selected\"]" : [
390 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
391 "\t\tif (_this.treeselmodel.el.selected == Gtk.INVALID_LIST_POSITION) {",
392 "\t\t\t_this.btn_delfile.el.hide();",
397 "\t_this.btn_delfile.el.show();",
398 "\t_this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
407 "xtype" : "SingleSelection",
408 "| JsRender.JsRender? selectedFile" : [
411 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
414 "\treturn (JsRender.JsRender)this.el.get_item(this.el.selected); ",
422 "* prop" : "factory",
427 "\tvar box = (Gtk.Box) ((Gtk.ListItem)listitem).get_child();",
429 "\tvar img = (Gtk.Image) box.get_first_child();",
430 "\tvar lbl = (Gtk.Label)img.get_next_sibling();",
432 "\tvar item = (JsRender.JsRender) ((Gtk.ListItem)listitem).get_item();",
433 "\t//GLib.debug(\"set label name to %s\", item.name);",
435 "\tvar ns = item.name.split(\".\");",
436 "\tif (ns.length < 2) {",
437 "\t\tlbl.label = item.name;",
440 "\t\t\titem.name.substring(0, item.name.length - ns[ns.length-1].length)",
441 "\t\t \t + \"\\n\"+ ns[ns.length-1];",
445 "\titem.bind_property(\"name\",",
447 " GLib.BindingFlags.SYNC_CREATE);",
450 " img.set_from_file(item.getIconFileName());",
458 "\t//var j = (JsRender.JsRender) item;",
459 "\tvar gi = (Gtk.ListItem)item;",
460 "\tvar b = new Gtk.Box(Gtk.Orientation.VERTICAL,4);",
461 "\tvar i = new Gtk.Image();",
462 "\ti.pixel_size = 96;",
463 "\tvar t = new Gtk.Label(\"\");",
467 "\tgi.set_child(b);",
468 "\tb.has_tooltip = true;",
469 "\tb.query_tooltip.connect((x, y, keyboard_tooltip, tooltip) => {",
470 "\t\tvar j = (JsRender.JsRender) gi.get_item();",
472 "\t\tvar ti = new Gtk.Image.from_file ( j.getIconFileName());",
473 "\t\tti.pixel_size = 368;",
474 "\t\ttooltip.set_custom( ti );",
483 "xtype" : "SignalListItemFactory"
489 "xtype" : "ScrolledWindow"
496 "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
497 "* prop" : "start_child",
498 "bool has_frame" : true,
499 "bool hexpand" : true,
500 "bool vexpand" : true,
501 "bool visible" : true,
503 "int width_request" : 200,
510 "\tthis.css = new Gtk.CssProvider();",
512 "\tthis.css.load_from_string(\"",
513 "#file-list { font-size: 12px;}",
514 "#file-list indent {",
515 "-gtk-icon-size : 2px;",
517 "#file-list indent:nth-last-child(2) {",
522 "\tGtk.StyleContext.add_provider_for_display(",
523 "\t\tthis.el.get_display(),",
525 "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
532 "Gtk.CssProvider css" : "",
539 "(n_press, x, y) => {",
540 "\tif (n_press == 2) {",
541 "\t\tGLib.debug(\"double cliced\");",
545 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
546 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
547 "\tvar f = (JsRender.JsRender) tr.item;",
548 "\tGLib.debug(\"Click %s\", f.name);",
549 "\tif (f.xtype == \"Dir\") {",
554 " \t_this.win.windowstate.fileViewOpen(f, _this.new_window);",
556 "\t_this.el.hide();",
564 "xtype" : "GestureClick"
569 "bool can_unselect" : true,
570 "id" : "treeselmodel",
579 "bool incremental" : true,
580 "id" : "treelistsort",
585 "Gtk.TreeListModelCreateModelFunc create_func" : [
587 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
588 "\treturn ((JsRender.JsRender)item).childfiles;",
591 "bool autoexpand" : true,
592 "bool passthrough" : false,
593 "id" : "treelistmodel",
598 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
600 "xtype" : "ListStore"
603 "xtype" : "TreeListModel"
612 "bool ignore_case" : true,
616 "* prop" : "expression",
617 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
618 "string property_name" : "name",
619 "xtype" : "PropertyExpression"
622 "xtype" : "StringSorter"
625 "xtype" : "TreeListRowSorter"
628 "xtype" : "SortListModel"
633 "Gtk.CustomFilterFunc match_func" : [
635 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
636 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
637 "\tvar j = (JsRender.JsRender) tr;",
638 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
641 "\tvar str = _this.searchbox.el.text.down();\t",
642 "\tif (j.xtype == \"Dir\") {",
645 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
646 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
647 "\t\t\tif (f.xtype != \"PlainFile\") {",
650 "\t\t\tif (f.content_type.contains(\"image\")) {",
653 "\t\t\tif (str.length < 1) {",
654 "\t\t\t\treturn true;",
656 "\t\t\tif (f.name.down().contains(str)) {",
657 "\t\t\t\treturn true;",
664 "\tif (j.xtype != \"PlainFile\") {",
667 " \tif (j.content_type.contains(\"image\")) {",
671 "\tif (str.length < 1) { // no search.",
674 "\tif (j.name.down().contains(str)) {",
682 "xtype" : "CustomFilter"
685 "xtype" : "FilterListModel"
689 "notify[\"selected\"]" : [
691 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
692 "\t\tif (_this.iconsel.el.selected == Gtk.INVALID_LIST_POSITION) {",
693 "\t\t\t_this.btn_delfile.el.hide();",
698 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
699 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
700 "\tvar f = (JsRender.JsRender) tr.item;",
701 "\tif (f.xtype == \"Dir\") {",
702 "\t\t_this.btn_delfile.el.hide();\t",
704 "\t\t_this.btn_delfile.el.show();",
707 "\t_this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
716 "xtype" : "SingleSelection",
717 "| JsRender.JsRender? selectedFile" : [
720 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
723 "\tvar tr = (Gtk.TreeListRow) this.el.selected_item;",
725 "\treturn (JsRender.JsRender) tr.item;",
733 "\t// this.el.set_sorter( new Gtk.StringSorter(",
734 "\t// \tnew Gtk.PropertyExpression(typeof(JsRender.NodeProp), null, \"name\")",
740 "* pack" : "append_column",
741 "bool expand" : true,
742 "bool resizable" : true,
747 "* prop" : "factory",
752 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
756 " \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
757 " \tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
759 " \tvar hbox = (Gtk.Box) expand.child;",
762 "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
763 "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
767 " \t if (lbl.label != \"\") { // do not update",
770 " \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
771 " \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
774 " \tvar jr =(JsRender.JsRender) lr.get_item();",
775 " \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
777 " \t if (jr == null) {",
778 " \t\t GLib.debug(\"Problem getting item\"); ",
782 "\t\tjr.bind_property(\"icon\",",
784 " GLib.BindingFlags.SYNC_CREATE);",
786 " \t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
787 " \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
788 " \tlbl.tooltip_markup = jr.path;",
790 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
791 " \t expand.set_list_row(lr);",
794 " \t// bind image...",
801 "\tvar expand = new Gtk.TreeExpander();",
803 "\texpand.set_indent_for_depth(true);",
804 "\texpand.set_indent_for_icon(true);",
805 "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
806 "\tvar icon = new Gtk.Image();",
807 "\ticon.margin_end = 4;",
808 "\tvar lbl = new Gtk.Label(\"\");",
809 "\tlbl.use_markup = true;",
812 " \tlbl.justify = Gtk.Justification.LEFT;",
813 " \tlbl.xalign = 0;",
815 " \thbox.append(icon);",
816 "\thbox.append(lbl);",
817 "\texpand.set_child(hbox);",
818 "\t((Gtk.ListItem)listitem).set_child(expand);",
819 "\t((Gtk.ListItem)listitem).activatable = false;",
824 "xtype" : "SignalListItemFactory"
827 "string title" : "General Files",
828 "xtype" : "ColumnViewColumn"
831 "string name" : "file-list",
832 "xtype" : "ColumnView"
835 "xtype" : "ScrolledWindow"
848 "* prop" : "titlebar",
849 "* title" : "Select Project / File",
850 "bool show_title_buttons" : false,
854 "* pack" : "pack_end",
858 "\tif (BuilderApplication.windows.size < 2 && ",
859 "\t\t_this.win.windowstate.file == null",
861 "\t\tBuilderApplication.singleton(null).quit();",
865 "\t_this.el.hide();",
867 "\t if (_this.win.windowstate.file == null) {\t\t ",
868 "\t\tBuilderApplication.removeWindow(_this.win);",
878 "string label" : "Close / Cancel",
883 "* pack" : "pack_start",
884 "id" : "btn_newproj",
887 "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
892 "$ Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
894 "int margin_end" : 4,
895 "string icon_name" : "folder-new",
899 "$ Gtk.Align halign" : "Gtk.Align.START",
901 "string label" : "New Project",
912 " // create a new file in project..",
913 " //Xcls_DialogNewComponent.singleton().show(",
914 " var pe = EditProject.singleton();",
915 " pe.windowstate = _this.win.windowstate;",
917 " pe.el.application = _this.win.el.application;",
918 " pe.el.set_transient_for( _this.el );",
920 " var cb = new Project.Callback();",
921 " cb.call.connect((pr) => {",
922 " \t_this.show( pr , _this.new_window);",
932 "| void onCreated" : [
934 "\tvar pe = EditProject.singleton();",
936 "\t_this.show( pe.result , _this.new_window);",
942 "* pack" : "pack_start",
943 "id" : "btn_projprop",
948 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
953 "int margin_end" : 4,
954 "string icon_name" : "emblem-system",
959 "string label" : "Project Properties",
969 " // should disable the button really.",
970 " if (_this.selectedProject == null) {",
973 "\t_this.win.windowstate.projectPopoverShow(_this.el, _this.selectedProject, null);",
981 "* pack" : "pack_start",
982 "DialogConfirm confirm" : "null",
983 "id" : "btn_delproj",
988 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
993 "string icon_name" : "user-trash",
998 "string label" : "Delete Project",
1010 " \tif (this.confirm == null) {",
1011 " \t\tthis.confirm = new DialogConfirm();",
1012 " \t\tthis.confirm.el.set_transient_for(_this.el);",
1015 "\tvar project = (Project.Project) _this.projectsort.el.get_item(",
1016 "\t\t_this.projectselection.el.selected",
1019 "\tthis.confirm.el.response.connect((res) => {",
1020 "\t\tthis.confirm.el.hide();",
1021 "\t\tif (res == Gtk.ResponseType.CANCEL) {",
1024 "\t project = (Project.Project) _this.projectsort.el.get_item(",
1025 "\t\t\t_this.projectselection.el.selected",
1027 "\t\tProject.Project.remove(project);",
1028 "\t _this.projectmodel.remove(project);",
1029 "\t\t_this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION;",
1032 " \tthis.confirm.showIt(\"Confirm Delete Project\", \"Are you sure you want to delete this project?\");",
1040 "* pack" : "pack_start",
1041 "id" : "btn_addfile",
1046 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
1051 "int margin_end" : 4,
1052 "string icon_name" : "document-new",
1057 "string label" : "New File",
1067 " // create a new file in project..",
1068 " print(\"add file selected\\n\");",
1070 " if (_this.selectedProject == null) {",
1074 " \tvar f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, \"\");",
1075 " \t_this.win.windowstate.file_details.show( f, _this.el, _this.new_window );",
1076 " } catch (JsRender.Error e) {}",
1085 "* pack" : "pack_start",
1086 "DialogConfirm confirm" : "null",
1087 "id" : "btn_delfile",
1092 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
1097 "string icon_name" : "user-trash",
1102 "string label" : "Delete File",
1113 " \tif (this.confirm == null) {",
1114 " \t\tthis.confirm = new DialogConfirm();",
1115 " \t\tthis.confirm.el.set_transient_for(_this.el);",
1118 "\tGLib.debug(\"DELETE\");",
1119 "\tvar is_icon = true;",
1120 " \tvar isel = _this.iconsel.selectedFile();",
1122 " \tif (isel == null) {",
1123 " \t\tGLib.debug(\"DELETE - no icons selected\");",
1124 "\t \tis_icon = false;",
1125 "\t \tisel = _this.treeselmodel.selectedFile();",
1127 " \tif (isel == null) {",
1128 " \t \t\tGLib.debug(\"DELETE - no tree item selected\");",
1129 " \t\treturn; // should nto happen..",
1132 "\tGLib.debug(\"DELETE - calling confirm.\");",
1133 "\tthis.confirm.el.response.connect((res) => {",
1134 "\t\tthis.confirm.el.hide();",
1135 "\t\tif (res == Gtk.ResponseType.CANCEL) {",
1138 "\t\tis_icon = true;",
1139 "\t \tisel = _this.iconsel.selectedFile();",
1140 "\t \tif (isel == null) {",
1141 "\t\t \tis_icon = false;",
1142 "\t\t \tisel = _this.treeselmodel.selectedFile();",
1144 "\t \tif (isel == null) {",
1145 "\t \t\treturn; // should nto happen..",
1148 "\t \tif (is_icon) {",
1149 "\t\t \tisel.project.deleteFile(isel);",
1150 "\t \t\t_this.gridmodel.remove(isel);",
1153 " \t\tisel.project.deleteFile(isel); \t\t",
1156 "\t \tthis.confirm.showIt(\"Confirm Delete File\",",
1157 "\t \t\t\"Are you sure you want to delete this file?\");",
1167 "xtype" : "HeaderBar"
1170 "name" : "DialogFiles",
1171 "string lastfilter" : "",
1172 "title" : "Select Project / File",
1179 " _this.is_loading = true;",
1182 " Project.Project.loadAll();",
1183 " _this.project_list.el.set_model(new Gtk.SingleSelection(null));",
1184 " Project.Project.loadIntoStore(this.projectmodel.el);",
1186 "\t_this.project_list.el.set_model(_this.projectselection.el);",
1188 "\t_this.is_loading = false;",
1190 " _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; ",
1191 "\t_this.btn_delfile.el.hide();",
1197 "| void onProjectSelected" : [
1198 "(Project.Project? project) ",
1200 "\tif (this.in_onprojectselected) { ",
1203 "\tthis.selectedProject = project;",
1205 "\tif (project == null) {",
1206 "\t\tGLib.debug(\"Hide project files\");",
1207 "\t\t_this.mainpane.el.set_end_child(null);",
1208 "\t\t_this.filepane.el.hide();",
1213 "\tGLib.debug(\"Show project files\");",
1214 "\t_this.mainpane.el.set_end_child(_this.filepane.el);",
1216 "\t_this.filepane.el.show();\t",
1217 "\tthis.in_onprojectselected = true;",
1221 "\tproject.load();",
1224 "\t_this.searchbox.el.text = \"\";",
1225 "\t _this.gridview.el.set_model(new Gtk.SingleSelection(null));",
1226 "\t _this.selectedProject.loadFilesIntoStore(_this.gridmodel.el);",
1227 "\t _this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
1229 "\t _this.gridview.el.set_model(_this.iconsel.el);",
1232 " \t GLib.Timeout.add(500, () => {",
1233 " \t\t_this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
1234 " \t \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;\t\t ",
1236 "\t _this.searchbox.el.grab_focus();",
1237 "\t\t return false;",
1239 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1241 " this.selectedProject.loadDirsIntoStore(_this.treemodel.el);",
1243 " _this.treeview.el.set_model(_this.treeselmodel.el);",
1245 " \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1246 " \tthis.treescroll.el.vadjustment.value = 0;",
1247 "\tthis.in_onprojectselected = false;\t",
1251 "| void selectProject" : [
1252 "(Project.Project? project) {",
1256 "\tvar sm = this.projectselection.el;",
1257 "\tif (project == null) {",
1258 "\t\tsm.selected = Gtk.INVALID_LIST_POSITION;",
1259 "\t\tthis.onProjectSelected(null);",
1264 "\tfor (var i =0; i < sm.n_items; i++) {",
1265 "\t\tvar p = (Project.Project) sm.get_item(i);",
1266 "\t\tif (p.path == project.path) {",
1267 "\t\t\tGLib.debug(\"Select Project %s => %d\", project.name, i);",
1268 "\t\t\tsm.selected = i;",
1277 "(Project.Project? project, bool new_window) {",
1279 " \tthis.new_window = new_window;",
1281 " this.projectscroll.el.vadjustment.value = 0; // scroll to top?",
1284 "\t //var win = this.win.el;",
1285 " //var w = win.get_width();",
1286 " //var h = win.get_height();",
1289 "\t this.el.show();",
1291 "\tthis.selectProject(project);",
1292 "\tthis.onProjectSelected(project); //?? twice?",
1294 "\t GLib.Timeout.add(500, () => {",
1295 "\t \tif (project == null) {",
1296 " \t \t\t_this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION;",
1297 "\t\t\t\tthis.onProjectSelected(null); ",
1300 "\t this.el.set_size_request( 800 , 750); // ?? based on default ",
1308 "name" : "DialogFiles"