Fix #7437 - more depricated
authorAlan Knowles <alan@roojs.com>
Mon, 17 Oct 2022 08:07:22 +0000 (16:07 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 17 Oct 2022 08:07:22 +0000 (16:07 +0800)
18 files changed:
src/Builder4/GtkView.vala
src/Builder4/PopoverFileDetails.bjs
src/Builder4/PopoverFileDetails.vala
src/Builder4/PopoverProperty.bjs
src/Builder4/PopoverProperty.vala
src/Builder4/ValaCompileErrors.bjs
src/Builder4/ValaCompileErrors.vala
src/Builder4/ValaCompileResults.bjs
src/Builder4/ValaCompileResults.vala
src/Builder4/ValaProjectSettingsPopover.bjs
src/Builder4/ValaProjectSettingsPopover.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/JsRender/NodeToGtk.vala

index cdc5380..29d67c7 100644 (file)
@@ -569,8 +569,8 @@ public class Xcls_GtkView : Object
             // my vars (def)
         public bool loading;
         public string prop_selected;
-        public bool allow_node_scroll;
         public Gtk.CssProvider css;
+        public bool allow_node_scroll;
         public JsRender.Node? node_selected;
 
         // ctor
index fe55134..842a016 100644 (file)
@@ -32,8 +32,8 @@
        "* pack" : "pack_start,false,false,4",
        "bool hexpand" : true,
        "id" : "grid",
-       "int margin_left" : 4,
-       "int margin_right" : 4,
+       "int margin_end" : 4,
+       "int margin_start" : 4,
        "items" : [
         {
          "$ justify" : "Gtk.Justification.RIGHT",
        "* pack" : "add",
        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
        "int margin_bottom" : 4,
-       "int margin_left" : 4,
-       "int margin_right" : 4,
+       "int margin_end" : 4,
+       "int margin_start" : 4,
        "int margin_top" : 4,
        "items" : [
         {
index f0986bc..46dbda7 100644 (file)
@@ -260,8 +260,8 @@ public class Xcls_PopoverFileDetails : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.margin_right = 4;
-            this.el.margin_left = 4;
+            this.el.margin_end = 4;
+            this.el.margin_start = 4;
             this.el.hexpand = true;
             this.el.row_spacing = 2;
             var child_0 = new Xcls_filetypelbl( _this );
@@ -1210,8 +1210,8 @@ public class Xcls_PopoverFileDetails : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.margin_right = 4;
-            this.el.margin_left = 4;
+            this.el.margin_end = 4;
+            this.el.margin_start = 4;
             this.el.margin_bottom = 4;
             this.el.margin_top = 4;
             var child_0 = new Xcls_Button32( _this );
index afdf4d5..f708309 100644 (file)
           }
          ],
          "listeners" : {
-          "pressed" : [
+          "button_press_event" : [
            "() => { ",
            "",
            "\t_this.prop = null;",
            "\t_this.is_new = false;",
            "\t_this.kname.el.set_text(\"Cancel\");",
            "\t_this.el.hide();",
-           "",
+           "\treturn false;",
            "}"
           ]
          },
           }
          ],
          "listeners" : {
-          "pressed" : [
+          "button_press_event" : [
            "() => {",
            "\t// check if text is not empty..",
            "\tif ( _this.kname.el.get_text().strip().length < 1) {",
            "\t\t// error should already be showing?",
-           "\t\treturn;",
+           "\t\treturn false;",
            "\t}",
            "\t_this.updateProp();",
            "\t",
            "\tvar prop = _this.prop;",
            "\tif (_this.node.props.has_key(prop.to_index_key())) {",
            "\t\t_this.error.setError(\"Property already exists\");",
-           "\t\treturn;\t",
+           "\t\treturn false;\t",
            "\t}",
            "\t",
            "\t",
            "\t",
            "\t_this.mainwindow.windowstate.left_props.addProp(prop);\t\t",
            "\t",
-           "",
+           "\treturn false;",
            "}"
           ]
          },
index 9bd762d..cd1e583 100644 (file)
@@ -649,13 +649,13 @@ public class Xcls_PopoverProperty : Object
             this.el.image = child_0.el;
 
             //listeners
-            this.el.pressed.connect( () => { 
+            this.el.button_press_event.connect( () => { 
             
                _this.prop = null;
                _this.is_new = false;
                _this.kname.el.set_text("Cancel");
                _this.el.hide();
-            
+               return false;
             });
         }
 
@@ -710,11 +710,11 @@ public class Xcls_PopoverProperty : Object
             this.el.image = child_0.el;
 
             //listeners
-            this.el.pressed.connect( () => {
+            this.el.button_press_event.connect( () => {
                // check if text is not empty..
                if ( _this.kname.el.get_text().strip().length < 1) {
                        // error should already be showing?
-                       return;
+                       return false;
                }
                _this.updateProp();
                
@@ -724,7 +724,7 @@ public class Xcls_PopoverProperty : Object
                var prop = _this.prop;
                if (_this.node.props.has_key(prop.to_index_key())) {
                        _this.error.setError("Property already exists");
-                       return; 
+                       return false;   
                }
                
                
@@ -744,7 +744,7 @@ public class Xcls_PopoverProperty : Object
                
                _this.mainwindow.windowstate.left_props.addProp(prop);          
                
-            
+               return false;
             });
         }
 
index e2961f6..bd5f991 100644 (file)
          "$ xns" : "Gtk",
          "* init" : [
           "{",
-          " var description = new Pango.FontDescription();",
-          "    description.set_size(10000);",
-          "    this.el.override_font(description);",
-          "",
+          "  this.css = new Gtk.CssProvider();",
+          "\ttry {",
+          "\t\tthis.css.load_from_data(\"#compile-erros-view { font-size: 10px;}\");",
+          "\t} catch (Error e) {}",
+          "\tthis.el.get_style_context().add_provider(this.css,",
+          "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+          "\t ",
+          "\t ",
           "}",
           ""
          ],
          "* pack" : "add",
+         "Gtk.CssProvider css" : "",
          "id" : "compile_tree",
          "items" : [
           {
            "    "
           ]
          },
+         "string name" : "compile-erros-view",
          "xtype" : "TreeView"
         }
        ],
index 508aa87..1f95a2a 100644 (file)
@@ -253,6 +253,7 @@ public class Xcls_ValaCompileErrors : Object
 
 
             // my vars (def)
+        public Gtk.CssProvider css;
 
         // ctor
         public Xcls_compile_tree(Xcls_ValaCompileErrors _owner )
@@ -264,6 +265,7 @@ public class Xcls_ValaCompileErrors : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.name = "compile-erros-view";
             var child_0 = new Xcls_compile_result_store( _this );
             child_0.ref();
             this.el.set_model (  child_0.el  );
@@ -274,10 +276,14 @@ public class Xcls_ValaCompileErrors : Object
             // init method
 
             {
-             var description = new Pango.FontDescription();
-                description.set_size(10000);
-                this.el.override_font(description);
-            
+              this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#compile-erros-view { font-size: 10px;}");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+                
+                
             }
 
             //listeners
index 7e20e43..7f7532a 100644 (file)
          "* init" : [
           "{",
           "",
-          "    var description =   Pango.FontDescription.from_string(\"monospace\");",
-          "    description.set_size(8000);",
-          "    this.el.override_font(description);",
-          "",
+          "   \tthis.css = new Gtk.CssProvider();",
+          "\ttry {",
+          "\t\tthis.css.load_from_data(\"#compile-results-view { font: 10px Monospace;}\");",
+          "\t} catch (Error e) {}",
+          "\tthis.el.get_style_context().add_provider(this.css,",
+          "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+          "\t  ",
           "",
           "}",
           ""
          ],
          "* pack" : "add",
+         "Gtk.CssProvider css" : "",
          "bool editable" : false,
          "bool show_line_numbers" : false,
          "id" : "sourceview",
+         "string name" : "compile-results-view",
          "xtype" : "SourceView"
         }
        ],
index a36bb93..6751a74 100644 (file)
@@ -153,6 +153,7 @@ public class Xcls_ValaCompileResults : Object
 
 
             // my vars (def)
+        public Gtk.CssProvider css;
 
         // ctor
         public Xcls_sourceview(Xcls_ValaCompileResults _owner )
@@ -164,6 +165,7 @@ public class Xcls_ValaCompileResults : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.name = "compile-results-view";
             this.el.editable = false;
             this.el.show_line_numbers = false;
 
@@ -171,10 +173,13 @@ public class Xcls_ValaCompileResults : Object
 
             {
             
-                var description =   Pango.FontDescription.from_string("monospace");
-                description.set_size(8000);
-                this.el.override_font(description);
-            
+                       this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#compile-results-view { font: 10px Monospace;}");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+                 
             
             }
         }
