Skip to content

Commit 66c69cf

Browse files
authored
fix open dir for wxpython 4.3 (#3064)
* fix open dir for wxpython 4.3 * undo dependency changes * backwards compatible open dir fix for wxpython
1 parent ce704da commit 66c69cf

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/robotide/ui/mainframe.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_menudata():
7979
help_4 = _("!Report a Problem | Open browser to SEARCH on the RIDE issue tracker\n")
8080
help_6 = _("!About | Information about RIDE\n")
8181
help_7 = _("!Check for Upgrade | Looks at PyPi for new released version\n")
82-
82+
8383
return (file_0 + file_1 + separator + file_2 + file_3 + file_4 + separator + file_5 + file_6 + separator +
8484
file_7 + '\n' + tool_0 + tool_1 + tool_2 + tool_3 + tool_4 + '\n' + help_0 + help_1 + help_2 +
8585
help_3 + help_4 + help_6 + help_7)
@@ -670,8 +670,12 @@ def refresh_datafile(self, item, event):
670670
def on_open_directory(self, event):
671671
__ = event
672672
if self.check_unsaved_modifications():
673-
path = wx.DirSelector(message=_("Choose a directory containing Robot files"),
674-
default_path=self.controller.default_dir)
673+
if wx.VERSION >= (4, 3, 0):
674+
path = wx.DirSelector(message=_("Choose a directory containing Robot files"),
675+
defaultPath=self.controller.default_dir)
676+
else:
677+
path = wx.DirSelector(message=_("Choose a directory containing Robot files"),
678+
default_path=self.controller.default_dir)
675679
if path:
676680
self.open_suite(path)
677681

0 commit comments

Comments
 (0)