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,
65 "\tthis.css = new Gtk.CssProvider();",
67 "\tthis.css.load_from_string(\"#project-list { font-size: 12px;}\");",
69 "\tGtk.StyleContext.add_provider_for_display(",
70 "\t\tthis.el.get_display(),",
72 "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
80 "Gtk.CssProvider css" : "",
81 "id" : "project_list",
86 "bool can_unselect" : true,
87 "id" : "projectselection",
92 "bool incremental" : true,
98 "GLib.Type item_type" : "typeof(Project.Project)",
99 "id" : "projectmodel",
100 "xtype" : "ListStore",
102 "(Project.Project p) {",
104 "\tfor (var i =0;i < this.el.n_items; i++ ) {",
105 "\t\tvar pr = (Project.Project) this.el.get_item(i);",
106 "\t\tif (p.path == pr.path) {",
107 "\t\t\tthis.el.remove(i);",
122 "* prop" : "expression",
123 "GLib.Type this_type" : "typeof(Project.Project)",
124 "string property_name" : "name",
125 "xtype" : "PropertyExpression"
128 "xtype" : "StringSorter"
131 "xtype" : "SortListModel"
135 "notify[\"selected\"]" : [
136 "(position, n_items) => {",
138 " if (_this.is_loading) {",
142 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
143 "\t\t_this.btn_delproj.el.hide();",
144 "\t\t_this.btn_projprop.el.hide();",
145 "\t\t_this.btn_addfile.el.hide();",
146 "\t\t//_this.btn_delfile.el.hide();",
149 "\t\t_this.btn_delproj.el.show();",
150 "\t\t_this.btn_projprop.el.show();",
151 "\t\t_this.btn_addfile.el.show();",
152 "\t\t//_this.btn_delfile.el.show(); // ??",
159 " if (_this.is_loading) {",
163 "\t Project.Project project = this.el.selected == Gtk.INVALID_LIST_POSITION ? null :",
164 "\t\t \t(Project.Project) _this.projectsort.el.get_item(this.el.selected);",
166 "\t GLib.debug(\"selection changed to %s\", project == null ? \"none\" : project.name);",
168 " _this.onProjectSelected(project);",
173 "xtype" : "SingleSelection"
177 "* pack" : "append_column",
178 "bool expand" : true,
182 "* prop" : "factory",
187 "\tvar lbl = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();",
189 "\tvar item = (JsRender.JsRender) ((Gtk.ListItem)listitem).get_item();",
191 "\titem.bind_property(\"name\",",
193 " GLib.BindingFlags.SYNC_CREATE);",
201 "\t//var j = (JsRender.JsRender) item;",
202 "\tvar gi = (Gtk.ListItem)item;",
204 "\tvar lbl = new Gtk.Label(\"\");",
205 "\tlbl.halign = Gtk.Align.START;",
206 "\tgi.set_child(lbl);",
214 "xtype" : "SignalListItemFactory"
217 "string title" : "Project",
218 "xtype" : "ColumnViewColumn"
221 "string name" : "project-list",
222 "xtype" : "ColumnView"
225 "xtype" : "ScrolledWindow"
229 "* prop" : "end_child",
230 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
231 "bool visible" : false,
233 "int position" : 200,
237 "* prop" : "end_child",
238 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
239 "bool hexpand" : true,
240 "bool vexpand" : true,
245 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
246 "bool hexpand" : true,
254 "this.css = new Gtk.CssProvider();",
256 "\tthis.css.load_from_data(\"#popover-files-iconsearch { font: 10px monospace;}\".data);",
257 "} catch (Error e) {}",
258 "this.el.get_style_context().add_provider(this.css,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
263 "Gtk.CssProvider css" : "",
264 "bool hexpand" : true,
270 "\t_this.treefilter.el.changed(Gtk.FilterChange.DIFFERENT);",
271 "\t_this.iconsearch.el.set_search(this.el.text);",
276 "string name" : "popover-files-iconsearch",
277 "string placeholder_text" : "type to filter results",
278 "uint search_delay" : 1000,
279 "xtype" : "SearchEntry"
287 " this.el.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);",
290 "bool has_frame" : true,
291 "bool hexpand" : true,
292 "bool vexpand" : true,
304 "(n_press, x, y) => {",
305 "\tif (n_press == 2) {",
306 "\t\tGLib.debug(\"double cliced\");",
310 "\tvar f = (JsRender.JsRender)_this.iconsel.el.selected_item;",
312 "\tGLib.debug(\"Click %s\", f.name);",
313 "\tif (f.xtype == \"Dir\") {",
318 " \t_this.win.windowstate.fileViewOpen(f, _this.new_window);",
319 "\t_this.el.hide();",
328 "xtype" : "GestureClick"
333 "bool can_unselect" : true,
348 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
350 "xtype" : "ListStore",
352 "(JsRender.JsRender p) {",
354 "\tfor (var i =0;i < this.el.n_items; i++ ) {",
355 "\t\tvar pr = (JsRender.JsRender) this.el.get_item(i);",
356 "\t\tif (p.path == pr.path) {",
357 "\t\t\tthis.el.remove(i);",
368 "bool ignore_case" : true,
372 "* prop" : "expression",
373 "GLib.Type this_type" : "typeof(JsRender.JsRender)",
374 "string property_name" : "name",
375 "xtype" : "PropertyExpression"
378 "xtype" : "StringSorter"
381 "xtype" : "SortListModel"
384 "$ Gtk.StringFilterMatchMode match_mode" : "Gtk.StringFilterMatchMode.SUBSTRING",
387 "bool ignore_case" : true,
392 "* prop" : "expression",
393 "GLib.Type this_type" : "typeof(JsRender.JsRender)",
394 "string property_name" : "name",
395 "xtype" : "PropertyExpression"
398 "xtype" : "StringFilter"
401 "xtype" : "FilterListModel"
405 "notify[\"selected\"]" : [
407 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
408 "\t\tif (_this.treeselmodel.el.selected == Gtk.INVALID_LIST_POSITION) {",
409 "\t\t\t_this.btn_delfile.el.hide();",
414 "\t_this.btn_delfile.el.show();",
415 "\t_this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
424 "xtype" : "SingleSelection",
425 "| JsRender.JsRender? selectedFile" : [
428 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
431 "\treturn (JsRender.JsRender)this.el.get_item(this.el.selected); ",
439 "* prop" : "factory",
444 "\tvar box = (Gtk.Box) ((Gtk.ListItem)listitem).get_child();",
446 "\tvar img = (Gtk.Image) box.get_first_child();",
447 "\tvar lbl = (Gtk.Label)img.get_next_sibling();",
449 "\tvar item = (JsRender.JsRender) ((Gtk.ListItem)listitem).get_item();",
450 "\t//GLib.debug(\"set label name to %s\", item.name);",
452 "\tvar ns = item.name.split(\".\");",
453 "\tif (ns.length < 2) {",
454 "\t\tlbl.label = item.name;",
457 "\t\t\titem.name.substring(0, item.name.length - ns[ns.length-1].length)",
458 "\t\t \t + \"\\n\"+ ns[ns.length-1];",
462 "\titem.bind_property(\"name\",",
464 " GLib.BindingFlags.SYNC_CREATE);",
467 " img.set_from_file(item.getIconFileName());",
475 "\t//var j = (JsRender.JsRender) item;",
476 "\tvar gi = (Gtk.ListItem)item;",
477 "\tvar b = new Gtk.Box(Gtk.Orientation.VERTICAL,4);",
478 "\tvar i = new Gtk.Image();",
479 "\ti.pixel_size = 96;",
480 "\tvar t = new Gtk.Label(\"\");",
484 "\tgi.set_child(b);",
485 "\tb.has_tooltip = true;",
486 "\tb.query_tooltip.connect((x, y, keyboard_tooltip, tooltip) => {",
487 "\t\tvar j = (JsRender.JsRender) gi.get_item();",
489 "\t\tvar ti = new Gtk.Image.from_file ( j.getIconFileName());",
490 "\t\tti.pixel_size = 368;",
491 "\t\ttooltip.set_custom( ti );",
500 "xtype" : "SignalListItemFactory"
506 "xtype" : "ScrolledWindow"
513 "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
514 "* prop" : "start_child",
515 "bool has_frame" : true,
516 "bool hexpand" : true,
517 "bool vexpand" : true,
518 "bool visible" : true,
520 "int width_request" : 200,
527 "\tthis.css = new Gtk.CssProvider();",
529 "\tthis.css.load_from_string(\"#file-list { font-size: 12px;}\");",
531 "\tGtk.StyleContext.add_provider_for_display(",
532 "\t\tthis.el.get_display(),",
534 "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
541 "Gtk.CssProvider css" : "",
548 "(n_press, x, y) => {",
549 "\tif (n_press == 2) {",
550 "\t\tGLib.debug(\"double cliced\");",
554 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
555 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
556 "\tvar f = (JsRender.JsRender) tr.item;",
557 "\tGLib.debug(\"Click %s\", f.name);",
558 "\tif (f.xtype == \"Dir\") {",
563 " \t_this.win.windowstate.fileViewOpen(f, _this.new_window);",
565 "\t_this.el.hide();",
573 "xtype" : "GestureClick"
578 "bool can_unselect" : true,
579 "id" : "treeselmodel",
588 "bool incremental" : true,
589 "id" : "treelistsort",
594 "Gtk.TreeListModelCreateModelFunc create_func" : [
596 "\t//GLib.debug(\"liststore got %s\", item.get_type().name());",
597 "\treturn ((JsRender.JsRender)item).childfiles;",
600 "bool autoexpand" : true,
601 "bool passthrough" : false,
602 "id" : "treelistmodel",
607 "GLib.Type item_type" : "typeof(JsRender.JsRender)",
609 "xtype" : "ListStore"
612 "xtype" : "TreeListModel"
621 "bool ignore_case" : true,
625 "* prop" : "expression",
626 "GLib.Type this_type" : "typeof(JsRender.JsRender) ",
627 "string property_name" : "name",
628 "xtype" : "PropertyExpression"
631 "xtype" : "StringSorter"
634 "xtype" : "TreeListRowSorter"
637 "xtype" : "SortListModel"
642 "Gtk.CustomFilterFunc match_func" : [
644 "\tvar tr = ((Gtk.TreeListRow)item).get_item();",
645 "\t//GLib.debug(\"filter %s\", tr.get_type().name());",
646 "\tvar j = (JsRender.JsRender) tr;",
647 "\tif (j.xtype == \"Dir\" && j.childfiles.n_items < 1) {",
650 "\tvar str = _this.searchbox.el.text.down();\t",
651 "\tif (j.xtype == \"Dir\") {",
653 "\t\tif (str.length < 1) {",
654 "\t\t\treturn true;",
656 "\t\tfor (var i =0 ; i < j.childfiles.n_items; i++) {",
657 "\t\t\tvar f = (JsRender.JsRender) j.childfiles.get_item(i);",
658 "\t\t\tif (f.xtype != \"PlainFile\") {",
661 "\t\t\tif (f.name.down().contains(str)) {",
662 "\t\t\t\treturn true;",
667 "\tif (j.xtype != \"PlainFile\") {",
671 "\tif (str.length < 1) {",
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",
751 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
755 "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
756 "\tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
759 "\tvar lbl = (Gtk.Label) expand.child;",
761 "\t if (lbl.label != \"\") { // do not update",
764 "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
765 "\t//GLib.debug(\"LR = %s\", lr.get_type().name());",
768 "\tvar jr =(JsRender.JsRender) lr.get_item();",
769 "\t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
771 "\t if (jr == null) {",
772 "\t\t GLib.debug(\"Problem getting item\"); ",
775 "\t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
776 "\tlbl.label = jr.name; // for dir's we could hsow the sub path..",
777 "\tlbl.tooltip_markup = jr.path;",
779 " expand.set_hide_expander( jr.xtype != \"Dir\" );",
780 " \t expand.set_list_row(lr);",
783 " \t// bind image...",
793 "\tvar expand = new Gtk.TreeExpander();",
795 "\texpand.set_indent_for_depth(true);",
796 "\texpand.set_indent_for_icon(true);",
798 "\tvar lbl = new Gtk.Label(\"\");",
799 "\tlbl.use_markup = true;",
802 " \tlbl.justify = Gtk.Justification.LEFT;",
803 " \tlbl.xalign = 0;",
806 "\texpand.set_child(lbl);",
807 "\t((Gtk.ListItem)listitem).set_child(expand);",
808 "\t((Gtk.ListItem)listitem).activatable = false;",
813 "xtype" : "SignalListItemFactory"
816 "string title" : "General Files",
817 "xtype" : "ColumnViewColumn"
820 "string name" : "file-list",
821 "xtype" : "ColumnView"
824 "xtype" : "ScrolledWindow"
837 "* prop" : "titlebar",
838 "* title" : "Select Project / File",
839 "bool show_title_buttons" : false,
843 "* pack" : "pack_end",
847 "\tif (BuilderApplication.windows.size < 2 && ",
848 "\t\t_this.win.windowstate.file == null",
850 "\t\tBuilderApplication.singleton(null).quit();",
854 "\t_this.el.hide();",
856 "\t if (_this.win.windowstate.file == null) {\t\t ",
857 "\t\tBuilderApplication.removeWindow(_this.win);",
867 "string label" : "Close / Cancel",
872 "* pack" : "pack_start",
873 "id" : "btn_newproj",
876 "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
881 "$ Gtk.IconSize icon_size" : "Gtk.IconSize.NORMAL",
883 "int margin_end" : 4,
884 "string icon_name" : "folder-new",
888 "$ Gtk.Align halign" : "Gtk.Align.START",
890 "string label" : "New Project",
901 " // create a new file in project..",
902 " //Xcls_DialogNewComponent.singleton().show(",
903 " var pe = EditProject.singleton();",
904 " pe.windowstate = _this.win.windowstate;",
906 " pe.el.application = _this.win.el.application;",
907 " pe.el.set_transient_for( _this.el );",
910 " pe.selected.connect((pr) => {",
912 "\t _this.show( pr, _this.new_window);",
927 "* pack" : "pack_start",
928 "id" : "btn_projprop",
933 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
938 "int margin_end" : 4,
939 "string icon_name" : "emblem-system",
944 "string label" : "Project Properties",
954 " // should disable the button really.",
955 " if (_this.selectedProject == null) {",
958 "\t_this.win.windowstate.projectPopoverShow(_this.el, _this.selectedProject);",
966 "* pack" : "pack_start",
967 "DialogConfirm confirm" : "null",
968 "id" : "btn_delproj",
973 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
978 "string icon_name" : "user-trash",
983 "string label" : "Delete Project",
995 " \tif (this.confirm == null) {",
996 " \t\tthis.confirm = new DialogConfirm();",
997 " \t\tthis.confirm.el.set_transient_for(_this.el);",
1000 "\tvar project = (Project.Project) _this.projectsort.el.get_item(",
1001 "\t\t_this.projectselection.el.selected",
1004 "\tthis.confirm.el.response.connect((res) => {",
1005 "\t\tthis.confirm.el.hide();",
1006 "\t\tif (res == Gtk.ResponseType.CANCEL) {",
1009 "\t project = (Project.Project) _this.projectsort.el.get_item(",
1010 "\t\t\t_this.projectselection.el.selected",
1012 "\t\tProject.Project.remove(project);",
1013 "\t _this.projectmodel.remove(project);",
1014 "\t\t_this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION;",
1017 " \tthis.confirm.showIt(\"Confirm Delete Project\", \"Are you sure you want to delete this project?\");",
1025 "* pack" : "pack_start",
1026 "id" : "btn_addfile",
1031 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
1036 "int margin_end" : 4,
1037 "string icon_name" : "document-new",
1042 "string label" : "New File",
1052 " // create a new file in project..",
1053 " print(\"add file selected\\n\");",
1055 " if (_this.selectedProject == null) {",
1059 " \tvar f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, \"\");",
1060 " \t_this.win.windowstate.file_details.show( f, _this.el, _this.new_window );",
1061 " } catch (JsRender.Error e) {}",
1070 "* pack" : "pack_start",
1071 "DialogConfirm confirm" : "null",
1072 "id" : "btn_delfile",
1077 "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
1082 "string icon_name" : "user-trash",
1087 "string label" : "Delete File",
1098 " \tif (this.confirm == null) {",
1099 " \t\tthis.confirm = new DialogConfirm();",
1100 " \t\tthis.confirm.el.set_transient_for(_this.el);",
1103 "\tGLib.debug(\"DELETE\");",
1104 "\tvar is_icon = true;",
1105 " \tvar isel = _this.iconsel.selectedFile();",
1107 " \tif (isel == null) {",
1108 " \t\tGLib.debug(\"DELETE - no icons selected\");",
1109 "\t \tis_icon = false;",
1110 "\t \tisel = _this.treeselmodel.selectedFile();",
1112 " \tif (isel == null) {",
1113 " \t \t\tGLib.debug(\"DELETE - no tree item selected\");",
1114 " \t\treturn; // should nto happen..",
1117 "\tGLib.debug(\"DELETE - calling confirm.\");",
1118 "\tthis.confirm.el.response.connect((res) => {",
1119 "\t\tthis.confirm.el.hide();",
1120 "\t\tif (res == Gtk.ResponseType.CANCEL) {",
1123 "\t\tis_icon = true;",
1124 "\t \tisel = _this.iconsel.selectedFile();",
1125 "\t \tif (isel == null) {",
1126 "\t\t \tis_icon = false;",
1127 "\t\t \tisel = _this.treeselmodel.selectedFile();",
1129 "\t \tif (isel == null) {",
1130 "\t \t\treturn; // should nto happen..",
1133 "\t \tif (is_icon) {",
1134 "\t\t \tisel.project.deleteFile(isel);",
1135 "\t \t\t_this.gridmodel.remove(isel);",
1138 " \t\tisel.project.deleteFile(isel); \t\t",
1141 "\t \tthis.confirm.showIt(\"Confirm Delete File\",",
1142 "\t \t\t\"Are you sure you want to delete this file?\");",
1152 "xtype" : "HeaderBar"
1155 "name" : "DialogFiles",
1156 "string lastfilter" : "",
1157 "title" : "Select Project / File",
1161 " // clear list...",
1164 " _this.is_loading = true;",
1167 " Project.Project.loadAll();",
1168 " _this.project_list.el.set_model(new Gtk.SingleSelection(null));",
1169 " Project.Project.loadIntoStore(this.projectmodel.el);",
1171 "\t_this.project_list.el.set_model(_this.projectselection.el);",
1173 "\t_this.is_loading = false;",
1175 " _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; ",
1176 "\t_this.btn_delfile.el.hide();",
1182 "| void onProjectSelected" : [
1183 "(Project.Project? project) ",
1185 "\tif (this.in_onprojectselected) { ",
1188 "\tthis.selectedProject = project;",
1190 "\tif (project == null) {",
1191 "\t\tGLib.debug(\"Hide project files\");",
1192 "\t\t_this.mainpane.el.set_end_child(null);",
1193 "\t\t_this.filepane.el.hide();",
1198 "\tGLib.debug(\"Show project files\");",
1199 "\t_this.mainpane.el.set_end_child(_this.filepane.el);",
1201 "\t_this.filepane.el.show();\t",
1202 "\tthis.in_onprojectselected = true;",
1206 "\tproject.load();",
1209 "\t_this.searchbox.el.text = \"\";",
1210 "\t _this.gridview.el.set_model(new Gtk.SingleSelection(null));",
1211 "\t _this.selectedProject.loadFilesIntoStore(_this.gridmodel.el);",
1212 "\t _this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
1214 "\t _this.gridview.el.set_model(_this.iconsel.el);",
1217 " \t GLib.Timeout.add(500, () => {",
1218 " \t\t_this.iconsel.el.selected = Gtk.INVALID_LIST_POSITION;",
1219 " \t \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;\t\t ",
1221 "\t _this.searchbox.el.grab_focus();",
1222 "\t\t return false;",
1224 "\t _this.treeview.el.set_model(new Gtk.SingleSelection(null));",
1226 " this.selectedProject.loadDirsIntoStore(_this.treemodel.el);",
1228 " _this.treeview.el.set_model(_this.treeselmodel.el);",
1230 " \t _this.treeselmodel.el.selected = Gtk.INVALID_LIST_POSITION;",
1231 " \tthis.treescroll.el.vadjustment.value = 0;",
1232 "\tthis.in_onprojectselected = false;\t",
1236 "| void selectProject" : [
1237 "(Project.Project? project) {",
1241 "\tvar sm = this.projectselection.el;",
1242 "\tif (project == null) {",
1243 "\t\tsm.selected = Gtk.INVALID_LIST_POSITION;",
1244 "\t\tthis.onProjectSelected(null);",
1249 "\tfor (var i =0; i < sm.n_items; i++) {",
1250 "\t\tvar p = (Project.Project) sm.get_item(i);",
1251 "\t\tif (p.path == project.path) {",
1252 "\t\t\tGLib.debug(\"Select Project %s => %d\", project.name, i);",
1253 "\t\t\tsm.selected = i;",
1262 "(Project.Project? project, bool new_window) {",
1264 " \tthis.new_window = new_window;",
1266 " this.projectscroll.el.vadjustment.value = 0; // scroll to top?",
1269 "\t //var win = this.win.el;",
1270 " //var w = win.get_width();",
1271 " //var h = win.get_height();",
1274 "\t this.el.show();",
1275 "\t \tthis.load();",
1276 "\tthis.selectProject(project);",
1277 "\tthis.onProjectSelected(project); //?? twice?",
1279 "\t GLib.Timeout.add(500, () => {",
1280 "\t \tif (project == null) {",
1281 " \t \t\t_this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION;",
1282 "\t\t\t\tthis.onProjectSelected(null); ",
1285 "\t this.el.set_size_request( 800 , 750); // ?? based on default ",
1293 "name" : "DialogFiles"