index d20bc63..1927eec 100644 (file)
                  "        ",
                  "     _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());",
                  "     _this.default_directory_menu.el.show_all();",
-                 "      _this.default_directory_menu.el.popup(null, null, null,  3, ev.time);",
+                 "      _this.default_directory_menu.el.popup_at_pointer(ev);",
                  "     //   print(\"click:\" + res.path.to_string());",
                  "      return true;",
                  "}"
                "        ",
                "     _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());",
                "     _this.targets_tree_menu.el.show_all();",
-               "      _this.targets_tree_menu.el.popup(null, null, null,  3, ev.time);",
+               "      _this.targets_tree_menu.el.popup_at_pointer(ev);",
                "     //   print(\"click:\" + res.path.to_string());",
                "      return true;",
                "}"
        "xtype" : "Notebook"
       },
       {
+       "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
        "$ xns" : "Gtk",
        "* pack" : "add",
        "int margin_bottom" : 4,
-       "int margin_left" : 4,
-       "int margin_right" : 4,
+       "int margin_end" : 4,
+       "int margin_start" : 4,
        "int margin_top" : 4,
        "items" : [
         {
          "xtype" : "Button"
         }
        ],
-       "xtype" : "HButtonBox"
+       "xtype" : "ButtonBox"
       }
      ],
      "xtype" : "Box"
