RepoStatusPopover.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 28 Dec 2018 07:21:11 +0000 (15:21 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 28 Dec 2018 07:21:11 +0000 (15:21 +0800)
RepoStatusPopover.vala

RepoStatusPopover.bjs
RepoStatusPopover.vala

index 08c53b5..13510bf 100644 (file)
@@ -35,8 +35,8 @@
        "items" : [
         {
          "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ",
-         "xtype" : "Toolbar",
          "* pack" : "add",
+         "xtype" : "Toolbar",
          "$ xns" : "Gtk",
          "items" : [
           {
        "items" : [
         {
          "id" : "label_status",
-         "* pack" : false,
          "xtype" : "Label",
+         "* pack" : false,
          "$ xns" : "Gtk",
          "utf8 label" : "Status"
         },
         {
          "id" : "label_diff",
-         "xtype" : "Label",
          "* pack" : false,
+         "xtype" : "Label",
          "$ xns" : "Gtk",
          "utf8 label" : "Diff"
         },
          "items" : [
           {
            "int height_request" : 400,
-           "* pack" : "pack_start,true,true,0",
            "xtype" : "ScrolledWindow",
+           "* pack" : "pack_start,true,true,0",
            "$ xns" : "Gtk",
            "items" : [
             {
              "id" : "diff_view",
-             "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);",
+             "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);\n     var lm = Gtk.SourceLanguageManager.get_default();\n                    \n    ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(\n        lm.get_language(\"diff\")\n    );\n  ",
              "xtype" : "View",
              "* pack" : "add",
              "$ xns" : "GtkSource"
        "items" : [
         {
          "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ",
-         "* pack" : "add",
          "xtype" : "Toolbar",
+         "* pack" : "add",
          "$ xns" : "Gtk",
          "items" : [
           {
index d48f618..e5db19f 100644 (file)
@@ -573,6 +573,11 @@ public class RepoStatusPopover : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(9000);
                 this.el.override_font(description);
+                 var lm = Gtk.SourceLanguageManager.get_default();
+                                
+                ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(
+                    lm.get_language("diff")
+                );
         }
 
         // user defined functions