Fix #8025 - move css to resources
authorAlan <alan@roojs.com>
Thu, 8 Feb 2024 09:51:29 +0000 (17:51 +0800)
committerAlan <alan@roojs.com>
Thu, 8 Feb 2024 09:51:29 +0000 (17:51 +0800)
23 files changed:
.roobuilder.jcfg
debian/changelog
meson.build
pixmaps/Makefile.am [deleted file]
resources/css/roobuilder.css [new file with mode: 0644]
resources/gresources.xml
src/Application.vala
src/Builder4/DialogFiles.bjs
src/Builder4/DialogFiles.vala
src/Builder4/Editor.bjs
src/Builder4/Editor.vala
src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala
src/Builder4/ValaCompileResults.bjs
src/Builder4/ValaCompileResults.vala
src/Builder4/WindowLeftProps.bjs
src/Builder4/WindowLeftProps.vala
src/Builder4/WindowLeftTree.bjs
src/Builder4/WindowLeftTree.vala
src/Builder4/WindowRooView.bjs
src/Builder4/WindowRooView.vala
src/Main.vala
src/Settings.vala [new file with mode: 0644]

index 87db39f..ef31a59 100644 (file)
@@ -68,7 +68,8 @@
                 "src/JsRender/NodeWriter.vala",
                 "src/JsRender/NodeToValaExtended.vala",
                 "src/JsRender/NodeToValaWrapped.vala",
-                "src/Builder4/MainWindow.bjs"
+                "src/Builder4/MainWindow.bjs",
+                "src/Settings.vala"
             ]
         }
     ],
index df43b33..242ab4c 100644 (file)
@@ -2,6 +2,8 @@ roobuilder (5.0.3) UNRELEASED; urgency=medium
 
   * error popups with tree of errors, now default to expanding current file
   * row detection for drag/drop + contect menu replaced with pick/ bounds and row counting (far more reliable)
+  * css moved to resource
+  * editor resize font now centralized and synced on all windows
   
 
  -- Alan <alan@office.roojs.com>  Wed, 07 Feb 2024 09:51:44 +0800
index ecee951..7f59afc 100644 (file)
@@ -78,7 +78,7 @@ gnome.post_install(gtk_update_icon_cache : true)
 
 roobuilder_resources = gnome.compile_resources(
        'roobuilder-resources', 'resources/gresources.xml',
-       source_dir: [ 'resources/glade-icons', 'resources/html', 'resources/data', 'resources/Editors' ],
+       source_dir: [ 'resources/glade-icons', 'resources/html', 'resources/data', 'resources/css', 'resources/Editors' ],
        c_name: 'roobuilder_resources' 
 )
 
@@ -154,6 +154,7 @@ roobuilder_src = files([
    'src/JsRender/NodeToValaExtended.vala',
    'src/JsRender/NodeToValaWrapped.vala',
    'src/Builder4/MainWindow.vala',
+   'src/Settings.vala',
 ])
 
 
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
deleted file mode 100644 (file)
index 14d5f5c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-public_icons_themes =  hicolor
-
-iconsdir = $(datadir)/icons/hicolor
-
-public_icon_dirs = \
-    16x16/apps \
-    22x22/apps \
-    24x24/apps \
-    32x32/apps \
-    48x48/apps
-
-public_icons = \
-    16x16/apps/roobuilder.png \
-    22x22/apps/roobuilder.png \
-    24x24/apps/roobuilder.png \
-    32x32/apps/roobuilder.png \
-    48x48/apps/roobuilder.png
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t
-
-EXTRA_DIST = \
-               $(public_icons)
-
-install-data-hook: update-icon-cache
-uninstall-hook: update-icon-cache
-
-
-
-update-icon-cache:
-       @-if test -z "$(DESTDIR)"; then \
-               echo "Updating Gtk icon cache."; \
-               for theme in $(public_icons_themes); do \
-                       $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
-               done; \
-       else \
-               echo "*** Icon cache not updated.  After (un)install, run this:"; \
-               for theme in $(public_icons_themes); do \
-                       echo "***   $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
-               done; \
-       fi
-
-install-icons:
-       for icon in $(public_icon_dirs); do \
-               mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$$icon; \
-               $(INSTALL_DATA) $(srcdir)/$$icon/roobuilder.png $(DESTDIR)$(datadir)/icons/hicolor/$$icon/roobuilder.png; \
-       done; 
-
-uninstall-icons:
-       -for icon in $(public_icons_dirs); do \
-               rm -f  $(DESTDIR)$(datadir)/icons/hicolor/$$icon/roobuilder.png; \
-       done;
-       
-
-install-data-local: install-icons update-icon-cache
-
-uninstall-local: uninstall-icons update-icon-cache
-
-
diff --git a/resources/css/roobuilder.css b/resources/css/roobuilder.css
new file mode 100644 (file)
index 0000000..efc3dee
--- /dev/null
@@ -0,0 +1,92 @@
+#left-tree-view { 
+    font-size: 12px;
+}      
+
+.drag-over  { 
+    background-color:#88a3bc; 
+}
+.drag-below  {   
+     border-bottom-width: 5px; 
+     border-bottom-style: solid;
+     border-bottom-color: #88a3bc;
+}
+.drag-above  {
+     border-top-width: 5px;
+     border-top-style: solid;
+     border-top-color: #88a3bc;
+}
+.node-err  {
+     border-top-width: 5px;
+     border-top-style: solid;
+     border-top-color: red;
+     border-bottom-width: 5px; 
+     border-bottom-style: solid;
+     border-bottom-color: red;
+}
+.node-warn  {
+     border-top-width: 5px;
+     border-top-style: solid;
+     border-top-color: #ABF4EB;
+     border-bottom-width: 5px; 
+     border-bottom-style: solid;
+     border-bottom-color: #ABF4EB;
+}
+.node-depr  {
+     border-top-width: 5px;
+     border-top-style: solid;
+     border-top-color: #EEA9FF;
+     border-bottom-width: 5px; 
+     border-bottom-style: solid;
+     border-bottom-color: #EEA9FF;
+}
+
+#left-tree-view indent {
+    -gtk-icon-size : 2px;
+}
+#left-tree-view indent:nth-last-child(2)  {
+    min-width: 24px;
+}
+
+
+#project-list { 
+    font-size: 12px;
+}
+
+
+#leftprops-view { 
+    font-size: 12px;
+}
+        
+#leftprops-view  dropdown button { 
+       min-height: 16px;                        
+       outline-offset : 0;
+}
+#leftprops-view cell dropdown label  {
+       padding-top:0px;
+       padding-bottom:0px;
+}
+
+#leftprops-view cell   { 
+       padding-top:2px;
+       padding-bottom:2px;
+}
+
+#leftprops-view cell label,  
+#leftprops-view cell editablelable {
+       padding-top:4px;
+       padding-bottom:4px;
+}
+
+#compile-results-view { 
+    font: 10px monospace ;
+}
+
+#gtkview-search-entry { 
+    font: 10px monospace ;
+}
+#gtkview-view-layout { 
+    background-color: #ccc; 
+}
+#roo-search-entry { 
+    background-color: #ccc; 
+}
\ No newline at end of file
index 1030680..ae81543 100644 (file)
   <gresource prefix="/data">
     <file>roodata.json</file>
   </gresource>
+  <gresource prefix="/css">
+    <file>roobuilder.css</file>
+  </gresource>
   <gresource prefix="/Editors">
   </gresource>
 </gresources>
index dd2c634..a71a68b 100644 (file)
@@ -1,5 +1,5 @@
 
+ /*
        public class AppSettings : Object
        {
 
@@ -46,7 +46,7 @@
 
                
        }
-       
+       */
        
        public static BuilderApplication application = null;
        
                    { "application/x-rootwindow-drop", 0, Target.ROOTWIN }
                };
                */
-               public AppSettings settings = null;
+               //public AppSettings settings = null;
 
 
 
                        
                        
                        configDirectory();
-                       this.settings = AppSettings.factory();  
+               //      this.settings = AppSettings.factory();  
                        var opt_context = new OptionContext ("Application Builder");
                        
                        try {
 
                }
 
+               public static Settings settings;
 
