This repo is not current. Development has moved from Hg to Git. For the latest code use the "Source Code" tab above to go to the "Thun" git repo or navigate to:
https://osdn.net/projects/joypy/scm/git/Thun
Revisão | 2fabf83489a67ba9cf9b8fd4b4a8600fb0c8c98d (tree) |
---|---|
Hora | 2020-05-28 03:29:12 |
Autor | Simon Forman <sforman@hush...> |
Commiter | Simon Forman |
Minor cleanup.
@@ -19,7 +19,6 @@ | ||
19 | 19 | # along with Thun. If not see <http://www.gnu.org/licenses/>. |
20 | 20 | # |
21 | 21 | from setuptools import setup |
22 | -from textwrap import dedent | |
23 | 22 | |
24 | 23 | |
25 | 24 | setup( |
@@ -2,12 +2,11 @@ | ||
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 | # |
4 | 4 | # This is a script, the module namespace is used as a kind of singleton |
5 | -# for organizing the moving parts of the system. I forget why I didn't | |
6 | -# use a more typical class. | |
5 | +# for organizing the moving parts of the system. | |
7 | 6 | # |
8 | -# This docstring doubles as the log header that the system prints when | |
9 | -# the log is reset. | |
10 | - | |
7 | +# (The docstring doubles as a header that the system prints, see below. | |
8 | +# It's a two-line string broken up into chunks so you can read it in the | |
9 | +# source without wrapping. In the Text widgets it will be wrapped.) | |
11 | 10 | ('''\ |
12 | 11 | Joypy - Copyright © 2018 Simon Forman |
13 | 12 | ''' |
@@ -55,6 +54,7 @@ | ||
55 | 54 | os.path.commonprefix((repo.controldir(), path)) |
56 | 55 | ) |
57 | 56 | |
57 | + | |
58 | 58 | def commands(): |
59 | 59 | ''' |
60 | 60 | We define a bunch of meta-interpreter command functions here and |
@@ -144,18 +144,18 @@ | ||
144 | 144 | |
145 | 145 | t = TextViewerWidget(world, **VIEWER_DEFAULTS) |
146 | 146 | |
147 | -log_window = tk.Toplevel() | |
148 | -# Make it so that you can't actually close the log window, if you try it | |
149 | -# will just "withdraw" (which is like minifying but without a entry in | |
150 | -# the taskbar or icon or whatever.) | |
151 | -log_window.protocol("WM_DELETE_WINDOW", log_window.withdraw) | |
147 | +# Make it so that you can't actually close the log and stack viewers, if | |
148 | +# you try it will just "withdraw" (which is like minifying but without a | |
149 | +# entry in the taskbar or icon or whatever.) | |
150 | +w = lambda T: T.protocol("WM_DELETE_WINDOW", T.withdraw) | |
151 | + | |
152 | +log_window = tk.Toplevel() ; w(log_window) | |
152 | 153 | log = TextViewerWidget(world, log_window, **VIEWER_DEFAULTS) |
153 | 154 | |
154 | 155 | FONT = get_font('Iosevka', size=14) # Requires Tk root already set up. |
155 | 156 | |
156 | -stack_window = tk.Toplevel() | |
157 | +stack_window = tk.Toplevel() ; w(stack_window) | |
157 | 158 | stack_window.title("Stack") |
158 | -stack_window.protocol("WM_DELETE_WINDOW", log_window.withdraw) | |
159 | 159 | stack_viewer = StackListbox(world, stack_window, items=[], font=FONT) |
160 | 160 | stack_viewer.pack(expand=True, fill=tk.BOTH) |
161 | 161 | world.set_viewer(stack_viewer) |