Created
March 17, 2010 18:47
-
-
Save Eugeny/335585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/log/30-log.py b/plugins/log/30-log.py | |
old mode 100644 | |
new mode 100755 | |
index e25d02b..e590deb | |
--- a/plugins/log/30-log.py | |
+++ b/plugins/log/30-log.py | |
@@ -22,7 +22,8 @@ class LogPluginInstance(PluginInstance): | |
_pathLabel = None; | |
_pathTree = None; | |
- | |
+ _logArea = None | |
+ | |
def _on_load(self, s): | |
PluginInstance._on_load(self, s) | |
@@ -45,6 +46,7 @@ class LogPluginInstance(PluginInstance): | |
_pathLabel = ui.Label('/var/log/') | |
lb = ui.Label('') | |
+ self._logArea = lb | |
sl = ui.ScrollContainer([lb]) | |
sl.width = 500 | |
sl.height = 380 | |
@@ -74,8 +76,8 @@ class LogTreeNode(ui.TreeContainerNode): | |
ui.TreeContainerNode.__init__(self) | |
self.text = os.path.basename(d) | |
self.dir_name = d | |
- self.rescan() | |
self.owner = own | |
+ self.rescan() | |
def rescan(self): | |
dirList = os.listdir(self.dir_name) | |
@@ -84,7 +86,7 @@ class LogTreeNode(ui.TreeContainerNode): | |
for x in dirList: | |
try: | |
if os.path.isdir(os.path.join(self.dir_name, x)): | |
- tn = LogTreeNode(os.path.join(self.dir_name, x)) | |
+ tn = LogTreeNode(os.path.join(self.dir_name, x), self.owner) | |
self.add_element(tn) | |
else: | |
tn = ui.Link(x) | |
@@ -94,6 +96,6 @@ class LogTreeNode(ui.TreeContainerNode): | |
except: | |
pass | |
- def _on_link_clicked(self): | |
- self.owner.lb.text = "hello from log tree" | |
+ def _on_link_clicked(self, t, e, d): | |
+ self.owner._logArea.text = "hello from log tree" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment