OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 this.data.splice(oldPosition, 1); | 626 this.data.splice(oldPosition, 1); |
627 this.data.splice(newPosition, 0, item); | 627 this.data.splice(newPosition, 0, item); |
628 this.boxObject.invalidateRange(Math.min(oldPosition, newPosition), Math.ma
x(oldPosition, newPosition)); | 628 this.boxObject.invalidateRange(Math.min(oldPosition, newPosition), Math.ma
x(oldPosition, newPosition)); |
629 } | 629 } |
630 }, | 630 }, |
631 | 631 |
632 QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]), | 632 QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]), |
633 | 633 |
634 setTree: function(boxObject) | 634 setTree: function(boxObject) |
635 { | 635 { |
| 636 if (!boxObject) |
| 637 return; |
| 638 |
636 this.init(); | 639 this.init(); |
637 this.boxObject = boxObject; | 640 this.boxObject = boxObject; |
638 | 641 |
639 if (this.boxObject) | 642 if (this.boxObject) |
640 { | 643 { |
641 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA
ttribute("noGroupText"), dummy: true}}; | 644 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA
ttribute("noGroupText"), dummy: true}}; |
642 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge
tAttribute("noFiltersText"), dummy: true}}; | 645 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge
tAttribute("noFiltersText"), dummy: true}}; |
643 this.editDummy = {filter: {text: ""}}; | 646 this.editDummy = {filter: {text: ""}}; |
644 | 647 |
645 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS
ervice); | 648 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS
ervice); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 getProgressMode: () => null, | 837 getProgressMode: () => null, |
835 getImageSrc: () => null, | 838 getImageSrc: () => null, |
836 isSeparator: () => false, | 839 isSeparator: () => false, |
837 performAction: () => {}, | 840 performAction: () => {}, |
838 performActionOnRow: () => {}, | 841 performActionOnRow: () => {}, |
839 performActionOnCell: () => {}, | 842 performActionOnCell: () => {}, |
840 getCellValue: () => null, | 843 getCellValue: () => null, |
841 setCellValue: () => {}, | 844 setCellValue: () => {}, |
842 selectionChanged: () => {} | 845 selectionChanged: () => {} |
843 }; | 846 }; |
OLD | NEW |