index 10c98e3..a44406f 100644 (file)
@@ -132,7 +132,7 @@ public class ValaProjectSettingsPopover : Object
             var child_1 = new Xcls_Notebook4( _this );
             child_1.ref();
             this.el.pack_start (  child_1.el , true,true,0 );
-            var child_2 = new Xcls_HButtonBox53( _this );
+            var child_2 = new Xcls_ButtonBox53( _this );
             child_2.ref();
             this.el.add (  child_2.el  );
         }
@@ -670,7 +670,7 @@ public class ValaProjectSettingsPopover : Object
                     
                  _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());
                  _this.default_directory_menu.el.show_all();
-                  _this.default_directory_menu.el.popup(null, null, null,  3, ev.time);
+                  _this.default_directory_menu.el.popup_at_pointer(ev);
                  //   print("click:" + res.path.to_string());
                   return true;
             });
@@ -829,6 +829,7 @@ public class ValaProjectSettingsPopover : Object
 
             // set gobject values
             this.el.label = "Add Directory";
+            this.el.show();
 
             //listeners
             this.el.activate.connect( ()  => {
@@ -872,6 +873,7 @@ public class ValaProjectSettingsPopover : Object
 
             // set gobject values
             this.el.label = "Add File";
+            this.el.show();
 
             //listeners
             this.el.activate.connect( ()  => {
@@ -914,6 +916,7 @@ public class ValaProjectSettingsPopover : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.show();
         }
 
         // user defined functions
@@ -937,6 +940,7 @@ public class ValaProjectSettingsPopover : Object
 
             // set gobject values
             this.el.label = "Remove File/Directory";
+            this.el.show();
 
             //listeners
             this.el.activate.connect( ()  => {
@@ -1083,6 +1087,7 @@ public class ValaProjectSettingsPopover : Object
 
             // set gobject values
             this.el.label = "Add Compile Target";
+            this.el.show();
 
             //listeners
             this.el.activate.connect( ()  => {
@@ -1118,6 +1123,7 @@ public class ValaProjectSettingsPopover : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.show();
         }
 
         // user defined functions
@@ -1141,6 +1147,7 @@ public class ValaProjectSettingsPopover : Object
 
             // set gobject values
             this.el.label = "Remove Target";
+            this.el.show();
 
             //listeners
             this.el.activate.connect( ()  => {
@@ -1221,7 +1228,7 @@ public class ValaProjectSettingsPopover : Object
                     
                  _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());
                  _this.targets_tree_menu.el.show_all();
-                  _this.targets_tree_menu.el.popup(null, null, null,  3, ev.time);
+                  _this.targets_tree_menu.el.popup_at_pointer(ev);
                  //   print("click:" + res.path.to_string());
                   return true;
             });
@@ -1981,25 +1988,25 @@ public class ValaProjectSettingsPopover : Object
 
 
 
-    public class Xcls_HButtonBox53 : Object
+    public class Xcls_ButtonBox53 : Object
     {
-        public Gtk.HButtonBox el;
+        public Gtk.ButtonBox el;
         private ValaProjectSettingsPopover  _this;
 
 
             // my vars (def)
 
         // ctor
-        public Xcls_HButtonBox53(ValaProjectSettingsPopover _owner )
+        public Xcls_ButtonBox53(ValaProjectSettingsPopover _owner )
         {
             _this = _owner;
-            this.el = new Gtk.HButtonBox();
+            this.el = new Gtk.ButtonBox( Gtk.Orientation.HORIZONTAL );
 
             // my vars (dec)
 
             // set gobject values
-            this.el.margin_right = 4;
-            this.el.margin_left = 4;
+            this.el.margin_end = 4;
+            this.el.margin_start = 4;
             this.el.margin_bottom = 4;
             this.el.margin_top = 4;
             var child_0 = new Xcls_Button54( _this );
index bcbffc2..870cf2c 100644 (file)
          "xtype" : "Menu"
         },
         {
-         "$ Gtk.Stock stock" : "Gtk.Stock.ADD",
-         "$ icon_size" : "Gtk.IconSize.MENU",
          "$ xns" : "Gtk",
          "* pack" : "set_image",
+         "string icon_name" : "list-add",
          "xtype" : "Image"
         }
        ],
          "    var p = _this.AddPropertyPopup;",
          "    p.el.set_screen(Gdk.Screen.get_default());",
          "    p.el.show_all();",
-         "     p.el.popup(null, null, null, ev.button, ev.time);",
+         "     p.el.popup_at_pointer(ev);",
          "     return true;",
          "}"
         ]
         "    selection.set_mode( Gtk.SelectionMode.SINGLE);",
         "",
         "",
-        "    var description = new Pango.FontDescription();",
-        "    description.set_size(10000);",
-        "    this.el.override_font(description);",
-        "    ",
+        "  \tthis.css = new Gtk.CssProvider();",
+        "\ttry {",
+        "\t\tthis.css.load_from_data(\"#leftprops-view { font: 10p; x}\");",
+        "\t} catch (Error e) {}",
+        "\tthis.el.get_style_context().add_provider(this.css,",
+        "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+        "",
+        "  ",
         "}",
         ""
        ],
        "* pack" : "add",
+       "Gtk.CssProvider css" : "",
        "Xcls_PopoverProperty popover" : "null",
        "id" : "view",
        "items" : [
          "",
          "        p.el.set_screen(Gdk.Screen.get_default());",
          "        p.el.show_all();",
-         "        p.el.popup(null, null, null,  ev.button, ev.time);",
+         "        p.el.popup_at_pointer(ev);",
          "        //Seed.print(\"click:\" + res.column.title);",
          "        // select the ",
          "        GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {",
          "}"
         ]
        },
+       "string name" : "leftprops-view",
        "tooltip_column" : 3,
        "xtype" : "TreeView",
        "| void editPropertyDetails" : [
index 7410ec0..76ba245 100644 (file)
@@ -741,7 +741,7 @@ public class Xcls_LeftProps : Object
                 var p = _this.AddPropertyPopup;
                 p.el.set_screen(Gdk.Screen.get_default());
                 p.el.show_all();
-                 p.el.popup(null, null, null, ev.button, ev.time);
+                 p.el.popup_at_pointer(ev);
                  return true;
             });
         }
