[Joypy-announce] joypy/Joypy: 3 new changesets

アーカイブの一覧に戻る
scmno****@osdn***** scmno****@osdn*****
Sun May 3 04:51:47 JST 2020


changeset 97e2dd14a56e in joypy/Joypy
details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=97e2dd14a56e
user: Simon Forman <sform****@hushm*****>
date: Tue Apr 28 17:33:10 2020 -0700
description: Add Python 3 classifiers and ignore __pycache__ dirs.
changeset 23bd7dd5bb0c in joypy/Joypy
details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=23bd7dd5bb0c
user: Simon Forman <sform****@hushm*****>
date: Fri May 01 23:09:09 2020 -0700
description: Python is 3 now.
changeset 9a180df09e64 in joypy/Joypy
details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=9a180df09e64
user: Simon Forman <sform****@hushm*****>
date: Sat May 02 12:51:29 2020 -0700
description: Put the log and scratch text in the same window.

This is a step towards Ticket #40360 without going all the way.  You can
open additional viewer windows.  They are not connected by an
Oberon-style messaging system (yet.  It would be nice to use the Tk event
system for that.)

This way the log and the main/scratch/system-menu text are conceptually
unified in the (equivelent of "desktop") base metaphor of the system.

diffstat:

 .hgignore                                           |   3 ++-
 docs/sphinx_docs/_build/html/_sources/index.rst.txt |   2 +-
 docs/sphinx_docs/_build/html/index.html             |   2 +-
 docs/sphinx_docs/index.rst                          |   2 +-
 joy/gui/main.py                                     |  15 ++++-----------
 joy/gui/textwidget.py                               |  14 ++++++++++++--
 setup.py                                            |   1 +
 7 files changed, 22 insertions(+), 17 deletions(-)

diffs (133 lines):

diff -r 856a08a4998b -r 9a180df09e64 .hgignore
--- a/.hgignore	Tue Apr 28 15:46:32 2020 -0700
+++ b/.hgignore	Sat May 02 12:51:29 2020 -0700
@@ -9,4 +9,5 @@
 venv
 build
 Thun.egg-info
-dist
\ No newline at end of file
+dist
+__pycache__
\ No newline at end of file
diff -r 856a08a4998b -r 9a180df09e64 docs/sphinx_docs/_build/html/_sources/index.rst.txt
--- a/docs/sphinx_docs/_build/html/_sources/index.rst.txt	Tue Apr 28 15:46:32 2020 -0700
+++ b/docs/sphinx_docs/_build/html/_sources/index.rst.txt	Sat May 02 12:51:29 2020 -0700
@@ -6,7 +6,7 @@
 Thun |release| Documentation
 ============================
 
-Thun is dialect of Joy written in Python 2.
+Thun is dialect of Joy written in Python.
 
 `Joy`_ is a programming language created by Manfred von Thun that is easy to
 use and understand and has many other nice properties.  This Python
diff -r 856a08a4998b -r 9a180df09e64 docs/sphinx_docs/_build/html/index.html
--- a/docs/sphinx_docs/_build/html/index.html	Tue Apr 28 15:46:32 2020 -0700
+++ b/docs/sphinx_docs/_build/html/index.html	Sat May 02 12:51:29 2020 -0700
@@ -34,7 +34,7 @@
             
   <div class="section" id="thun-release-documentation">
 <h1>Thun 0.3.0 Documentation<a class="headerlink" href="#thun-release-documentation" title="Permalink to this headline">¶</a></h1>
-<p>Thun is dialect of Joy written in Python 2.</p>
+<p>Thun is dialect of Joy written in Python.</p>
 <p><a class="reference external" href="https://en.wikipedia.org/wiki/Joy_(programming_language)">Joy</a> is a programming language created by Manfred von Thun that is easy to
 use and understand and has many other nice properties.  This Python
 package implements an interpreter for a dialect of Joy that attempts to
