Mercurial > code > home > repos > light9
comparison bin/subcomposer @ 834:ae359590eb8a
logging
Ignore-this: 38894578f8bf4cf53b29f684ea9b8fe4
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Tue, 04 Jun 2013 23:52:13 +0000 |
parents | bdfdfea84510 |
children | 321fc6150ee3 |
comparison
equal
deleted
inserted
replaced
833:bdfdfea84510 | 834:ae359590eb8a |
---|---|
92 b=tk.Button(text="unlink", command=self.switchToLocalSub) | 92 b=tk.Button(text="unlink", command=self.switchToLocalSub) |
93 b.pack() | 93 b.pack() |
94 | 94 |
95 | 95 |
96 def uriChanged(self, newUri): | 96 def uriChanged(self, newUri): |
97 print "chg", newUri | |
98 # i guess i show the label and icon for this | 97 # i guess i show the label and icon for this |
99 if newUri is Local: | 98 if newUri is Local: |
100 self.subIcon.config(text="(local)") | 99 self.subIcon.config(text="(local)") |
101 else: | 100 else: |
102 self.subIcon.config(text=newUri) | 101 self.subIcon.config(text=newUri) |
152 self.levelbox.pack(side='top') | 151 self.levelbox.pack(side='top') |
153 | 152 |
154 currentUri = Observable(Local) | 153 currentUri = Observable(Local) |
155 | 154 |
156 def pc(val): | 155 def pc(val): |
157 print "change viewed sub to", val | 156 log.info("change viewed sub to %s", val) |
158 currentUri.subscribe(pc) | 157 currentUri.subscribe(pc) |
159 | 158 |
160 EditChoice(self, self.graph, currentUri).frame.pack(side='top') | 159 EditChoice(self, self.graph, currentUri).frame.pack(side='top') |
161 | 160 |
162 def alltozero(): | 161 def alltozero(): |
219 tk.Button(self, text=verb, command=self.action).pack(side='left') | 218 tk.Button(self, text=verb, command=self.action).pack(side='left') |
220 | 219 |
221 def action(self, *args): | 220 def action(self, *args): |
222 subname = self.entry.get() | 221 subname = self.entry.get() |
223 self.cmd(subname) | 222 self.cmd(subname) |
224 print "sub", self.cmd, subname | 223 log.info("command %s %s", self.cmd, subname) |
225 | 224 |
226 def set(self, text): | 225 def set(self, text): |
227 self.entry.delete(0, 'end') | 226 self.entry.delete(0, 'end') |
228 self.entry.insert(0, text) | 227 self.entry.insert(0, text) |
229 | 228 |