+               protected override void activate () 
+               {
+                       var css = new Gtk.CssProvider();
+                       css.load_from_resource("/css/roobuilder.css");
+                       
+                       
+                       Gtk.StyleContext.add_provider_for_display(
+                               Gdk.Display.get_default(),
+                               css     ,
+                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
+                       );
+                       BuilderApplication.settings = new Settings();
+               
+                       var w = new Xcls_MainWindow();
+                   w.initChildren();
+                       BuilderApplication.addWindow(w);
+                       
+                       // it looks like showall after children causes segfault on ubuntu 14.4
+                       w.windowstate.init();
+               //      w.windowstate.showPopoverFiles(w.open_projects_btn.el, null, false);
+                       w.show();
+               
+               }
                
                public static BuilderApplication  singleton(  string[]? args)
                {
index 1fba75d..880c48b 100644 (file)
          "items" : [
           {
            "$ xns" : "Gtk",
-           "* init" : [
-            "{",
-            " ",
-            "\tthis.css = new Gtk.CssProvider();",
-            " ",
-            "\tthis.css.load_from_string(\"",
-            "\t\t#project-list { font-size: 12px;}",
-            "\t\");",
-            "",
-            "\tGtk.StyleContext.add_provider_for_display(",
-            "\t\tthis.el.get_display(),",
-            "\t\tthis.css,",
-            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            "\t);",
-            "\t\t",
-            "   ",
-            "}",
-            ""
-           ],
            "* prop" : "child",
            "Gtk.CssProvider css" : "",
            "id" : "project_list",
index 318e186..728d4c6 100644 (file)
@@ -67,9 +67,9 @@ public class DialogFiles : Object
                this.el.default_height = 550;
                this.el.default_width = 1000;
                this.el.modal = true;
-               var child_1 = new Xcls_Box2( _this );
+               var child_1 = new Xcls_Box1( _this );
                this.el.child = child_1.el;
-               var child_2 = new Xcls_HeaderBar44( _this );
+               var child_2 = new Xcls_HeaderBar43( _this );
                this.el.titlebar = child_2.el;
        }
 
@@ -195,7 +195,7 @@ public class DialogFiles : Object
         
          
        }
-       public class Xcls_Box2 : Object
+       public class Xcls_Box1 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -205,7 +205,7 @@ public class DialogFiles : Object
                public bool expand;
 
                // ctor
-               public Xcls_Box2(DialogFiles _owner )
+               public Xcls_Box1(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -219,7 +219,7 @@ public class DialogFiles : Object
                        this.el.margin_start = 10;
                        this.el.margin_bottom = 10;
                        this.el.margin_top = 10;
-                       var child_1 = new Xcls_Box3( _this );
+                       var child_1 = new Xcls_Box2( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
                        new Xcls_mainpane( _this );
@@ -228,7 +228,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box3 : Object
+       public class Xcls_Box2 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -237,7 +237,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box3(DialogFiles _owner )
+               public Xcls_Box2(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -339,28 +339,9 @@ public class DialogFiles : Object
 
                        // set gobject values
                        this.el.name = "project-list";
-                       var child_2 = new Xcls_ColumnViewColumn12( _this );
+                       var child_2 = new Xcls_ColumnViewColumn11( _this );
                        child_2.ref();
                        this.el.append_column ( child_2.el  );
-
-                       // init method
-
-                       {
-                        
-                               this.css = new Gtk.CssProvider();
-                        
-                               this.css.load_from_string("
-                                       #project-list { font-size: 12px;}
-                               ");
-                       
-                               Gtk.StyleContext.add_provider_for_display(
-                                       this.el.get_display(),
-                                       this.css,
-                                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                               );
-                                       
-                          
-                       }
                }
 
                // user defined functions
@@ -439,7 +420,7 @@ public class DialogFiles : Object
                        _this = _owner;
                        _this.projectsort = this;
                        new Xcls_projectmodel( _this );
-                       var child_2 = new Xcls_StringSorter10( _this );
+                       var child_2 = new Xcls_StringSorter9( _this );
                        child_2.ref();
                        this.el = new Gtk.SortListModel( _this.projectmodel.el, child_2.el );
 
@@ -486,7 +467,7 @@ public class DialogFiles : Object
                }
        }
 
-       public class Xcls_StringSorter10 : Object
+       public class Xcls_StringSorter9 : Object
        {
                public Gtk.StringSorter el;
                private DialogFiles  _this;
@@ -495,10 +476,10 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_StringSorter10(DialogFiles _owner )
+               public Xcls_StringSorter9(DialogFiles _owner )
                {
                        _this = _owner;
-                       var child_1 = new Xcls_PropertyExpression11( _this );
+                       var child_1 = new Xcls_PropertyExpression10( _this );
                        child_1.ref();
                        this.el = new Gtk.StringSorter( child_1.el );
 
@@ -509,7 +490,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_PropertyExpression11 : Object
+       public class Xcls_PropertyExpression10 : Object
        {
                public Gtk.PropertyExpression el;
                private DialogFiles  _this;
@@ -518,7 +499,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_PropertyExpression11(DialogFiles _owner )
+               public Xcls_PropertyExpression10(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.PropertyExpression( typeof(Project.Project), null, "name" );
@@ -534,7 +515,7 @@ public class DialogFiles : Object
 
 
 
-       public class Xcls_ColumnViewColumn12 : Object
+       public class Xcls_ColumnViewColumn11 : Object
        {
                public Gtk.ColumnViewColumn el;
                private DialogFiles  _this;
@@ -543,10 +524,10 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_ColumnViewColumn12(DialogFiles _owner )
+               public Xcls_ColumnViewColumn11(DialogFiles _owner )
                {
                        _this = _owner;
-                       var child_1 = new Xcls_SignalListItemFactory13( _this );
+                       var child_1 = new Xcls_SignalListItemFactory12( _this );
                        child_1.ref();
                        this.el = new Gtk.ColumnViewColumn( "Project", child_1.el );
 
@@ -558,7 +539,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_SignalListItemFactory13 : Object
+       public class Xcls_SignalListItemFactory12 : Object
        {
                public Gtk.SignalListItemFactory el;
                private DialogFiles  _this;
@@ -567,7 +548,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_SignalListItemFactory13(DialogFiles _owner )
+               public Xcls_SignalListItemFactory12(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.SignalListItemFactory();
@@ -628,7 +609,7 @@ public class DialogFiles : Object
                        // set gobject values
                        this.el.position = 200;
                        this.el.visible = false;
-                       var child_1 = new Xcls_Box15( _this );
+                       var child_1 = new Xcls_Box14( _this );
                        this.el.end_child = child_1.el;
                        new Xcls_treescroll( _this );
                        this.el.start_child = _this.treescroll.el;
@@ -636,7 +617,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box15 : Object
+       public class Xcls_Box14 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -645,7 +626,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box15(DialogFiles _owner )
+               public Xcls_Box14(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -655,7 +636,7 @@ public class DialogFiles : Object
                        // set gobject values
                        this.el.hexpand = true;
                        this.el.vexpand = true;
-                       var child_1 = new Xcls_Box16( _this );
+                       var child_1 = new Xcls_Box15( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
                        new Xcls_iconscroll( _this );
@@ -664,7 +645,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box16 : Object
+       public class Xcls_Box15 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -673,7 +654,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box16(DialogFiles _owner )
+               public Xcls_Box15(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -781,21 +762,21 @@ public class DialogFiles : Object
                        _this = _owner;
                        _this.gridview = this;
                        new Xcls_iconsel( _this );
-                       var child_2 = new Xcls_SignalListItemFactory29( _this );
+                       var child_2 = new Xcls_SignalListItemFactory28( _this );
                        child_2.ref();
                        this.el = new Gtk.GridView( _this.iconsel.el, child_2.el );
 
                        // my vars (dec)
 
                        // set gobject values
-                       var child_3 = new Xcls_GestureClick20( _this );
+                       var child_3 = new Xcls_GestureClick19( _this );
                        child_3.ref();
                        this.el.add_controller(  child_3.el );
                }
 
                // user defined functions
        }
-       public class Xcls_GestureClick20 : Object
+       public class Xcls_GestureClick19 : Object
        {
                public Gtk.GestureClick el;
                private DialogFiles  _this;
@@ -804,7 +785,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_GestureClick20(DialogFiles _owner )
+               public Xcls_GestureClick19(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.GestureClick();
@@ -853,7 +834,7 @@ public class DialogFiles : Object
                {
                        _this = _owner;
                        _this.iconsel = this;
-                       var child_1 = new Xcls_FilterListModel22( _this );
+                       var child_1 = new Xcls_FilterListModel21( _this );
                        child_1.ref();
                        this.el = new Gtk.SingleSelection( child_1.el );
 
@@ -889,7 +870,7 @@ public class DialogFiles : Object
                 
                }
        }
-       public class Xcls_FilterListModel22 : Object
+       public class Xcls_FilterListModel21 : Object
        {
                public Gtk.FilterListModel el;
                private DialogFiles  _this;
@@ -898,7 +879,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_FilterListModel22(DialogFiles _owner )
+               public Xcls_FilterListModel21(DialogFiles _owner )
                {
                        _this = _owner;
                        new Xcls_gridsort( _this );
@@ -926,7 +907,7 @@ public class DialogFiles : Object
                        _this = _owner;
                        _this.gridsort = this;
                        new Xcls_gridmodel( _this );
-                       var child_2 = new Xcls_StringSorter25( _this );
+                       var child_2 = new Xcls_StringSorter24( _this );
                        child_2.ref();
                        this.el = new Gtk.SortListModel( _this.gridmodel.el, child_2.el );
 
@@ -971,7 +952,7 @@ public class DialogFiles : Object
                }
        }
 
-       public class Xcls_StringSorter25 : Object
+       public class Xcls_StringSorter24 : Object
        {
                public Gtk.StringSorter el;
                private DialogFiles  _this;
@@ -980,10 +961,10 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_StringSorter25(DialogFiles _owner )
+               public Xcls_StringSorter24(DialogFiles _owner )
                {
                        _this = _owner;
-                       var child_1 = new Xcls_PropertyExpression26( _this );
+                       var child_1 = new Xcls_PropertyExpression25( _this );
                        child_1.ref();
                        this.el = new Gtk.StringSorter( child_1.el );
 
@@ -995,7 +976,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_PropertyExpression26 : Object
+       public class Xcls_PropertyExpression25 : Object
        {
                public Gtk.PropertyExpression el;
                private DialogFiles  _this;
@@ -1004,7 +985,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_PropertyExpression26(DialogFiles _owner )
+               public Xcls_PropertyExpression25(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender), null, "name" );
@@ -1032,7 +1013,7 @@ public class DialogFiles : Object
                {
                        _this = _owner;
                        _this.iconsearch = this;
-                       var child_1 = new Xcls_PropertyExpression28( _this );
+                       var child_1 = new Xcls_PropertyExpression27( _this );
                        child_1.ref();
                        this.el = new Gtk.StringFilter( child_1.el );
 
@@ -1045,7 +1026,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_PropertyExpression28 : Object
+       public class Xcls_PropertyExpression27 : Object
        {
                public Gtk.PropertyExpression el;
                private DialogFiles  _this;
@@ -1054,7 +1035,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_PropertyExpression28(DialogFiles _owner )
+               public Xcls_PropertyExpression27(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender), null, "name" );
@@ -1070,7 +1051,7 @@ public class DialogFiles : Object
 
 
 
-       public class Xcls_SignalListItemFactory29 : Object
+       public class Xcls_SignalListItemFactory28 : Object
        {
                public Gtk.SignalListItemFactory el;
                private DialogFiles  _this;
@@ -1079,7 +1060,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_SignalListItemFactory29(DialogFiles _owner )
+               public Xcls_SignalListItemFactory28(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.SignalListItemFactory();
@@ -1203,7 +1184,7 @@ public class DialogFiles : Object
 
                        // set gobject values
                        this.el.name = "file-list";
-                       var child_2 = new Xcls_GestureClick32( _this );
+                       var child_2 = new Xcls_GestureClick31( _this );
                        child_2.ref();
                        this.el.add_controller(  child_2.el );
                        new Xcls_name( _this );
@@ -1236,7 +1217,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_GestureClick32 : Object
+       public class Xcls_GestureClick31 : Object
        {
                public Gtk.GestureClick el;
                private DialogFiles  _this;
@@ -1245,7 +1226,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_GestureClick32(DialogFiles _owner )
+               public Xcls_GestureClick31(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.GestureClick();
@@ -1295,7 +1276,7 @@ public class DialogFiles : Object
                {
                        _this = _owner;
                        _this.treeselmodel = this;
-                       var child_1 = new Xcls_FilterListModel34( _this );
+                       var child_1 = new Xcls_FilterListModel33( _this );
                        child_1.ref();
                        this.el = new Gtk.SingleSelection( child_1.el );
 
@@ -1339,7 +1320,7 @@ public class DialogFiles : Object
                        return  (JsRender.JsRender) tr.item;
                }
        }
-       public class Xcls_FilterListModel34 : Object
+       public class Xcls_FilterListModel33 : Object
        {
                public Gtk.FilterListModel el;
                private DialogFiles  _this;
@@ -1348,7 +1329,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_FilterListModel34(DialogFiles _owner )
+               public Xcls_FilterListModel33(DialogFiles _owner )
                {
                        _this = _owner;
                        new Xcls_treelistsort( _this );
@@ -1376,7 +1357,7 @@ public class DialogFiles : Object
                        _this = _owner;
                        _this.treelistsort = this;
                        new Xcls_treelistmodel( _this );
-                       var child_2 = new Xcls_TreeListRowSorter38( _this );
+                       var child_2 = new Xcls_TreeListRowSorter37( _this );
                        child_2.ref();
                        this.el = new Gtk.SortListModel( _this.treelistmodel.el, child_2.el );
 
@@ -1438,7 +1419,7 @@ public class DialogFiles : Object
        }
 
 
-       public class Xcls_TreeListRowSorter38 : Object
+       public class Xcls_TreeListRowSorter37 : Object
        {
                public Gtk.TreeListRowSorter el;
                private DialogFiles  _this;
@@ -1447,10 +1428,10 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_TreeListRowSorter38(DialogFiles _owner )
+               public Xcls_TreeListRowSorter37(DialogFiles _owner )
                {
                        _this = _owner;
-                       var child_1 = new Xcls_StringSorter39( _this );
+                       var child_1 = new Xcls_StringSorter38( _this );
                        child_1.ref();
                        this.el = new Gtk.TreeListRowSorter( child_1.el );
 
@@ -1461,7 +1442,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_StringSorter39 : Object
+       public class Xcls_StringSorter38 : Object
        {
                public Gtk.StringSorter el;
                private DialogFiles  _this;
@@ -1470,10 +1451,10 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_StringSorter39(DialogFiles _owner )
+               public Xcls_StringSorter38(DialogFiles _owner )
                {
                        _this = _owner;
-                       var child_1 = new Xcls_PropertyExpression40( _this );
+                       var child_1 = new Xcls_PropertyExpression39( _this );
                        child_1.ref();
                        this.el = new Gtk.StringSorter( child_1.el );
 
@@ -1485,7 +1466,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_PropertyExpression40 : Object
+       public class Xcls_PropertyExpression39 : Object
        {
                public Gtk.PropertyExpression el;
                private DialogFiles  _this;
@@ -1494,7 +1475,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_PropertyExpression40(DialogFiles _owner )
+               public Xcls_PropertyExpression39(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.PropertyExpression( typeof(JsRender.JsRender) , null, "name" );
@@ -1593,7 +1574,7 @@ public class DialogFiles : Object
                {
                        _this = _owner;
                        _this.name = this;
-                       var child_1 = new Xcls_SignalListItemFactory43( _this );
+                       var child_1 = new Xcls_SignalListItemFactory42( _this );
                        child_1.ref();
                        this.el = new Gtk.ColumnViewColumn( "General Files", child_1.el );
 
@@ -1616,7 +1597,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_SignalListItemFactory43 : Object
+       public class Xcls_SignalListItemFactory42 : Object
        {
                public Gtk.SignalListItemFactory el;
                private DialogFiles  _this;
@@ -1625,7 +1606,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_SignalListItemFactory43(DialogFiles _owner )
+               public Xcls_SignalListItemFactory42(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.SignalListItemFactory();
@@ -1714,7 +1695,7 @@ public class DialogFiles : Object
 
 
 
-       public class Xcls_HeaderBar44 : Object
+       public class Xcls_HeaderBar43 : Object
        {
                public Gtk.HeaderBar el;
                private DialogFiles  _this;
@@ -1723,7 +1704,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_HeaderBar44(DialogFiles _owner )
+               public Xcls_HeaderBar43(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.HeaderBar();
@@ -1732,7 +1713,7 @@ public class DialogFiles : Object
 
                        // set gobject values
                        this.el.show_title_buttons = false;
-                       var child_1 = new Xcls_Button45( _this );
+                       var child_1 = new Xcls_Button44( _this );
                        child_1.ref();
                        this.el.pack_end ( child_1.el  );
                        new Xcls_btn_newproj( _this );
@@ -1749,7 +1730,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Button45 : Object
+       public class Xcls_Button44 : Object
        {
                public Gtk.Button el;
                private DialogFiles  _this;
@@ -1758,7 +1739,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Button45(DialogFiles _owner )
+               public Xcls_Button44(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Button();
@@ -1810,7 +1791,7 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box47( _this );
+                       var child_1 = new Xcls_Box46( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -1842,7 +1823,7 @@ public class DialogFiles : Object
                        _this.show(  pe.result , _this.new_window);
                }
        }
-       public class Xcls_Box47 : Object
+       public class Xcls_Box46 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -1851,7 +1832,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box47(DialogFiles _owner )
+               public Xcls_Box46(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -1859,17 +1840,17 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Image48( _this );
+                       var child_1 = new Xcls_Image47( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
-                       var child_2 = new Xcls_Label49( _this );
+                       var child_2 = new Xcls_Label48( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Image48 : Object
+       public class Xcls_Image47 : Object
        {
                public Gtk.Image el;
                private DialogFiles  _this;
@@ -1878,7 +1859,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image48(DialogFiles _owner )
+               public Xcls_Image47(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -1894,7 +1875,7 @@ public class DialogFiles : Object
                // user defined functions
        }
 
-       public class Xcls_Label49 : Object
+       public class Xcls_Label48 : Object
        {
                public Gtk.Label el;
                private DialogFiles  _this;
@@ -1903,7 +1884,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label49(DialogFiles _owner )
+               public Xcls_Label48(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "New Project" );
@@ -1937,7 +1918,7 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box51( _this );
+                       var child_1 = new Xcls_Box50( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -1952,7 +1933,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box51 : Object
+       public class Xcls_Box50 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -1961,7 +1942,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box51(DialogFiles _owner )
+               public Xcls_Box50(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -1969,17 +1950,17 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Image52( _this );
+                       var child_1 = new Xcls_Image51( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
-                       var child_2 = new Xcls_Label53( _this );
+                       var child_2 = new Xcls_Label52( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Image52 : Object
+       public class Xcls_Image51 : Object
        {
                public Gtk.Image el;
                private DialogFiles  _this;
@@ -1988,7 +1969,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image52(DialogFiles _owner )
+               public Xcls_Image51(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -2003,7 +1984,7 @@ public class DialogFiles : Object
                // user defined functions
        }
 
-       public class Xcls_Label53 : Object
+       public class Xcls_Label52 : Object
        {
                public Gtk.Label el;
                private DialogFiles  _this;
@@ -2012,7 +1993,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label53(DialogFiles _owner )
+               public Xcls_Label52(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "Project Properties" );
@@ -2047,7 +2028,7 @@ public class DialogFiles : Object
                        this.confirm = null;
 
                        // set gobject values
-                       var child_1 = new Xcls_Box55( _this );
+                       var child_1 = new Xcls_Box54( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -2082,7 +2063,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box55 : Object
+       public class Xcls_Box54 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -2091,7 +2072,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box55(DialogFiles _owner )
+               public Xcls_Box54(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -2099,17 +2080,17 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Image56( _this );
+                       var child_1 = new Xcls_Image55( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
-                       var child_2 = new Xcls_Label57( _this );
+                       var child_2 = new Xcls_Label56( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Image56 : Object
+       public class Xcls_Image55 : Object
        {
                public Gtk.Image el;
                private DialogFiles  _this;
@@ -2118,7 +2099,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image56(DialogFiles _owner )
+               public Xcls_Image55(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -2132,7 +2113,7 @@ public class DialogFiles : Object
                // user defined functions
        }
 
-       public class Xcls_Label57 : Object
+       public class Xcls_Label56 : Object
        {
                public Gtk.Label el;
                private DialogFiles  _this;
@@ -2141,7 +2122,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label57(DialogFiles _owner )
+               public Xcls_Label56(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "Delete Project" );
@@ -2174,7 +2155,7 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box59( _this );
+                       var child_1 = new Xcls_Box58( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -2195,7 +2176,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box59 : Object
+       public class Xcls_Box58 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -2204,7 +2185,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box59(DialogFiles _owner )
+               public Xcls_Box58(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -2212,17 +2193,17 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Image60( _this );
+                       var child_1 = new Xcls_Image59( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
-                       var child_2 = new Xcls_Label61( _this );
+                       var child_2 = new Xcls_Label60( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Image60 : Object
+       public class Xcls_Image59 : Object
        {
                public Gtk.Image el;
                private DialogFiles  _this;
@@ -2231,7 +2212,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image60(DialogFiles _owner )
+               public Xcls_Image59(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -2246,7 +2227,7 @@ public class DialogFiles : Object
                // user defined functions
        }
 
-       public class Xcls_Label61 : Object
+       public class Xcls_Label60 : Object
        {
                public Gtk.Label el;
                private DialogFiles  _this;
@@ -2255,7 +2236,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label61(DialogFiles _owner )
+               public Xcls_Label60(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "New File" );
@@ -2290,7 +2271,7 @@ public class DialogFiles : Object
                        this.confirm = null;
 
                        // set gobject values
-                       var child_1 = new Xcls_Box63( _this );
+                       var child_1 = new Xcls_Box62( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -2349,7 +2330,7 @@ public class DialogFiles : Object
 
                // user defined functions
        }
-       public class Xcls_Box63 : Object
+       public class Xcls_Box62 : Object
        {
                public Gtk.Box el;
                private DialogFiles  _this;
@@ -2358,7 +2339,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box63(DialogFiles _owner )
+               public Xcls_Box62(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -2366,17 +2347,17 @@ public class DialogFiles : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Image64( _this );
+                       var child_1 = new Xcls_Image63( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
-                       var child_2 = new Xcls_Label65( _this );
+                       var child_2 = new Xcls_Label64( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Image64 : Object
+       public class Xcls_Image63 : Object
        {
                public Gtk.Image el;
                private DialogFiles  _this;
@@ -2385,7 +2366,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image64(DialogFiles _owner )
+               public Xcls_Image63(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -2399,7 +2380,7 @@ public class DialogFiles : Object
                // user defined functions
        }
 
-       public class Xcls_Label65 : Object
+       public class Xcls_Label64 : Object
        {
                public Gtk.Label el;
                private DialogFiles  _this;
@@ -2408,7 +2389,7 @@ public class DialogFiles : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label65(DialogFiles _owner )
+               public Xcls_Label64(DialogFiles _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "Delete File" );
index 51641c3..de4f6cb 100644 (file)
        "* ctor" : "new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL,6, 30, 1)",
        "* init" : [
         "{",
-        "\tthis.el.set_range(6,30);",
-        "\tthis.el.set_value(8);",
+        "\t//this.el.set_range(6,30);",
+        " \tthis.el.set_value ( BuilderApplication.settings.editor_font_size);",
+        " \tBuilderApplication.settings.editor_font_size_updated.connect(",
+        " \t\t() => {",
+        " \t\t\tBuilderApplication.settings.editor_font_size_inchange = true;",
+        " \t\t\tGLib.debug(\"update range\");",
+        " \t\t \tthis.el.set_value (BuilderApplication.settings.editor_font_size);",
+        " \t\t \tBuilderApplication.settings.editor_font_size_inchange = false;",
+        " \t\t}",
+        "\t);",
+        "\t",
+        " ",
         "}",
         ""
        ],
        "listeners" : {
         "change_value" : [
          "(st, val ) => {",
-         "\t ",
-         "\t   ",
-         "\t  _this.view.css.load_from_string(",
-         "\t  \t\t\"#editor-view { font: %dpx monospace; }\".printf((int)val)",
-         "\t   );",
-         "     ",
+         "\tif (BuilderApplication.settings.editor_font_size_inchange) {",
+         "\t\treturn false;",
+         "\t}",
+         "  \tBuilderApplication.settings.editor_font_size = val;",
          " \treturn false;",
          "}"
         ]
        "$ xns" : "GtkSource",
        "* init" : [
         "",
-        "",
-        "this.css = new Gtk.CssProvider();",
-        "",
-        "this.css.load_from_string(",
-        "\t\"#editor-view { font:  12px monospace;}\"",
-        ");",
         " ",
-        "Gtk.StyleContext.add_provider_for_display(",
-        "\tthis.el.get_display(),",
-        "\tthis.css,",
-        "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-        ");",
         "\t",
         " ",
         " ",
        "bool vexpand" : true,
        "boolean show_line_marks" : true,
        "boolean show_line_numbers" : true,
+       "css_classes" : "{ \"code-editor\" }",
        "gboolean highlight_current_line" : true,
        "id" : "view",
        "indent_width" : 4,
index 2f4a1f2..e9c403c 100644 (file)
@@ -63,12 +63,12 @@ public class Editor : Object
                this.el.homogeneous = false;
                this.el.hexpand = true;
                this.el.vexpand = true;
-               var child_1 = new Xcls_Box2( _this );
+               var child_1 = new Xcls_Box1( _this );
                child_1.ref();
                this.el.append( child_1.el );
                new Xcls_RightEditor( _this );
                this.el.append( _this.RightEditor.el );
-               var child_3 = new Xcls_Box12( _this );
+               var child_3 = new Xcls_Box11( _this );
                child_3.ref();
                this.el.append ( child_3.el  );
        }
@@ -384,7 +384,7 @@ public class Editor : Object
                        return false;
                });   
        }
-       public class Xcls_Box2 : Object
+       public class Xcls_Box1 : Object
        {
                public Gtk.Box el;
                private Editor  _this;
@@ -393,7 +393,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box2(Editor _owner )
+               public Xcls_Box1(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -405,10 +405,10 @@ public class Editor : Object
                        this.el.hexpand = true;
                        new Xcls_save_button( _this );
                        this.el.append( _this.save_button.el );
-                       var child_2 = new Xcls_Label4( _this );
+                       var child_2 = new Xcls_Label3( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
-                       var child_3 = new Xcls_Scale5( _this );
+                       var child_3 = new Xcls_Scale4( _this );
                        child_3.ref();
                        this.el.append( child_3.el );
                        new Xcls_close_btn( _this );
@@ -446,7 +446,7 @@ public class Editor : Object
                // user defined functions
        }
 
-       public class Xcls_Label4 : Object
+       public class Xcls_Label3 : Object
        {
                public Gtk.Label el;
                private Editor  _this;
@@ -455,7 +455,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label4(Editor _owner )
+               public Xcls_Label3(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( null );
@@ -469,7 +469,7 @@ public class Editor : Object
                // user defined functions
        }
 
-       public class Xcls_Scale5 : Object
+       public class Xcls_Scale4 : Object
        {
                public Gtk.Scale el;
                private Editor  _this;
@@ -478,7 +478,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Scale5(Editor _owner )
+               public Xcls_Scale4(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL,6, 30, 1);
@@ -495,18 +495,26 @@ public class Editor : Object
                        // init method
 
                        {
-                               this.el.set_range(6,30);
-                               this.el.set_value(8);
+                               //this.el.set_range(6,30);
+                               this.el.set_value ( BuilderApplication.settings.editor_font_size);
+                               BuilderApplication.settings.editor_font_size_updated.connect(
+                                       () => {
+                                               BuilderApplication.settings.editor_font_size_inchange = true;
+                                               GLib.debug("update range");
+                                               this.el.set_value (BuilderApplication.settings.editor_font_size);
+                                               BuilderApplication.settings.editor_font_size_inchange = false;
+                                       }
+                               );
+                               
+                        
                        }
 
                        //listeners
                        this.el.change_value.connect( (st, val ) => {
-                                
-                                  
-                                 _this.view.css.load_from_string(
-                                               "#editor-view { font: %dpx monospace; }".printf((int)val)
-                                  );
-                            
+                               if (BuilderApplication.settings.editor_font_size_inchange) {
+                                       return false;
+                               }
+                               BuilderApplication.settings.editor_font_size = val;
                                return false;
                        });
                }
@@ -533,7 +541,7 @@ public class Editor : Object
 
                        // set gobject values
                        this.el.icon_name = "window-close";
-                       var child_1 = new Xcls_Image7( _this );
+                       var child_1 = new Xcls_Image6( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -545,7 +553,7 @@ public class Editor : Object
 
                // user defined functions
        }
-       public class Xcls_Image7 : Object
+       public class Xcls_Image6 : Object
        {
                public Gtk.Image el;
                private Editor  _this;
@@ -554,7 +562,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Image7(Editor _owner )
+               public Xcls_Image6(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Image();
@@ -628,30 +636,17 @@ public class Editor : Object
                        this.el.hexpand = true;
                        this.el.vexpand = true;
                        this.el.has_tooltip = true;
+                       this.el.css_classes = { "code-editor" };
                        this.el.tab_width = 4;
                        this.el.highlight_current_line = true;
                        new Xcls_buffer( _this );
                        this.el.buffer = _this.buffer.el;
-                       var child_2 = new Xcls_EventControllerKey11( _this );
+                       var child_2 = new Xcls_EventControllerKey10( _this );
                        child_2.ref();
                        this.el.add_controller(  child_2.el );
 
                        // init method
 
-                       this.css = new Gtk.CssProvider();
-                       
-                       this.css.load_from_string(
-                               "#editor-view { font:  12px monospace;}"
-                       );
-                        
-                       Gtk.StyleContext.add_provider_for_display(
-                               this.el.get_display(),
-                               this.css,
-                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                       );
-                               
-                        
-                        
                        this.el.completion.add_provider(
                                new Palete.CompletionProvider(_this)
                        );
@@ -1079,7 +1074,7 @@ public class Editor : Object
                }
        }
 
-       public class Xcls_EventControllerKey11 : Object
+       public class Xcls_EventControllerKey10 : Object
        {
                public Gtk.EventControllerKey el;
                private Editor  _this;
@@ -1088,7 +1083,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_EventControllerKey11(Editor _owner )
+               public Xcls_EventControllerKey10(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.EventControllerKey();
@@ -1149,7 +1144,7 @@ public class Editor : Object
 
 
 
-       public class Xcls_Box12 : Object
+       public class Xcls_Box11 : Object
        {
                public Gtk.Box el;
                private Editor  _this;
@@ -1158,7 +1153,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box12(Editor _owner )
+               public Xcls_Box11(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -1176,7 +1171,7 @@ public class Editor : Object
                        this.el.append( _this.nextBtn.el );
                        new Xcls_backBtn( _this );
                        this.el.append( _this.backBtn.el );
-                       var child_5 = new Xcls_MenuButton18( _this );
+                       var child_5 = new Xcls_MenuButton17( _this );
                        child_5.ref();
                        this.el.append( child_5.el );
                }
@@ -1206,7 +1201,7 @@ public class Editor : Object
                        this.el.hexpand = true;
                        this.el.placeholder_text = "Press enter to search";
                        this.el.search_delay = 3;
-                       var child_1 = new Xcls_EventControllerKey14( _this );
+                       var child_1 = new Xcls_EventControllerKey13( _this );
                        child_1.ref();
                        this.el.add_controller(  child_1.el );
 
@@ -1251,7 +1246,7 @@ public class Editor : Object
                        
                }
        }
-       public class Xcls_EventControllerKey14 : Object
+       public class Xcls_EventControllerKey13 : Object
        {
                public Gtk.EventControllerKey el;
                private Editor  _this;
@@ -1260,7 +1255,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_EventControllerKey14(Editor _owner )
+               public Xcls_EventControllerKey13(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.EventControllerKey();
@@ -1411,7 +1406,7 @@ public class Editor : Object
                // user defined functions
        }
 
-       public class Xcls_MenuButton18 : Object
+       public class Xcls_MenuButton17 : Object
        {
                public Gtk.MenuButton el;
                private Editor  _this;
@@ -1421,7 +1416,7 @@ public class Editor : Object
                public bool always_show_image;
 
                // ctor
-               public Xcls_MenuButton18(Editor _owner )
+               public Xcls_MenuButton17(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.MenuButton();
@@ -1456,13 +1451,13 @@ public class Editor : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box20( _this );
+                       var child_1 = new Xcls_Box19( _this );
                        this.el.child = child_1.el;
                }
 
                // user defined functions
        }
-       public class Xcls_Box20 : Object
+       public class Xcls_Box19 : Object
        {
                public Gtk.Box el;
                private Editor  _this;
@@ -1471,7 +1466,7 @@ public class Editor : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box20(Editor _owner )
+               public Xcls_Box19(Editor _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
index 7b17a36..1323bb4 100644 (file)
@@ -7,33 +7,13 @@
    "# GtkSource.SearchContext searchcontext" : "",
    "# JsRender.JsRender file" : "null",
    "# Xcls_MainWindow main_window" : "",
+   "# int last_error_counter" : 0,
+   "# int last_search_end" : 0,
    "$ xns" : "Gtk",
-   "* init" : [
-    "{",
-    "",
-    "\tthis.css = new Gtk.CssProvider();",
-    "\t ",
-    "\tthis.css.load_from_string(",
-    "\t\t\"#gtkview-view-layout { background-color: #ccc; }\"",
-    "\t);",
-    "\t ",
-    "\tGtk.StyleContext.add_provider_for_display(",
-    "\t\tthis.el.get_display(),",
-    "\t\tthis.css,",
-    "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-    "\t);",
-    "\t\t",
-    "        ",
-    "}",
-    ""
-   ],
-   "Gtk.CssProvider css" : "",
    "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
    "bool hexpand" : true,
    "bool vexpand" : true,
    "id" : "GtkView",
-   "int last_error_counter" : 0,
-   "int last_search_end" : 0,
    "items" : [
     {
      "$ xns" : "Gtk",
          "items" : [
           {
            "# JsRender.Node? node_selected" : "",
+           "# bool loading" : false,
            "# string prop_selected" : "\"\"",
            "$ xns" : "GtkSource",
            "* init" : [
-            "\t{",
+            "{",
             "",
-            "",
-            "\tthis.css = new Gtk.CssProvider();",
-            "\t ",
-            "\tthis.css.load_from_string(\"#gtkview-view { font: 10px monospace ;}\");",
-            "\t ",
-            "\tGtk.StyleContext.add_provider_for_display(",
-            "\t\tthis.el.get_display(),",
-            "\t\tthis.css,",
-            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            "\t);",
-            "\t\t",
-            "\t\t ",
+            "  ",
             "\tthis.loading = true;",
             "",
-            "",
-            "",
+            " ",
             "\tvar attrs = new GtkSource.MarkAttributes();",
             "\t attrs.set_icon_name ( \"process-stop\");    ",
             "\tattrs.query_tooltip_text.connect(( mark) => {",
             ""
            ],
            "* pack" : "set_child",
-           "Gtk.CssProvider css" : "",
-           "bool loading" : false,
-           "bool zallow_node_scroll" : true,
+           "css_classes" : "{ \"code-editor\" }",
            "gboolean editable" : false,
            "gboolean show_line_marks" : true,
            "gboolean show_line_numbers" : true,
          "items" : [
           {
            "$ xns" : "Gtk",
-           "* init" : [
-            " ",
-            "this.css = new Gtk.CssProvider();",
-            "",
-            "this.css.load_from_string(\"",
-            "\t#gtkview-search-entry { font: 10px monospace ;}\"",
-            ");",
-            "",
-            "Gtk.StyleContext.add_provider_for_display(",
-            "\tthis.el.get_display(),",
-            "\tthis.css,",
-            "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            ");",
-            "\t\t",
-            "",
-            ""
-           ],
            "Gtk.CssProvider css" : "",
            "bool hexpand" : true,
            "id" : "search_entry",
index 015788e..c560f25 100644 (file)
@@ -31,11 +31,10 @@ public class Xcls_GtkView : Object
 
                // my vars (def)
        public Gtk.Widget lastObj;
-       public Gtk.CssProvider css;
        public Xcls_MainWindow main_window;
-       public GtkSource.SearchContext searchcontext;
        public int last_error_counter;
        public int last_search_end;
+       public GtkSource.SearchContext searchcontext;
        public JsRender.JsRender file;
 
        // ctor
@@ -55,25 +54,6 @@ public class Xcls_GtkView : Object
                this.el.vexpand = true;
                new Xcls_notebook( _this );
                this.el.append( _this.notebook.el );
-
-               // init method
-
-               {
-               
-                       this.css = new Gtk.CssProvider();
-                        
-                       this.css.load_from_string(
-                               "#gtkview-view-layout { background-color: #ccc; }"
-                       );
-                        
-                       Gtk.StyleContext.add_provider_for_display(
-                               this.el.get_display(),
-                               this.css,
-                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                       );
-                               
-                       
-               }
        }
 
        // user defined functions
@@ -449,10 +429,10 @@ public class Xcls_GtkView : Object
                        this.el.overflow = Gtk.Overflow.VISIBLE;
                        new Xcls_label_preview( _this );
                        new Xcls_label_code( _this );
-                       var child_3 = new Xcls_ScrolledWindow5( _this );
+                       var child_3 = new Xcls_ScrolledWindow4( _this );
                        child_3.ref();
                        this.el.append_page ( child_3.el , _this.label_preview.el );
-                       var child_4 = new Xcls_Box8( _this );
+                       var child_4 = new Xcls_Box7( _this );
                        child_4.ref();
                        this.el.append_page ( child_4.el , _this.label_code.el );
                }
@@ -505,7 +485,7 @@ public class Xcls_GtkView : Object
                // user defined functions
        }
 
-       public class Xcls_ScrolledWindow5 : Object
+       public class Xcls_ScrolledWindow4 : Object
        {
                public Gtk.ScrolledWindow el;
                private Xcls_GtkView  _this;
@@ -514,7 +494,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_ScrolledWindow5(Xcls_GtkView _owner )
+               public Xcls_ScrolledWindow4(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.ScrolledWindow();
@@ -578,7 +558,7 @@ public class Xcls_GtkView : Object
 
 
 
-       public class Xcls_Box8 : Object
+       public class Xcls_Box7 : Object
        {
                public Gtk.Box el;
                private Xcls_GtkView  _this;
@@ -587,7 +567,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box8(Xcls_GtkView _owner )
+               public Xcls_Box7(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -597,7 +577,7 @@ public class Xcls_GtkView : Object
                        // set gobject values
                        new Xcls_sourceviewscroll( _this );
                        this.el.append( _this.sourceviewscroll.el );
-                       var child_2 = new Xcls_Box13( _this );
+                       var child_2 = new Xcls_Box12( _this );
                        child_2.ref();
                        this.el.append( child_2.el );
                }
@@ -637,9 +617,7 @@ public class Xcls_GtkView : Object
 
                        // my vars (def)
                public bool loading;
-               public bool zallow_node_scroll;
                public string prop_selected;
-               public Gtk.CssProvider css;
                public JsRender.Node? node_selected;
 
                // ctor
@@ -651,7 +629,6 @@ public class Xcls_GtkView : Object
 
                        // my vars (dec)
                        this.loading = false;
-                       this.zallow_node_scroll = true;
                        this.prop_selected = "";
 
                        // set gobject values
@@ -659,10 +636,11 @@ public class Xcls_GtkView : Object
                        this.el.editable = false;
                        this.el.show_line_marks = true;
                        this.el.show_line_numbers = true;
+                       this.el.css_classes = { "code-editor" };
                        this.el.tab_width = 4;
                        new Xcls_buffer( _this );
                        this.el.set_buffer ( _this.buffer.el  );
-                       var child_2 = new Xcls_EventControllerKey12( _this );
+                       var child_2 = new Xcls_EventControllerKey11( _this );
                        child_2.ref();
                        this.el.add_controller(  child_2.el );
 
@@ -670,22 +648,10 @@ public class Xcls_GtkView : Object
 
                        {
                        
-                       
-                               this.css = new Gtk.CssProvider();
-                                
-                               this.css.load_from_string("#gtkview-view { font: 10px monospace ;}");
-                                
-                               Gtk.StyleContext.add_provider_for_display(
-                                       this.el.get_display(),
-                                       this.css,
-                                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                               );
-                                       
-                                        
+                         
                                this.loading = true;
                        
-                       
-                       
+                        
                                var attrs = new GtkSource.MarkAttributes();
                                 attrs.set_icon_name ( "process-stop");    
                                attrs.query_tooltip_text.connect(( mark) => {
@@ -987,7 +953,7 @@ public class Xcls_GtkView : Object
                // user defined functions
        }
 
-       public class Xcls_EventControllerKey12 : Object
+       public class Xcls_EventControllerKey11 : Object
        {
                public Gtk.EventControllerKey el;
                private Xcls_GtkView  _this;
@@ -996,7 +962,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_EventControllerKey12(Xcls_GtkView _owner )
+               public Xcls_EventControllerKey11(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.EventControllerKey();
@@ -1030,7 +996,7 @@ public class Xcls_GtkView : Object
 
 
 
-       public class Xcls_Box13 : Object
+       public class Xcls_Box12 : Object
        {
                public Gtk.Box el;
                private Xcls_GtkView  _this;
@@ -1039,7 +1005,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box13(Xcls_GtkView _owner )
+               public Xcls_Box12(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
@@ -1057,7 +1023,7 @@ public class Xcls_GtkView : Object
                        this.el.append( _this.nextBtn.el );
                        new Xcls_backBtn( _this );
                        this.el.append( _this.backBtn.el );
-                       var child_5 = new Xcls_MenuButton19( _this );
+                       var child_5 = new Xcls_MenuButton18( _this );
                        child_5.ref();
                        this.el.append( child_5.el );
                }
@@ -1087,24 +1053,10 @@ public class Xcls_GtkView : Object
                        this.el.hexpand = true;
                        this.el.placeholder_text = "Press enter to search";
                        this.el.search_delay = 3;
-                       var child_1 = new Xcls_EventControllerKey15( _this );
+                       var child_1 = new Xcls_EventControllerKey14( _this );
                        child_1.ref();
                        this.el.add_controller(  child_1.el );
 
-                       // init method
-
-                       this.css = new Gtk.CssProvider();
-                       
-                       this.css.load_from_string("
-                               #gtkview-search-entry { font: 10px monospace ;}"
-                       );
-                       
-                       Gtk.StyleContext.add_provider_for_display(
-                               this.el.get_display(),
-                               this.css,
-                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                       );
-
                        //listeners
                        this.el.search_changed.connect( () => {
                                 
@@ -1149,7 +1101,7 @@ public class Xcls_GtkView : Object
                        
                }
        }
-       public class Xcls_EventControllerKey15 : Object
+       public class Xcls_EventControllerKey14 : Object
        {
                public Gtk.EventControllerKey el;
                private Xcls_GtkView  _this;
@@ -1158,7 +1110,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_EventControllerKey15(Xcls_GtkView _owner )
+               public Xcls_EventControllerKey14(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.EventControllerKey();
@@ -1308,7 +1260,7 @@ public class Xcls_GtkView : Object
                // user defined functions
        }
 
-       public class Xcls_MenuButton19 : Object
+       public class Xcls_MenuButton18 : Object
        {
                public Gtk.MenuButton el;
                private Xcls_GtkView  _this;
@@ -1318,7 +1270,7 @@ public class Xcls_GtkView : Object
                public bool always_show_image;
 
                // ctor
-               public Xcls_MenuButton19(Xcls_GtkView _owner )
+               public Xcls_MenuButton18(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.MenuButton();
@@ -1353,14 +1305,14 @@ public class Xcls_GtkView : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box21( _this );
+                       var child_1 = new Xcls_Box20( _this );
                        child_1.ref();
                        this.el.set_child ( child_1.el  );
                }
 
                // user defined functions
        }
-       public class Xcls_Box21 : Object
+       public class Xcls_Box20 : Object
        {
                public Gtk.Box el;
                private Xcls_GtkView  _this;
@@ -1369,7 +1321,7 @@ public class Xcls_GtkView : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box21(Xcls_GtkView _owner )
+               public Xcls_Box20(Xcls_GtkView _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
index d09cd78..82a6865 100644 (file)
        "items" : [
         {
          "$ xns" : "GtkSource",
-         "* init" : [
-          "{",
-          "",
-          "   \tthis.css = new Gtk.CssProvider();",
-          "\t ",
-          "\tthis.css.load_from_string(",
-          "\t\t\"#compile-results-view { font: 10px monospace ;}\"",
-          "\t);",
-          "\t ",
-          "\t\t\tGtk.StyleContext.add_provider_for_display(",
-          "\t\tthis.el.get_display(),",
-          "\t\tthis.css,",
-          "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-          "\t);",
-          "\t\t",
-          "",
-          "}",
-          ""
-         ],
          "* prop" : "child",
-         "Gtk.CssProvider css" : "",
          "bool editable" : false,
          "bool hexpand" : true,
          "bool show_line_numbers" : false,
index bf3f4ec..06fcd63 100644 (file)
@@ -104,14 +104,14 @@ public class Xcls_ValaCompileResults : Object
                        this.el.homogeneous = false;
                        this.el.hexpand = true;
                        this.el.vexpand = true;
-                       var child_1 = new Xcls_ScrolledWindow3( _this );
+                       var child_1 = new Xcls_ScrolledWindow2( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
                }
 
                // user defined functions
        }
-       public class Xcls_ScrolledWindow3 : Object
+       public class Xcls_ScrolledWindow2 : Object
        {
                public Gtk.ScrolledWindow el;
                private Xcls_ValaCompileResults  _this;
@@ -120,7 +120,7 @@ public class Xcls_ValaCompileResults : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_ScrolledWindow3(Xcls_ValaCompileResults _owner )
+               public Xcls_ScrolledWindow2(Xcls_ValaCompileResults _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.ScrolledWindow();
@@ -151,7 +151,6 @@ public class Xcls_ValaCompileResults : Object
 
 
                        // my vars (def)
-               public Gtk.CssProvider css;
 
                // ctor
                public Xcls_sourceview(Xcls_ValaCompileResults _owner )
@@ -168,25 +167,6 @@ public class Xcls_ValaCompileResults : Object
                        this.el.show_line_numbers = false;
                        this.el.hexpand = true;
                        this.el.vexpand = true;
-
-                       // init method
-
-                       {
-                       
-                               this.css = new Gtk.CssProvider();
-                                
-                               this.css.load_from_string(
-                                       "#compile-results-view { font: 10px monospace ;}"
-                               );
-                                
-                                               Gtk.StyleContext.add_provider_for_display(
-                                       this.el.get_display(),
-                                       this.css,
-                                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                               );
-                                       
-                       
-                       }
                }
 
                // user defined functions
index d410cf7..b14e7ab 100644 (file)
      "id" : "EditProps",
      "items" : [
       {
+       "# Xcls_PopoverProperty popover" : "null",
        "$ enable_tree_lines" : true,
        "$ headers_visible" : true,
        "$ xns" : "Gtk",
-       "* init" : [
-        "{",
-        " ",
-        "  \tthis.css = new Gtk.CssProvider();",
-        "\t ",
-        "\t\tthis.css.load_from_string(\"",
-        "#leftprops-view { font-size: 12px;}",
-        "\t ",
-        "#leftprops-view  dropdown button { ",
-        "\t\t\tmin-height: 16px;\t\t\t ",
-        "\t\t\toutline-offset : 0;",
-        "\t\t}",
-        "#leftprops-view cell dropdown label  {",
-        " \t\tpadding-top:0px;",
-        "\t\tpadding-bottom:0px;",
-        "}",
-        "#leftprops-view cell   { ",
-        " \t\tpadding-top:2px;",
-        "\t\tpadding-bottom:2px;",
-        "\t\t}",
-        "#leftprops-view cell label,  #leftprops-view cell editablelable {",
-        " \t\tpadding-top:4px;",
-        "\t\tpadding-bottom:4px;",
-        "}\");",
-        " ",
-        "\t\tGtk.StyleContext.add_provider_for_display(",
-        "\t\tthis.el.get_display(),",
-        "\t\tthis.css,",
-        "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-        "\t);",
-        "\t\t",
-        "   ",
-        "}",
-        ""
-       ],
        "* pack" : "set_child",
-       "Gtk.CssProvider css" : "",
-       "Xcls_PopoverProperty popover" : "null",
        "bool hexpand" : true,
        "bool show_row_separators" : true,
        "bool single_click_activate" : false,
        "| int getRowAt" : [
         "(double x,  double  y, out string pos) {",
         "",
+        "\tpos = \"\";",
         "\tvar w = this.el.pick(x, y, Gtk.PickFlags.DEFAULT);",
         "\t//GLib.debug(\"got widget %s\", w == null ? \"nothing\" : w.get_type().name());",
         "\tif (w == null) {",
index bcef70a..0a7f04d 100644 (file)
@@ -1584,7 +1584,6 @@ public class Xcls_LeftProps : Object
 
 
                        // my vars (def)
-               public Gtk.CssProvider css;
                public Xcls_PopoverProperty popover;
 
                // ctor
@@ -1605,10 +1604,10 @@ public class Xcls_LeftProps : Object
                        this.el.vexpand = true;
                        this.el.show_row_separators = true;
                        new Xcls_deletemenu( _this );
-                       var child_3 = new Xcls_GestureClick44( _this );
+                       var child_3 = new Xcls_GestureClick45( _this );
                        child_3.ref();
                        this.el.add_controller(  child_3.el );
-                       var child_4 = new Xcls_GestureClick45( _this );
+                       var child_4 = new Xcls_GestureClick46( _this );
                        child_4.ref();
                        this.el.add_controller(  child_4.el );
                        new Xcls_keycol( _this );
@@ -1616,41 +1615,6 @@ public class Xcls_LeftProps : Object
                        new Xcls_valcol( _this );
                        this.el.append_column ( _this.valcol.el  );
                        new Xcls_ContextMenu( _this );
-
-                       // init method
-
-                       {
-                        
-                               this.css = new Gtk.CssProvider();
-                                
-                                       this.css.load_from_string("
-                       #leftprops-view { font-size: 12px;}
-                                
-                       #leftprops-view  dropdown button { 
-                                               min-height: 16px;                        
-                                               outline-offset : 0;
-                                       }
-                       #leftprops-view cell dropdown label  {
-                                       padding-top:0px;
-                                       padding-bottom:0px;
-                       }
-                       #leftprops-view cell   { 
-                                       padding-top:2px;
-                                       padding-bottom:2px;
-                                       }
-                       #leftprops-view cell label,  #leftprops-view cell editablelable {
-                                       padding-top:4px;
-                                       padding-bottom:4px;
-                       }");
-                        
-                                       Gtk.StyleContext.add_provider_for_display(
-                                       this.el.get_display(),
-                                       this.css,
-                                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                               );
-                                       
-                          
-                       }
                }
 
                // user defined functions
@@ -1794,6 +1758,7 @@ public class Xcls_LeftProps : Object
                 }
                public int getRowAt (double x,  double  y, out string pos) {
                
+                       pos = "";
                        var w = this.el.pick(x, y, Gtk.PickFlags.DEFAULT);
                        //GLib.debug("got widget %s", w == null ? "nothing" : w.get_type().name());
                        if (w == null) {
@@ -1905,7 +1870,7 @@ public class Xcls_LeftProps : Object
                        // set gobject values
                        this.el.has_frame = false;
                        this.el.label = "Delete";
-                       var child_1 = new Xcls_Label1187( _this );
+                       var child_1 = new Xcls_Label44( _this );
                        this.el.child = child_1.el;
 
                        //listeners
@@ -1921,7 +1886,7 @@ public class Xcls_LeftProps : Object
 
                // user defined functions
        }
-       public class Xcls_Label1187 : Object
+       public class Xcls_Label44 : Object
        {
                public Gtk.Label el;
                private Xcls_LeftProps  _this;
@@ -1930,7 +1895,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Label1187(Xcls_LeftProps _owner )
+               public Xcls_Label44(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Label( "Delete Property / Method" );
@@ -1947,7 +1912,7 @@ public class Xcls_LeftProps : Object
 
 
 
-       public class Xcls_GestureClick44 : Object
+       public class Xcls_GestureClick45 : Object
        {
                public Gtk.GestureClick el;
                private Xcls_LeftProps  _this;
@@ -1956,7 +1921,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_GestureClick44(Xcls_LeftProps _owner )
+               public Xcls_GestureClick45(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.GestureClick();
@@ -2004,7 +1969,7 @@ public class Xcls_LeftProps : Object
                // user defined functions
        }
 
-       public class Xcls_GestureClick45 : Object
+       public class Xcls_GestureClick46 : Object
        {
                public Gtk.GestureClick el;
                private Xcls_LeftProps  _this;
@@ -2013,7 +1978,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_GestureClick45(Xcls_LeftProps _owner )
+               public Xcls_GestureClick46(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.GestureClick();
@@ -2156,7 +2121,7 @@ public class Xcls_LeftProps : Object
                {
                        _this = _owner;
                        _this.keycol = this;
-                       var child_1 = new Xcls_SignalListItemFactory49( _this );
+                       var child_1 = new Xcls_SignalListItemFactory50( _this );
                        child_1.ref();
                        this.el = new Gtk.ColumnViewColumn( "Property", child_1.el );
 
@@ -2170,7 +2135,7 @@ public class Xcls_LeftProps : Object
 
                // user defined functions
        }
-       public class Xcls_SignalListItemFactory49 : Object
+       public class Xcls_SignalListItemFactory50 : Object
        {
                public Gtk.SignalListItemFactory el;
                private Xcls_LeftProps  _this;
@@ -2179,7 +2144,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_SignalListItemFactory49(Xcls_LeftProps _owner )
+               public Xcls_SignalListItemFactory50(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.SignalListItemFactory();
@@ -2241,7 +2206,7 @@ public class Xcls_LeftProps : Object
                {
                        _this = _owner;
                        _this.valcol = this;
-                       var child_1 = new Xcls_SignalListItemFactory51( _this );
+                       var child_1 = new Xcls_SignalListItemFactory52( _this );
                        child_1.ref();
                        this.el = new Gtk.ColumnViewColumn( "Value", child_1.el );
 
@@ -2255,7 +2220,7 @@ public class Xcls_LeftProps : Object
 
                // user defined functions
        }
-       public class Xcls_SignalListItemFactory51 : Object
+       public class Xcls_SignalListItemFactory52 : Object
        {
                public Gtk.SignalListItemFactory el;
                private Xcls_LeftProps  _this;
@@ -2265,7 +2230,7 @@ public class Xcls_LeftProps : Object
                public bool is_setting;
 
                // ctor
-               public Xcls_SignalListItemFactory51(Xcls_LeftProps _owner )
+               public Xcls_SignalListItemFactory52(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.SignalListItemFactory();
@@ -2473,13 +2438,13 @@ public class Xcls_LeftProps : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Box53( _this );
+                       var child_1 = new Xcls_Box54( _this );
                        this.el.child = child_1.el;
                }
 
                // user defined functions
        }
-       public class Xcls_Box53 : Object
+       public class Xcls_Box54 : Object
        {
                public Gtk.Box el;
                private Xcls_LeftProps  _this;
@@ -2488,7 +2453,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Box53(Xcls_LeftProps _owner )
+               public Xcls_Box54(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
@@ -2496,14 +2461,14 @@ public class Xcls_LeftProps : Object
                        // my vars (dec)
 
                        // set gobject values
-                       var child_1 = new Xcls_Button54( _this );
+                       var child_1 = new Xcls_Button55( _this );
                        child_1.ref();
                        this.el.append( child_1.el );
                }
 
                // user defined functions
        }
-       public class Xcls_Button54 : Object
+       public class Xcls_Button55 : Object
        {
                public Gtk.Button el;
                private Xcls_LeftProps  _this;
@@ -2512,7 +2477,7 @@ public class Xcls_LeftProps : Object
                        // my vars (def)
 
                // ctor
-               public Xcls_Button54(Xcls_LeftProps _owner )
+               public Xcls_Button55(Xcls_LeftProps _owner )
                {
                        _this = _owner;
                        this.el = new Gtk.Button();
index 045fbee..194e360 100644 (file)
@@ -41,7 +41,7 @@
        "$ xns" : "Gtk",
        "* init" : [
         "{",
-        " ",
+        " /*",
         "  this.css = new Gtk.CssProvider();",
         "//\ttry {",
         "\t\tthis.css.load_from_string(\"",
@@ -95,7 +95,7 @@
         "\t\tthis.css,",
         "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
         "\t);",
-        "\t",
+        "\t*/",
         "\t  ",
         "}",
         ""
index b93c57d..0260e7b 100644 (file)
@@ -296,7 +296,7 @@ public class Xcls_WindowLeftTree : Object
                        // init method
 
                        {
-                        
+                        /*
                          this.css = new Gtk.CssProvider();
                        //      try {
                                        this.css.load_from_string("
@@ -350,7 +350,7 @@ public class Xcls_WindowLeftTree : Object
                                        this.css,
                                        Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
                                );
-                               
+                               */
                                  
                        }
                }
index 9ceb803..04ef48f 100644 (file)
            "# bool button_is_pressed" : false,
            "# bool key_is_pressed" : false,
            "# bool loading" : true,
-           "# bool show_line_marks" : true,
            "# id" : "sourceview",
            "# int editable_start_pos" : "-1",
            "# string prop_selected" : "\"\"",
            "* init" : [
             "\t{",
             "",
-            "\tthis.css = new Gtk.CssProvider();",
-            "\t ",
-            "\tthis.css.load_from_string(",
-            "\t\t\"#roo-view { font:  10px monospace; }\"",
-            "\t);",
-            "",
-            "\tGtk.StyleContext.add_provider_for_display(",
-            "\t\tthis.el.get_display(),",
-            "\t\tthis.css,",
-            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            "\t);",
-            "\t\t",
             "\t ",
             "",
             "\tthis.loading = true;",
            ],
            "* pack" : "set_child",
            "bool editable" : false,
+           "bool show_line_marks" : true,
            "bool show_line_numbers" : true,
+           "css_classes" : "{ \"code-editor\" }",
            "items" : [
             {
              "$ xns" : "GtkSource",
             "    ",
             " ",
             "    buf.set_text(\"\",0);",
-            "    var sbuf = (GtkSource.Buffer) buf;",
+            " ",
             "",
             "    ",
             "",
          "items" : [
           {
            "$ xns" : "Gtk",
-           "* init" : [
-            "this.css = new Gtk.CssProvider();",
-            " ",
-            "this.css.load_from_string(",
-            "\t\"#roo-search-entry { background-color: #ccc; }\"",
-            ");",
-            " ",
-            "Gtk.StyleContext.add_provider_for_display(",
-            "\tthis.el.get_display(),",
-            "\tthis.css,",
-            "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            ");",
-            "\t\t",
-            "\t ",
-            " ",
-            ""
-           ],
-           "Gtk.CssProvider? css" : "null",
            "bool hexpand" : true,
            "id" : "search_entry",
            "items" : [
index 838f910..fbf63dc 100644 (file)
@@ -1070,7 +1070,6 @@ public class Xcls_WindowRooView : Object
                public string prop_selected;
                public Gtk.CssProvider? css;
                public bool key_is_pressed;
-               public bool show_line_marks;
                public JsRender.Node? node_selected;
 
                // ctor
@@ -1087,13 +1086,14 @@ public class Xcls_WindowRooView : Object
                        this.prop_selected = "";
                        this.css = null;
                        this.key_is_pressed = false;
-                       this.show_line_marks = true;
                        this.node_selected = null;
 
                        // set gobject values
                        this.el.name = "roo-view";
                        this.el.editable = false;
+                       this.el.show_line_marks = true;
                        this.el.show_line_numbers = true;
+                       this.el.css_classes = { "code-editor" };
                        new Xcls_buffer( _this );
                        this.el.set_buffer ( _this.buffer.el  );
                        var child_2 = new Xcls_EventControllerKey16( _this );
@@ -1104,18 +1104,6 @@ public class Xcls_WindowRooView : Object
 
                        {
                        
-                               this.css = new Gtk.CssProvider();
-                                
-                               this.css.load_from_string(
-                                       "#roo-view { font:  10px monospace; }"
-                               );
-                       
-                               Gtk.StyleContext.add_provider_for_display(
-                                       this.el.get_display(),
-                                       this.css,
-                                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                               );
-                                       
                                 
                        
                                this.loading = true;
@@ -1212,7 +1200,7 @@ public class Xcls_WindowRooView : Object
                    
                 
                    buf.set_text("",0);
-                   var sbuf = (GtkSource.Buffer) buf;
+                
                
                    
                
@@ -1740,7 +1728,6 @@ public class Xcls_WindowRooView : Object
 
 
                        // my vars (def)
-               public Gtk.CssProvider? css;
 
                // ctor
                public Xcls_search_entry(Xcls_WindowRooView _owner )
@@ -1750,7 +1737,6 @@ public class Xcls_WindowRooView : Object
                        this.el = new Gtk.SearchEntry();
 
                        // my vars (dec)
-                       this.css = null;
 
                        // set gobject values
                        this.el.name = "roo-search-entry";
@@ -1760,20 +1746,6 @@ public class Xcls_WindowRooView : Object
                        child_1.ref();
                        this.el.add_controller(  child_1.el );
 
-                       // init method
-
-                       this.css = new Gtk.CssProvider();
-                        
-                       this.css.load_from_string(
-                               "#roo-search-entry { background-color: #ccc; }"
-                       );
-                        
-                       Gtk.StyleContext.add_provider_for_display(
-                               this.el.get_display(),
-                               this.css,
-                               Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
-                       );
-
                        //listeners
                        this.el.search_changed.connect( ( ) => {
                        
index 0efdc05..8da5e58 100644 (file)
@@ -21,17 +21,7 @@ int main (string[] args) {
        // GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL); 
        GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR ); 
         
-       app.activate.connect(() => {
-               var w = new Xcls_MainWindow();
-        w.initChildren();
-               BuilderApplication.addWindow(w);
-               
-               // it looks like showall after children causes segfault on ubuntu 14.4
-               w.windowstate.init();
-       //      w.windowstate.showPopoverFiles(w.open_projects_btn.el, null, false);
-               w.show();
-       
-       });
        
        //
 //     w.windowstate.switchState(WindowState.State.FILES);
diff --git a/src/Settings.vala b/src/Settings.vala
new file mode 100644 (file)
index 0000000..488284f
--- /dev/null
@@ -0,0 +1,84 @@
+/**
+
+File to handle global settings
+In theory this should be stored in GLib.Settings - but since that requires a load of infrastructure to create
+we will stick to "~/.config/roobuilder.json" for now
+
+
+we used to store it in '.Builder/Project.list' .. but that's going to change..
+
+
+// this should be available via BuilderApplicaiton.settings
+
+
+*/
+
+public class Settings : Object  {
+
+       // things that can be set..
+       
+       private int _editor_font_size = 10;
+       public double editor_font_size {
+               get {
+                       return (double) this._editor_font_size;
+               }
+               set {
+                       GLib.debug("updated to %d", (int) value );
+                       this._editor_font_size = (int) value;
+                       if (this.css != null) {
+                               this.css.load_from_string(
+                                       ".code-editor { font: %dpx monospace; }".printf((int) value)
+                               );
+                       }
+                       this.save();
+
+                       this.editor_font_size_updated();
+               }
+               
+       }
+       public bool editor_font_size_inchange = false;
+       public signal void editor_font_size_updated();
+       
+       
+       // things we look after..
+       Gtk.CssProvider? css = null;
+       bool loaded = false;
+       
+       
+       public  Settings ()
+       {
+               
+               this.css = new  Gtk.CssProvider();
+               this.editor_font_size = 10;
+               Gtk.StyleContext.add_provider_for_display(
+                       Gdk.Display.get_default(),
+                       this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
+               );
+               
+               if (this.load()) {
+                       return;
+               }
+               this.loadOld();
+               this.save();
+                       
+       }
+
+       public void save()
+       {
+               if (!this.loaded) {
+                       return;
+               }
+       }
+       
+       public bool load()
+       {
+               this.loaded = true;
+               return true;
+       }
+       public  void loadOld() {
+               this.loaded = true;
+       }
+
+}
+