@@ -1407,8 +1407,7 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.stock = Gtk.Stock.ADD;
-            this.el.icon_size = Gtk.IconSize.MENU;
+            this.el.icon_name = "list-add";
         }
 
         // user defined functions
@@ -1458,6 +1457,7 @@ public class Xcls_LeftProps : Object
 
 
             // my vars (def)
+        public Gtk.CssProvider css;
         public Xcls_PopoverProperty popover;
 
         // ctor
@@ -1471,6 +1471,7 @@ public class Xcls_LeftProps : Object
             this.popover = null;
 
             // set gobject values
+            this.el.name = "leftprops-view";
             this.el.tooltip_column = 3;
             this.el.enable_tree_lines = true;
             this.el.headers_visible = true;
@@ -1493,10 +1494,14 @@ public class Xcls_LeftProps : Object
                 selection.set_mode( Gtk.SelectionMode.SINGLE);
             
             
-                var description = new Pango.FontDescription();
-                description.set_size(10000);
-                this.el.override_font(description);
-                
+               this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#leftprops-view { font: 10p; x}");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+            
+              
             }
 
             //listeners
@@ -1545,7 +1550,7 @@ public class Xcls_LeftProps : Object
             
                     p.el.set_screen(Gdk.Screen.get_default());
                     p.el.show_all();
