Skip to content
Snippets Groups Projects

Sc 107/default extention file selection

Merged Ghost User requested to merge SC-107/default-extention-file-selection into master
1 file
+ 19
15
Compare changes
  • Side-by-side
  • Inline
+ 19
15
@@ -41,18 +41,20 @@ class ViewClass:
self.tf2_label.grid(column=2, row=2, padx=15, pady=10)
# Buttons (clicky bois)
self.button_source = Button(self.tf1_label, text="Select source file...",
width=17)
self.button_source = Button(self.tf1_label,
text="Select source file...", width=17)
self.button_source.grid(column=1, row=5, padx=5, pady=10)
self.button_delete_source = Button(self.tf1_label, text="Delete source", width=17)
self.button_delete_source = Button(self.tf1_label, text="Delete source"
, width=17)
self.button_delete_source.grid(column=1, row=6, padx=5, pady=10)
self.button_shadow = Button(self.tf2_label, text="Select shadowed file...",
width=17)
self.button_shadow = Button(self.tf2_label,
text="Select shadowed file...", width=17)
self.button_shadow.grid(column=2, row=5, padx=5, pady=10)
self.button_delete_shadow = Button(self.tf2_label, text="Delete shadow", width=17)
self.button_delete_shadow = Button(self.tf2_label, text="Delete shadow"
, width=17)
self.button_delete_shadow.grid(column=2, row=6, padx=5, pady=10)
self.comparison_button = Button(self.frame, text="Compare")
@@ -62,13 +64,15 @@ class ViewClass:
self.save_button.grid(column=2, row=4, padx=40)
# Combobox for file selection
self.filebox_1 = ttk.Combobox(self.tf1_label, textvariable=self.curr_source,
postcommand=self.get_sources, state="readonly",
width=20)
self.filebox_1 = ttk.Combobox(self.tf1_label,
textvariable=self.curr_source,
postcommand=self.get_sources,
state="readonly", width=20)
self.filebox_1.grid(column=1, row=2, sticky=W, padx=10, pady=10)
self.filebox_2 = ttk.Combobox(self.tf2_label, textvariable=self.curr_shadow,
postcommand=self.get_shadows, state="readonly",
width=20)
self.filebox_2 = ttk.Combobox(self.tf2_label,
textvariable=self.curr_shadow,
postcommand=self.get_shadows,
state="readonly", width=20)
self.filebox_2.grid(column=2, row=2, sticky=W, padx=10, pady=10)
# Message label
@@ -91,7 +95,7 @@ class ViewClass:
self.window.mainloop()
def add_file_entry(self, entry, type_code):
""""Adds a file name to the combobox values displaying the file options.
"""Adds a file name to the combobox values displaying the file options.
When a new file is added, it displays the last selected one.
Type code optionsL 'source' & 'shadow'.
"""
@@ -105,8 +109,8 @@ class ViewClass:
self.curr_shadow.set(self.filebox_2['values'][-1])
def remove_file_entry(self, entry, type_code):
""""Removes a file name to the combobox values displaying the file options.
When a new file is added, it displays the last selected one.
"""Removes a file name from the combobox values displaying the file
options. When a new file is added, it displays the last selected one.
Type code optionsL 'source' & 'shadow'.
"""
if type_code == "source":
Loading