Skip to content
Snippets Groups Projects

Sc209/dropdown menus

Merged Ghost User requested to merge SC209/dropdown-menus into review-window
1 file
+ 20
14
Compare changes
  • Side-by-side
  • Inline
+ 20
14
@@ -19,6 +19,7 @@ class View:
# Draw splash
self._splash = SplashView(self._window)
self._review = None
# Create rest of GUI
self._window.wm_title("Umbra")
@@ -464,20 +465,7 @@ class View:
def display_review(self):
"""Displays a pop-up window for reviewing the results of
the analysis."""
pop_up = tk.Toplevel()
pop_up.title("Review results")
set_icon(pop_up, get_path("resources/logo.ico"))
self._center_window(pop_up)
self._create_label('review_title', pop_up, 'Review marked mistakes',
0, 0, False)
self._create_label('review_label', pop_up, 'File: ', 1, 0, False)
self._create_combobox('review_box', pop_up, 1, 1)
# Is the save functionality here equal to the other save button?
self._create_button('save_review', pop_up, 'Save', 2, 0)
self._create_button('cancel', pop_up, 'Cancel', 2, 1)
self._review = ReviewWindow(self._window)
class SplashView(tk.Toplevel, View):
@@ -499,3 +487,21 @@ class SplashView(tk.Toplevel, View):
def terminate(self):
"""Close the splash window."""
self.destroy()
class ReviewWindow(tk.Toplevel, View):
def __init__(self, parent):
tk.Toplevel.__init__(self, parent)
self.title("Review results")
set_icon(self, get_path("resources/logo.ico"))
self._elements = {} # Dict to avoid large number of attributes
self._center_window(self)
self._create_label('review_title', self, 'Review marked mistakes',
0, 0, False)
self._create_label('review_label', self, 'File: ', 1, 0, False)
self._create_combobox('review_box', self, 1, 1)
self._create_button('save_review', self, 'Save', 2, 0)
self._create_button('cancel', self, 'Cancel', 2, 1)
Loading