Skip to content

Commit df751c4

Browse files
committed
Deprecate original NavigationToolbar
1 parent 9b7abbf commit df751c4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,17 @@ def validate_backend(s):
110110

111111
validate_qt4 = ValidateInStrings('backend.qt4', ['PyQt4', 'PySide'])
112112

113-
validate_toolbar = ValidateInStrings('toolbar',[
114-
'None','classic','toolbar2',
115-
], ignorecase=True)
113+
def validate_toolbar(s):
114+
validator = ValidateInStrings(
115+
'toolbar',
116+
['None','classic','toolbar2'],
117+
ignorecase=True)
118+
s = validator(s)
119+
if s.lower == 'classic':
120+
warnings.warn("'classic' Navigation Toolbar "
121+
"is deprecated in v1.2.x and will be "
122+
"removed in v1.3")
123+
return s
116124

117125
def validate_autolayout(v):
118126
if v:

0 commit comments

Comments
 (0)