diff -r 856a08a4998b -r 9a180df09e64 docs/sphinx_docs/index.rst
--- a/docs/sphinx_docs/index.rst	Tue Apr 28 15:46:32 2020 -0700
+++ b/docs/sphinx_docs/index.rst	Sat May 02 12:51:29 2020 -0700
@@ -6,7 +6,7 @@
 Thun |release| Documentation
 ============================
 
-Thun is dialect of Joy written in Python 2.
+Thun is dialect of Joy written in Python.
 
 `Joy`_ is a programming language created by Manfred von Thun that is easy to
 use and understand and has many other nice properties.  This Python
diff -r 856a08a4998b -r 9a180df09e64 joy/gui/main.py
--- a/joy/gui/main.py	Tue Apr 28 15:46:32 2020 -0700
+++ b/joy/gui/main.py	Sat May 02 12:51:29 2020 -0700
@@ -46,7 +46,7 @@
 
 # Now that logging is set up, continue loading the system.
 
-from joy.gui.textwidget import TextViewerWidget, tk, get_font
+from joy.gui.textwidget import TextViewerWidget, tk, get_font, make_main_window
 from joy.gui.world import StackDisplayWorld
 from joy.library import initialize, DefinitionWrapper
 from joy.utils.stack import stack_to_string
@@ -116,8 +116,8 @@
 
 
 	def show_log(*args):
-		log_window.wm_deiconify()
-		log_window.update()
+		# log_window.wm_deiconify()
+		# log_window.update()
 		return args
 
 
@@ -144,14 +144,7 @@
 
 world = StackDisplayWorld(repo, STACK_FN, REL_STACK_FN, dictionary=D)
 
-t = TextViewerWidget(world, **VIEWER_DEFAULTS)
-
-log_window = tk.Toplevel()
-# Make it so that you can't actually close the log window, if you try it
-# will just "withdraw" (which is like minifying but without a entry in
-# the taskbar or icon or whatever.)
-log_window.protocol("WM_DELETE_WINDOW", log_window.withdraw)
-log = TextViewerWidget(world, log_window, **VIEWER_DEFAULTS)
+top, t, log = make_main_window(world)
 
 FONT = get_font('Iosevka', size=14)  # Requires Tk root already set up.
 
diff -r 856a08a4998b -r 9a180df09e64 joy/gui/textwidget.py
--- a/joy/gui/textwidget.py	Tue Apr 28 15:46:32 2020 -0700
+++ b/joy/gui/textwidget.py	Sat May 02 12:51:29 2020 -0700
@@ -426,7 +426,6 @@
 		return 'break'
 
 	def init(self, title, filename, repo_relative_filename, repo, font):
-		self.set_window_title(title)
 		if os.path.exists(filename):
 			with open(filename) as f:
 				data = f.read()
@@ -434,7 +433,6 @@
 			# Prevent this from triggering a git commit.
 			self.update()
 			self._cancelSave()
-		self.pack(expand=True, fill=tk.BOTH)
 		self.filename = filename
 		self.repo_relative_filename = repo_relative_filename
 		self.repo = repo
@@ -472,3 +470,15 @@
 
 		T.pack(expand=1, fill=tk.BOTH)
 		T.see(tk.END)
+
+
+def make_main_window(world):
+	m = tk.PanedWindow(orient=tk.HORIZONTAL)
+	m.winfo_toplevel().title('Thun')
+	m.pack(fill=tk.BOTH, expand=True)
+	H = 45
+	t = TextViewerWidget(world, m, width=128, height=H)
+	log = TextViewerWidget(world, m, width=73, height=H)
+	m.add(log)
+	m.add(t)
+	return m, t, log
diff -r 856a08a4998b -r 9a180df09e64 setup.py
--- a/setup.py	Tue Apr 28 15:46:32 2020 -0700
+++ b/setup.py	Sat May 02 12:51:29 2020 -0700
@@ -41,6 +41,7 @@
 		'Development Status :: 4 - Beta',
 		'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
 		'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
 		'Programming Language :: Other',
 		'Topic :: Software Development :: Interpreters',
 		],


More information about the Joypy-announce mailing list
アーカイブの一覧に戻る