• R/O
  • SSH

tkpane: Commit

Default repository for tkpane.py.


Commit MetaInfo

Revisão5c17fd7e14fdd56771cee918f83305876ce651c6 (tree)
Hora2018-03-02 09:08:29
AutorDreas Nielsen <dnielsen@inte...>
CommiterDreas Nielsen

Mensagem de Log

Merged branches.

Mudança Sumário

Diff

diff -r 237b805ffcec -r 5c17fd7e14fd tkpane/lib.py
--- a/tkpane/lib.py Thu Mar 01 16:07:57 2018 -0800
+++ b/tkpane/lib.py Thu Mar 01 16:08:29 2018 -0800
@@ -753,7 +753,7 @@
753753 """Return a list of widgets used for data entry."""
754754 return [self.file_display]
755755
756- def valid_data(self, widget):
756+ def valid_data(self, widget=None):
757757 """Return True or False indicating the validity of the filename entry.
758758
759759 Overrides TkPane class method.
@@ -764,7 +764,7 @@
764764 return not self.required
765765 else:
766766 if self.filename_validator is not None:
767- return self.filename_validator(self.datadict[self.datakey])
767+ return self.filename_validator(filename)
768768 else:
769769 return os.path.isfile(filename)
770770
@@ -837,8 +837,8 @@
837837 if fn != "":
838838 # The order of the following steps is important.
839839 self.file_var.set(fn)
840- self.handle_change_validity(True, self.file_display)
841- self.send_status_message(True)
840+ self.handle_change_validity(self.valid_data(None), self.file_display)
841+ self.send_status_message(self.valid_data(None))
842842
843843 def set_filename_validator(self, fn):
844844 """Set the callback function that will be used to check the entered filename.
Show on old repository browser