fix line numbering issues with vala generator - hopefully fixes completion in node...
[roobuilder] / src / Builder4 / DialogFiles.bjs
index bc2d297..647b185 100644 (file)
@@ -1,4 +1,4 @@
-g{
+{
  "build_module" : "builder",
  "gen_extended" : false,
  "items" : [
@@ -64,9 +64,7 @@ g{
             " ",
             "\tthis.css = new Gtk.CssProvider();",
             " ",
-            "\tthis.css.load_from_string(\"",
-            "\t\t#project-list { font-size: 12px;}",
-            "\t\");",
+            "\tthis.css.load_from_string(\"#project-list { font-size: 12px;}\");",
             "",
             "\tGtk.StyleContext.add_provider_for_display(",
             "\t\tthis.el.get_display(),",
@@ -528,15 +526,7 @@ g{
               " ",
               "\tthis.css = new Gtk.CssProvider();",
               " ",
-              "\tthis.css.load_from_string(\"",
-              "#file-list { font-size: 12px;}",
-              "#file-list indent {",
-              "-gtk-icon-size : 2px;",
-              "}",
-              "#file-list indent:nth-last-child(2)  {",
-              "min-width: 24px;",
-              "}",
-              "\");",
+              "\tthis.css.load_from_string(\"#file-list { font-size: 12px;}\");",
               "",
               "\tGtk.StyleContext.add_provider_for_display(",
               "\t\tthis.el.get_display(),",
@@ -758,51 +748,43 @@ g{
                  "listeners" : {
                   "bind" : [
                    "(listitem) => {",
-                   "\t",
                    "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
-                   "                \t",
-                   "            \t",
-                   "            \t",
-                   "        \t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
-                   "    \tvar expand = (Gtk.TreeExpander)  ((Gtk.ListItem)listitem).get_child();",
-                   "    \t  ",
-                   "     \tvar hbox = (Gtk.Box) expand.child;",
+                   "\t",
+                   "\t",
+                   "\t",
+                   "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
+                   "\tvar expand = (Gtk.TreeExpander)  ((Gtk.ListItem)listitem).get_child();",
+                   "\t  ",
                    " ",
+                   "\tvar lbl = (Gtk.Label) expand.child;",
                    "\t",
-                   "\t\tvar img = (Gtk.Image) hbox.get_first_child();",
-                   "\t\tvar lbl = (Gtk.Label) img.get_next_sibling();",
+                   "\t if (lbl.label != \"\") { // do not update",
+                   "\t \treturn;",
+                   " \t}",
+                   "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
+                   "\t//GLib.debug(\"LR = %s\", lr.get_type().name());",
                    "",
+                   "\t",
+                   "\tvar jr =(JsRender.JsRender) lr.get_item();",
+                   "\t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
+                   "\t",
+                   "\t if (jr == null) {",
+                   "\t\t GLib.debug(\"Problem getting item\"); ",
+                   "\t\t return;",
+                   "\t }",
+                   "\t//GLib.debug(\"change  %s to %s\", lbl.label, np.name);",
+                   "\tlbl.label = jr.name; // for dir's we could hsow the sub path..",
+                   "\tlbl.tooltip_markup = jr.path;",
+                   "\t ",
+                   "    expand.set_hide_expander(  jr.xtype != \"Dir\" );",
+                   " \t expand.set_list_row(lr);",
                    " ",
-                   "    \t",
-                   "    \t if (lbl.label != \"\") { // do not update",
-                   "    \t \treturn;",
-                   "     \t}",
-                   "    \tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
-                   "    \t//GLib.debug(\"LR = %s\", lr.get_type().name());",
-                   "    ",
-                   "    \t",
-                   "    \tvar jr =(JsRender.JsRender) lr.get_item();",
-                   "    \t//GLib.debug(\"JR = %s\", jr.get_type().name());\t\t",
-                   "    \t",
-                   "    \t if (jr == null) {",
-                   "    \t\t GLib.debug(\"Problem getting item\"); ",
-                   "    \t\t return;",
-                   "    \t }",
+                   " \t ",
+                   " \t// bind image...",
+                   " \t",
+                   "}",
                    "",
-                   "\t\tjr.bind_property(\"icon\",",
-                   "                img, \"gicon\",",
-                   "               GLib.BindingFlags.SYNC_CREATE);",
                    "",
-                   "    \t//GLib.debug(\"change  %s to %s\", lbl.label, np.name);",
-                   "    \tlbl.label = jr.name; // for dir's we could hsow the sub path..",
-                   "    \tlbl.tooltip_markup = jr.path;",
-                   "    \t ",
-                   "        expand.set_hide_expander(  jr.xtype != \"Dir\" );",
-                   "     \t expand.set_list_row(lr);",
-                   "     ",
-                   "         \t ",
-                   "                 \t// bind image...",
-                   "}",
                    ""
                   ],
                   "setup" : [
@@ -812,9 +794,7 @@ g{
                    "\t ",
                    "\texpand.set_indent_for_depth(true);",
                    "\texpand.set_indent_for_icon(true);",
-                   "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
-                   "\tvar icon = new Gtk.Image();",
-                   "\ticon.margin_end = 4;",
+                   "\t ",
                    "\tvar lbl = new Gtk.Label(\"\");",
                    "\tlbl.use_markup = true;",
                    "\t",
@@ -822,9 +802,8 @@ g{
                    " \tlbl.justify = Gtk.Justification.LEFT;",
                    " \tlbl.xalign = 0;",
                    "",
-                   " \thbox.append(icon);",
-                   "\thbox.append(lbl);",
-                   "\texpand.set_child(hbox);",
+                   " ",
+                   "\texpand.set_child(lbl);",
                    "\t((Gtk.ListItem)listitem).set_child(expand);",
                    "\t((Gtk.ListItem)listitem).activatable = false;",
                    "}",
@@ -1183,9 +1162,12 @@ g{
    "xtype" : "Window",
    "| void load" : [
     "() {",
-    "     // cl list...",
-    "     ",
+    "     // clear list...",
+    "    ",
+    "      ",
     "     _this.is_loading = true;",
+    "         ",
+    "     ",
     "     Project.Project.loadAll();",
     "     _this.project_list.el.set_model(new Gtk.SingleSelection(null));",
     "     Project.Project.loadIntoStore(this.projectmodel.el);",
@@ -1196,6 +1178,8 @@ g{
     "    ",
     "    _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; ",
     "\t_this.btn_delfile.el.hide();",
+    "\t",
+    "  ",
     "}",
     ""
    ],
@@ -1311,4 +1295,4 @@ g{
   }
  ],
  "name" : "DialogFiles"
-}
+}
\ No newline at end of file