From: Alan Knowles Date: Fri, 28 Dec 2018 07:21:11 +0000 (+0800) Subject: RepoStatusPopover.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=3c6e76729e481f9b67569537a86b57e243ead30b RepoStatusPopover.bjs RepoStatusPopover.vala --- diff --git a/RepoStatusPopover.bjs b/RepoStatusPopover.bjs index 08c53b54..13510bf9 100644 --- a/RepoStatusPopover.bjs +++ b/RepoStatusPopover.bjs @@ -35,8 +35,8 @@ "items" : [ { "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ", - "xtype" : "Toolbar", "* pack" : "add", + "xtype" : "Toolbar", "$ xns" : "Gtk", "items" : [ { @@ -99,15 +99,15 @@ "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" }, @@ -143,13 +143,13 @@ "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" @@ -171,8 +171,8 @@ "items" : [ { "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ", - "* pack" : "add", "xtype" : "Toolbar", + "* pack" : "add", "$ xns" : "Gtk", "items" : [ { diff --git a/RepoStatusPopover.vala b/RepoStatusPopover.vala index d48f6185..e5db19f1 100644 --- a/RepoStatusPopover.vala +++ b/RepoStatusPopover.vala @@ -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