• R/O
  • SSH

tkpane: Commit

Default repository for tkpane.py.


Commit MetaInfo

Revisão45713c5a61f62c713490553cf7083f93075b76dc (tree)
Hora2018-02-22 13:57:32
AutorDreas Nielsen <dreas.nielsen@gmai...>
CommiterDreas Nielsen

Mensagem de Log

Added parameter 'disable_on_other_exit_only' to the 'requires()' method.

Mudança Sumário

Diff

diff -r 256aedf3522f -r 45713c5a61f6 doc/source/conf.py
--- a/doc/source/conf.py Wed Feb 21 20:14:55 2018 -0800
+++ b/doc/source/conf.py Wed Feb 21 20:57:32 2018 -0800
@@ -55,9 +55,9 @@
5555 # built documents.
5656 #
5757 # The short X.Y version.
58-version = u'0.14.1'
58+version = u'0.15.1'
5959 # The full version, including alpha/beta/rc tags.
60-release = u'0.14.1'
60+release = u'0.15.1'
6161
6262 # The language for content autogenerated by Sphinx. Refer to documentation
6363 # for a list of supported languages.
diff -r 256aedf3522f -r 45713c5a61f6 setup.py
--- a/setup.py Wed Feb 21 20:14:55 2018 -0800
+++ b/setup.py Wed Feb 21 20:57:32 2018 -0800
@@ -2,7 +2,7 @@
22
33 setup(name='tkpane',
44 packages=['tkpane'],
5- version='0.14.1',
5+ version='0.15.1',
66 description="Encapsulates Tkinter UI elements in 'panes' that can be combined into an overall UI, integrating them by specifying callback functions and data keys.",
77 author='Dreas Nielsen',
88 author_email='dreas.nielsen@gmail.com',
diff -r 256aedf3522f -r 45713c5a61f6 tkpane/tkpane.py
--- a/tkpane/tkpane.py Wed Feb 21 20:14:55 2018 -0800
+++ b/tkpane/tkpane.py Wed Feb 21 20:57:32 2018 -0800
@@ -27,7 +27,7 @@
2727 that pass specific data to allow communication between panes, and callback methods
2828 for reporting status and progress."""
2929
30-__version__ = "0.14.0"
30+__version__ = "0.15.0"
3131
3232
3333 try:
@@ -425,11 +425,12 @@
425425 self.invalid_color = color
426426 self.show_widgets_validity()
427427
428- def requires(self, other_pane, enable_on_other_exit_only=False, clear_on_enable=False, clear_on_disable=False):
428+ def requires(self, other_pane, enable_on_other_exit_only=False, disable_on_other_exit_only=False, clear_on_enable=False, clear_on_disable=False):
429429 """Set handler functions for the other pane to enable or disable this pane.
430430
431431 :param other_pane: The pane which must have valid data for this pane to be enabled.
432432 :param enable_on_other_exit_only: A Boolean indicating whether this pane should be enabled only when the other pane exits with valid data (True) or any time the other pane's data become valid (False). Default: False.
433+ :param disable_on_other_exit_only: A Boolean indicating whether this pane should be disabled only when the other pane exits with invalid data (True) or any time the other pane's data become invalid (False). Default: False.
433434 :param clear_on_enable: A Boolean indicating whether this pane should be cleared when it is enabled. Default: False.
434435 :param clear_on_disable: A Boolean indicating whether this pane should be cleared when it is disabled. Default: False.
435436
@@ -448,8 +449,9 @@
448449 other_pane.on_change_data_valid.append(PaneDataHandler(self.enable))
449450 if not has_handler_function(other_pane.on_exit_data_valid, self.enable):
450451 other_pane.on_exit_data_valid.append(PaneDataHandler(self.enable))
451- if not has_handler_function(other_pane.on_change_data_invalid, self.disable):
452- other_pane.on_change_data_invalid.append(PaneKeyHandler(self.disable))
452+ if not disable_on_other_exit_only:
453+ if not has_handler_function(other_pane.on_change_data_invalid, self.disable):
454+ other_pane.on_change_data_invalid.append(PaneKeyHandler(self.disable))
453455 if not has_handler_function(other_pane.on_exit_data_invalid, self.disable):
454456 other_pane.on_exit_data_invalid.append(PaneKeyHandler(self.disable))
455457 if not has_handler_function(other_pane.on_clear, self.clear_data):
@@ -466,17 +468,15 @@
466468 other_pane.on_exit_data_invalid.append(PaneKeyHandler(self.clear))
467469 other_pane.show_widgets_validity()
468470
469- def can_use(self, other_pane, enable_on_other_exit_only=False):
471+ def can_use(self, other_pane):
470472 """Set handler functions so that the other pane can provide data for the data dictionary, or keys of data to remove.
471473
472474 :param other_pane: The pane which must have valid data for this pane to be enabled.
473- :param enable_on_other_exit_only: A Boolean indicating whether this pane should be enabled only when the other pane exits with valid data (True) or any time the other pane's data become valid (False). Default: False.
474475
475476 The other pane's lists of Handler callbacks are modified to add the other
476477 pane's data to this pane's data dictionary or to clear the other pane's data
477478 keys from this pane's data dictionary when the other pane's data are valid or
478- invalid, respectively. This pane's 'clear_data()' method is also added to
479- the other pane's 'on_clear' callback list.
479+ invalid, respectively.
480480 """
481481 if not enable_on_other_exit_only:
482482 if not has_handler_function(other_pane.on_change_data_valid, self.use_data):
Show on old repository browser