Clones.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 16 Nov 2018 02:15:40 +0000 (10:15 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 16 Nov 2018 02:15:40 +0000 (10:15 +0800)
Clones.vala
RepoStatusPopover.bjs
RepoStatusPopover.vala

Clones.bjs
Clones.vala
RepoStatusPopover.bjs
RepoStatusPopover.vala

index dfcfbf9..fc06c5f 100644 (file)
@@ -95,7 +95,7 @@
        "items" : [
         {
          "listeners" : {
-          "row_activated" : "(path, col)  =>  {\n\n\tif (col.title != \"Active Ticket\") {\n\t\treturn;\n\t}\n\t\n\t//\n\t\n\tGtk.TreeIter iter;\n\t_this.reposStore.el.get_iter(out iter, path);\n\tGLib.Value val;\n    _this.reposStore.el.get_value(iter, 6, out val);\n    var git_working_dir = (string)val;\n    \n    var repo = GitRepo.singleton().get(git_working_dir);\n    \n    Gdk.Rectangle rect;\n    _this.reposView.el.get_cell_area(path, col, out rect);\n    RepoStatusPopover.singleton().show(this.el, rect, repos);\n    \n     \n    \n}",
+          "row_activated" : "(path, col)  =>  {\n\n\tif (col.title != \"Active Ticket\") {\n\t\treturn;\n\t}\n\t\n\t//\n\t\n\tGtk.TreeIter iter;\n\t_this.reposStore.el.get_iter(out iter, path);\n\tGLib.Value val;\n    _this.reposStore.el.get_value(iter, 6, out val);\n    var git_working_dir = (string)val;\n    \n    var repo = GitRepo.singleton().get(git_working_dir);\n    \n    Gdk.Rectangle rect;\n    _this.reposView.el.get_cell_area(path, col, out rect);\n    RepoStatusPopover.singleton().show(this.el, rect, repo);\n    \n     \n    \n}",
           "cursor_changed" : "()  => {\n  // SEE SELECTION.CHANGED\n  /*\n  \n  return;\n  \n    if (this.el.get_selection().count_selected_rows() < 1) {\n        //nothing? - clea it?\n        return;\n    }\n        var ret = {};         \n    var model = this.get('/changedFilesStore');\n\n     var s = this.el.get_selection();\n     var files = [];\n    s.selected_foreach(function(model,p,iter) {\n    \n       files.push( model.get_value(iter, 0).value.get_string());\n     \n    });\n    this.get('/patchview').showDiff(files); \n    //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n     //print(\"OUT?\" + value);// id..\n    // load the list in the right grid..\n     \n    return true;\n*/\n}"
          },
          "id" : "reposView",
index 9c0664e..7a19cc4 100644 (file)
@@ -539,7 +539,7 @@ public class Clones : Object
                 
                 Gdk.Rectangle rect;
                 _this.reposView.el.get_cell_area(path, col, out rect);
-                RepoStatusPopover.singleton().show(this.el, rect, repos);
+                RepoStatusPopover.singleton().show(this.el, rect, repo);
                 
                  
                 
index ffe910a..8dc84ad 100644 (file)
@@ -9,7 +9,7 @@
  "items" : [
   {
    "GitRepo repo" : "",
-   "| void show" : " (Gtk.Widget btn, Gdk.Rectangle rect, GitRepo repo) {\n    _this.repo = repo;\n    // get the active project.\n     var lm = Gtk.SourceLanguageManager.get_default();\n                \n//    ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(\n  //      lm.get_language(\"html\")\n //   );\n  \n    //print (project.fn);\n    //project.runhtml = project.runhtml || '';\n    _this.diff_view.el.get_buffer().set_text(\"diff goes here\");\n    _this.status_view.el.get_buffer().set_text(\"status goes here\");\n       \n    \t//console.log('show all');\n\tthis.el.set_modal(true);\n    this.el.set_pointing_to(rect);\n \n\t//this.el.set_relative_to(btn);\n\n\t//this.el.set_position(Gtk.PositionType.RIGHT);\n\n\t// window + header?\n\t print(\"SHOWALL - POPIP\\n\");\n\tthis.el.show_all();\n\tthis.el.set_size_request(800,500);\n//\tthis.diff_view.el.grab_focus();\n\t\n    //this.el.show_all();\n}\n",
+   "| void show" : " (Gtk.Widget btn, Gdk.Rectangle rect, GitRepo repo) {\n    _this.repo = repo;\n    // get the active project.\n     var lm = Gtk.SourceLanguageManager.get_default();\n                \n//    ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(\n  //      lm.get_language(\"html\")\n //   );\n  \n    //print (project.fn);\n    //project.runhtml = project.runhtml || '';\n    _this.diff_view.el.get_buffer().set_text(\"diff goes here\");\n    _this.status_view.el.get_buffer().set_text(\"status goes here\");\n       \n    \t//console.log('show all');\n\tthis.el.set_modal(true);\n    this.el.set_pointing_to(rect);\n  \n\t//this.el.set_relative_to(btn);\n\n\t//this.el.set_position(Gtk.PositionType.RIGHT);\n\n\t// window + header?\n\t print(\"SHOWALL - POPIP\\n\");\n\tthis.el.show_all();\n\tthis.el.set_size_request(800,500);\n//\tthis.diff_view.el.grab_focus();\n\t\n    //this.el.show_all();\n}\n",
    "xtype" : "Popover",
    "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
    "$ xns" : "Gtk",
index 2ad14a5..4e4baa3 100644 (file)
@@ -55,7 +55,7 @@ public class RepoStatusPopover : Object
                //console.log('show all');
        this.el.set_modal(true);
         this.el.set_pointing_to(rect);
-     
+      
        //this.el.set_relative_to(btn);
     
        //this.el.set_position(Gtk.PositionType.RIGHT);