-                    p.el.popup(null, null, null,  ev.button, ev.time);
+                    p.el.popup_at_pointer(ev);
                     //Seed.print("click:" + res.column.title);
                     // select the 
                     GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
index 5872651..53f5a4a 100644 (file)
        "$ xns" : "Gtk",
        "* init" : [
         "{",
-        "    var description = new Pango.FontDescription();",
-        "    description.set_size(8000);",
-        "    this.el.override_font(description);",
-        "",
+        "   this.css = new Gtk.CssProvider();",
+        "\ttry {",
+        "\t\tthis.css.load_from_data(\"#left-tree-view { font-size: 10px;}\");",
+        "\t} catch (Error e) {}",
+        "\tthis.el.get_style_context().add_provider(this.css,",
+        "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+        "\t ",
+        "\t ",
+        "     ",
         "    var selection = this.el.get_selection();",
         "    selection.set_mode( Gtk.SelectionMode.SINGLE);",
         "",
@@ -79,6 +84,7 @@
        ],
        "* pack" : "add",
        "Boolean id" : "view",
+       "Gtk.CssProvider css" : "",
        "bool button_is_pressed" : false,
        "bool expand" : true,
        "bool headers_visible" : false,
          "        ",
          "     _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());",
          "     _this.LeftTreeMenu.el.show_all();",
-         "      _this.LeftTreeMenu.el.popup(null, null, null,  3, ev.time);",
+         "      _this.LeftTreeMenu.el.popup_at_pointer(ev);",
          "     //   print(\"click:\" + res.path.to_string());",
          "      return true;",
          "}"
          ""
         ]
        },
+       "string name" : "left-tree-view",
        "tooltip_column" : 1,
        "xtype" : "TreeView",
        "| void highlightDropPath" : [
index ccd1070..6dfb9b0 100644 (file)
@@ -119,6 +119,7 @@ public class Xcls_WindowLeftTree : Object
         public string dragData;
         public bool button_is_pressed;
         public bool key_is_pressed;
+        public Gtk.CssProvider css;
         public int drag_x;
         public int drag_y;
         public string[] dropList;
@@ -137,6 +138,7 @@ public class Xcls_WindowLeftTree : Object
             this.key_is_pressed = false;
 
             // set gobject values
+            this.el.name = "left-tree-view";
             this.el.expand = true;
             this.el.tooltip_column = 1;
             this.el.enable_tree_lines = true;
@@ -154,10 +156,15 @@ public class Xcls_WindowLeftTree : Object
             // init method
 
             {
-                var description = new Pango.FontDescription();
-                description.set_size(8000);
-                this.el.override_font(description);
-            
+               this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#left-tree-view { font-size: 10px;}");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+                
+                
+                 
                 var selection = this.el.get_selection();
                 selection.set_mode( Gtk.SelectionMode.SINGLE);
             
@@ -266,7 +273,7 @@ public class Xcls_WindowLeftTree : Object
                     
                  _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());
                  _this.LeftTreeMenu.el.show_all();
-                  _this.LeftTreeMenu.el.popup(null, null, null,  3, ev.time);
+                  _this.LeftTreeMenu.el.popup_at_pointer(ev);
                  //   print("click:" + res.path.to_string());
                   return true;
             });
index 2eb1ef6..927d817 100644 (file)
            "* init" : [
             "{",
             "   ",
-            "   ",
-            "    var description =   Pango.FontDescription.from_string(\"monospace\");",
-            "    description.set_size(8000);",
-            "    this.el.override_font(description);",
-            "",
+            "   this.css = new Gtk.CssProvider();",
+            "\ttry {",
+            "\t\tthis.css.load_from_data(\"#roo-view { font: 10px Monospace;}\");",
+            "\t} catch (Error e) {}",
+            "\tthis.el.get_style_context().add_provider(this.css,",
+            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+            "\t ",
+            "\t ",
+            "    ",
             "    this.loading = true;",
             "    //var buf = this.el.get_buffer();",
             "    //buf.notify.connect(this.onCursorChanged);",
             " "
            ],
            "* pack" : "add",
+           "Gtk.CssProvider css" : "",
            "gboolean editable" : false,
            "gboolean show_line_marks" : true,
            "gboolean show_line_numbers" : true,
              ""
             ]
            },
