src/Builder4/WindowRooView.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:47:06 +0000 (11:47 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:47:06 +0000 (11:47 +0800)
src/Builder4/WindowRooView.vala

src/Builder4/WindowRooView.bjs
src/Builder4/WindowRooView.vala

index 1bb1741..462679c 100644 (file)
@@ -11,7 +11,7 @@
    "| void scroll_to_line" : "(int line) {\n   this.notebook.el.page = 1;// code preview...\n   \n   GLib.Timeout.add(500, () => {\n   \n   \n\t   \n\t   \n\t\t  var buf = this.sourceview.el.get_buffer();\n\t \n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter;   \n\t\tsbuf.get_iter_at_line(out iter,  line);\n\t\tthis.sourceview.el.scroll_to_iter(iter,  0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t});   \n\n   \n}\n",
    "id" : "WindowRooView",
    "# Gtk.Widget lastObj" : "null",
-   "| void createThumb" : "() {\n    \n    \n    if (this.file == null) {\n        return;\n    }\n    var filename = this.file.getIconFileName(false);\n    \n    var  win = this.el.get_parent_window();\n    var width = win.get_width();\n  //  var height = win.get_height();\n    try { \n        Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.el.position);\n        screenshot.save(filename,\"png\");\n    } catch(Error e) {\n        //noop\n    }\n\n    \n     \n    \n     \n}\n",
+   "| void createThumb" : "() {\n    \n    \n    if (this.file == null) {\n        return;\n    }\n    var filename = this.file.getIconFileName(false);\n    \n    var  win = this.el.get_parent_window();\n    var width = win.get_width();\n  //  var height = win.get_height();\n    try { \n        Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);\n        screenshot.save(filename,\"png\");\n    } catch(Error e) {\n        //noop\n    }\n\n    \n     \n    \n     \n}\n",
    "| void loadFile" : "\n(JsRender.JsRender file)\n{\n    this.file = file;\n    this.view.renderJS(true);\n    this.notebook.el.page = 0;// gtk preview \n    this.sourceview.loadFile();   \n    \n}\n \n ",
    "int width" : 0,
    "bool hexpand" : true,
index 1936166..585af37 100644 (file)
@@ -86,7 +86,7 @@ public class Xcls_WindowRooView : Object
         var width = win.get_width();
       //  var height = win.get_height();
         try { 
-            Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.el.position);
+            Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, this.paned.el.position);
             screenshot.save(filename,"png");
         } catch(Error e) {
             //noop