@@ -1804,7 +1804,6 @@ def is_saving(self):
1804
1804
"""
1805
1805
return self ._is_saving
1806
1806
1807
- @cbook .deprecated ("2.2" )
1808
1807
def onRemove (self , ev ):
1809
1808
"""
1810
1809
Mouse event processor which removes the top artist
@@ -2697,7 +2696,6 @@ def key_press(self, event):
2697
2696
if rcParams ['toolbar' ] != 'toolmanager' :
2698
2697
key_press_handler (event , self .canvas , self .canvas .toolbar )
2699
2698
2700
- @cbook .deprecated ("2.2" )
2701
2699
def show_popup (self , msg ):
2702
2700
"""Display message in a popup -- GUI only."""
2703
2701
@@ -3220,13 +3218,6 @@ class ToolContainerBase(object):
3220
3218
The tools with which this `ToolContainer` wants to communicate.
3221
3219
"""
3222
3220
3223
- _icon_extension = '.png'
3224
- """
3225
- Toolcontainer button icon image format extension
3226
-
3227
- **String**: Image extension
3228
- """
3229
-
3230
3221
def __init__ (self , toolmanager ):
3231
3222
self .toolmanager = toolmanager
3232
3223
self .toolmanager .toolmanager_connect ('tool_removed_event' ,
@@ -3271,19 +3262,14 @@ def _remove_tool_cbk(self, event):
3271
3262
3272
3263
def _get_image_filename (self , image ):
3273
3264
"""Find the image based on its name."""
3274
- if not image :
3275
- return None
3276
-
3265
+ # TODO: better search for images, they are not always in the
3266
+ # datapath
3277
3267
basedir = os .path .join (rcParams ['datapath' ], 'images' )
3278
- possible_images = (
3279
- image ,
3280
- image + self ._icon_extension ,
3281
- os .path .join (basedir , image ),
3282
- os .path .join (basedir , image ) + self ._icon_extension )
3283
-
3284
- for fname in possible_images :
3285
- if os .path .isfile (fname ):
3286
- return fname
3268
+ if image is not None :
3269
+ fname = os .path .join (basedir , image )
3270
+ else :
3271
+ fname = None
3272
+ return fname
3287
3273
3288
3274
def trigger_tool (self , name ):
3289
3275
"""
0 commit comments