+           "string name" : "roo-view",
            "xtype" : "SourceView",
            "| string toString" : [
             "() {",
           {
            "$ xns" : "Gtk",
            "* init" : [
-            "var description =   Pango.FontDescription.from_string(\"monospace\");",
-            "\tdescription.set_size(8000);",
-            "\t this.el.override_font(description);",
-            "",
+            "\tthis.css = new Gtk.CssProvider();",
+            "\ttry {",
+            "\t\tthis.css.load_from_data(\"#roo-search-entry { background-color: #ccc; }\");",
+            "\t} catch (Error e) {}",
+            "\tthis.el.get_style_context().add_provider(this.css,",
+            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION);",
+            "\t ",
+            " ",
             ""
            ],
+           "Gtk.CssProvider css" : "",
            "bool hexpand" : true,
            "id" : "search_entry",
            "int width_request" : 300,
              "} "
             ]
            },
+           "string name" : "roo-search-entry",
            "string placeholder_text" : "Press enter to search",
            "xtype" : "SearchEntry",
            "| void forwardSearch" : [
                "}"
               ]
              },
-             "xtype" : "ImageMenuItem",
+             "xtype" : "MenuItem",
              "| void updateResults" : [
               "() {",
               "\tthis.el.visible = true;",
index 0178a7d..4f2ad3a 100644 (file)
@@ -1086,6 +1086,7 @@ public class Xcls_WindowRooView : Object
         public bool button_is_pressed;
         public string prop_selected;
         public bool key_is_pressed;
+        public Gtk.CssProvider css;
         public JsRender.Node? node_selected;
 
         // ctor
@@ -1104,6 +1105,7 @@ public class Xcls_WindowRooView : Object
             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;
@@ -1115,11 +1117,15 @@ public class Xcls_WindowRooView : Object
 
             {
                
-               
-                var description =   Pango.FontDescription.from_string("monospace");
-                description.set_size(8000);
-                this.el.override_font(description);
-            
+               this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#roo-view { font: 10px Monospace;}");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+                
+                
+                
                 this.loading = true;
                 //var buf = this.el.get_buffer();
                 //buf.notify.connect(this.onCursorChanged);
@@ -1776,6 +1782,7 @@ public class Xcls_WindowRooView : Object
 
 
             // my vars (def)
+        public Gtk.CssProvider css;
 
         // ctor
         public Xcls_search_entry(Xcls_WindowRooView _owner )
@@ -1788,14 +1795,18 @@ public class Xcls_WindowRooView : Object
 
             // set gobject values
             this.el.width_request = 300;
+            this.el.name = "roo-search-entry";
             this.el.hexpand = true;
             this.el.placeholder_text = "Press enter to search";
 
             // init method
 
-            var description =   Pango.FontDescription.from_string("monospace");
-               description.set_size(8000);
-                this.el.override_font(description);
+            this.css = new Gtk.CssProvider();
+               try {
+                       this.css.load_from_data("#roo-search-entry { background-color: #ccc; }");
+               } catch (Error e) {}
+               this.el.get_style_context().add_provider(this.css,
+                       Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
 
             //listeners
             this.el.key_press_event.connect( (event) => {
@@ -1915,23 +1926,24 @@ public class Xcls_WindowRooView : Object
     }
     public class Xcls_search_results : Object
     {
-        public Gtk.ImageMenuItem el;
+        public Gtk.MenuItem el;
         private Xcls_WindowRooView  _this;
 
 
             // my vars (def)
+        public bool always_show_image;
 
         // ctor
         public Xcls_search_results(Xcls_WindowRooView _owner )
         {
             _this = _owner;
             _this.search_results = this;
-            this.el = new Gtk.ImageMenuItem();
+            this.el = new Gtk.MenuItem();
 
             // my vars (dec)
+            this.always_show_image = true;
 
             // set gobject values
-            this.el.always_show_image = true;
             this.el.visible = false;
             this.el.show();
 
index e7ed6b9..c4b7d1c 100644 (file)
@@ -391,7 +391,7 @@ public class JsRender.NodeToGtk : Object {
                ((global::Gtk.Widget)parent).button_press_event.connect((s, ev) => { 
                        p.set_screen(Gdk.Screen.get_default());
                        p.show_all();
-                       p.popup(null, null, null, ev.button, ev.time);
+                       p.popup_at_pointer(ev);
                        return true;
                });
        }