Some comments in gui.main.

This commit is contained in:
Simon Forman
2020-04-25 18:24:14 -07:00
parent a66fd8d173
commit 5da4663f98
2 changed files with 47 additions and 11 deletions
+4 -1
View File
@@ -426,7 +426,7 @@ class TextViewerWidget(tk.Text, MouseBindingsMixin, SavingMixin):
return 'break'
def init(self, title, filename, repo_relative_filename, repo, font):
self.winfo_toplevel().title(title)
self.set_window_title(title)
if os.path.exists(filename):
with open(filename) as f:
data = f.read()
@@ -440,6 +440,9 @@ class TextViewerWidget(tk.Text, MouseBindingsMixin, SavingMixin):
self.repo = repo
self['font'] = font # See below.
def set_window_title(self, title):
self.winfo_toplevel().title(title)
def reset(self):
if os.path.exists(self.filename):
with open(self.filename) as f: