From 883196a5cec788a16bca5dbf9bf2c3612bc6e73e Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Tue, 8 Apr 2025 01:41:05 +0100 Subject: [PATCH 01/12] Styled message box --- src/robotide/ui/mainframe.py | 14 +++++++++++--- src/robotide/validators/__init__.py | 6 +++++- src/robotide/widgets/dialog.py | 9 ++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/robotide/ui/mainframe.py b/src/robotide/ui/mainframe.py index 09d3045ca..5b3de03b5 100644 --- a/src/robotide/ui/mainframe.py +++ b/src/robotide/ui/mainframe.py @@ -197,12 +197,16 @@ def _create_title(message): @staticmethod def _show_validation_error(message): - wx.MessageBox(message.message, _('Validation Error'), style=wx.ICON_ERROR) + message_box = RIDEDialog(title=_('Validation Error'), message=message.message, style=wx.ICON_ERROR) + message_box.Show() @staticmethod def _show_modification_prevented_error(message): - wx.MessageBox(_("\"%s\" is read only") % message.controller.datafile_controller.filename, - _("Modification prevented"), style=wx.ICON_ERROR) + message_box = RIDEDialog(title=_("Modification prevented"), + message=_("\"%s\" is read only") % message.controller.datafile_controller.filename, + style=wx.ICON_ERROR) + # message_box.CenterOnParent() + message_box.Show() def _init_ui(self): """ DEBUG: @@ -404,6 +408,10 @@ def _allowed_to_exit(self): ret = wx.MessageBox(_("There are unsaved modifications.\n" "Do you want to save your changes before " "exiting?"), _("Warning"), wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) + # message_box = RIDEDialog(title=_('Warning'), message=_("There are unsaved modifications.\n" + # "Do you want to save your changes before " + # "exiting?"), style=wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) + # ret = message_box.execute() if ret == wx.CANCEL: return False if ret == wx.YES: diff --git a/src/robotide/validators/__init__.py b/src/robotide/validators/__init__.py index 6b68b7963..f9585043a 100644 --- a/src/robotide/validators/__init__.py +++ b/src/robotide/validators/__init__.py @@ -18,6 +18,7 @@ import wx from .. import robotapi, utils +from ..widgets import RIDEDialog class _AbstractValidator(wx.Validator): @@ -44,7 +45,10 @@ def _validate(self, value): return NotImplemented def _show_error(self, message, title="Validation Error"): - ret = wx.MessageBox(message, title, style=wx.ICON_ERROR) + # ret = wx.MessageBox(message, title, style=wx.ICON_ERROR) + # print(f"DEBUG: validators __init__.py AbstractValidator _show_error {message}") + message_box = RIDEDialog(title=title, message=message, style=wx.ICON_ERROR) + ret = message_box.execute() self._set_focus_to_text_control(self.Window) return ret diff --git a/src/robotide/widgets/dialog.py b/src/robotide/widgets/dialog.py index 7aaf466fa..dd7ff1281 100644 --- a/src/robotide/widgets/dialog.py +++ b/src/robotide/widgets/dialog.py @@ -144,9 +144,12 @@ def _create_horizontal_line(self, sizer): sizer.Fit(self) def execute(self): - retval = None - if self.ShowModal() == wx.ID_OK: - retval = self._execute() + retval = self.ShowModal() + if retval == wx.ID_OK: + try: + retval = self._execute() + except NotImplementedError: + pass self.Destroy() return retval From a94f895811dcae0141a1b50303dc00053388f258 Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Wed, 9 Apr 2025 02:26:38 +0100 Subject: [PATCH 02/12] More dialogs with style. Broken validation on New Projects --- src/robotide/editor/settingeditors.py | 1 + src/robotide/ui/mainframe.py | 38 ++++++++++++++--------- src/robotide/widgets/dialog.py | 44 +++++++++++++++++++++++---- 3 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/robotide/editor/settingeditors.py b/src/robotide/editor/settingeditors.py index 0605ee07d..764591dcd 100755 --- a/src/robotide/editor/settingeditors.py +++ b/src/robotide/editor/settingeditors.py @@ -66,6 +66,7 @@ def __init__(self, parent, controller, plugin, tree): self._language = [set_lang[0]] # print(f"DEBUG: settings.py SettingEditor __init__ SHAREDMEM language={self._language}") except AttributeError: + print("DEBUG: settings.py SettingEditor __init__ AttributeError") try: self._language = self._controller.language # print(f"DEBUG: settings.py SettingEditor __init__ CONTROLLER language={self._language}") diff --git a/src/robotide/ui/mainframe.py b/src/robotide/ui/mainframe.py index 5b3de03b5..76b08dc16 100644 --- a/src/robotide/ui/mainframe.py +++ b/src/robotide/ui/mainframe.py @@ -197,16 +197,16 @@ def _create_title(message): @staticmethod def _show_validation_error(message): - message_box = RIDEDialog(title=_('Validation Error'), message=message.message, style=wx.ICON_ERROR) - message_box.Show() + message_box = RIDEDialog(title=_('Validation Error'), message=message.message, style=wx.ICON_ERROR|wx.OK) + message_box.ShowModal() @staticmethod def _show_modification_prevented_error(message): message_box = RIDEDialog(title=_("Modification prevented"), message=_("\"%s\" is read only") % message.controller.datafile_controller.filename, - style=wx.ICON_ERROR) + style=wx.ICON_ERROR|wx.OK) # message_box.CenterOnParent() - message_box.Show() + message_box.ShowModal() def _init_ui(self): """ DEBUG: @@ -405,16 +405,16 @@ def on_maximize(self, event): def _allowed_to_exit(self): if self.has_unsaved_changes(): - ret = wx.MessageBox(_("There are unsaved modifications.\n" - "Do you want to save your changes before " - "exiting?"), _("Warning"), wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) - # message_box = RIDEDialog(title=_('Warning'), message=_("There are unsaved modifications.\n" + # ret = wx.MessageBox(_("There are unsaved modifications.\n" # "Do you want to save your changes before " - # "exiting?"), style=wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) - # ret = message_box.execute() - if ret == wx.CANCEL: + # "exiting?"), _("Warning"), wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) + message_box = RIDEDialog(title=_('Warning'), message=_("There are unsaved modifications.\n" + "Do you want to save your changes before " + "exiting?"), style=wx.ICON_WARNING | wx.CANCEL | wx.YES_NO) + ret = message_box.execute() + if ret in (wx.CANCEL, wx.ID_CANCEL): return False - if ret == wx.YES: + if ret in (wx.YES, wx.ID_YES, wx.OK, wx.ID_OK): self.save() return True @@ -498,9 +498,14 @@ def on_open_test_suite(self, event): def check_unsaved_modifications(self): if self.has_unsaved_changes(): + """ ret = wx.MessageBox(_("There are unsaved modifications.\n" "Do you want to proceed without saving?"), _("Warning"), wx.ICON_WARNING | wx.YES_NO) - return ret == wx.YES + """ + message_box = RIDEDialog(title=_("Warning"), message=_("There are unsaved modifications.\n" + "Do you want to proceed without saving?"), style=wx.ICON_WARNING | wx.YES_NO) + ret = message_box.ShowModal() + return ret == wx.ID_YES return True def open_suite(self, path): @@ -704,9 +709,14 @@ def show_confirm_reload_dlg(self, event): if self.controller.is_dirty(): msg += [_('Answering will discard unsaved changes.'), _('Answering will ignore the changes on disk.')] + """ ret = wx.MessageBox('\n'.join(msg), _('Files Changed On Disk'), style=wx.YES_NO | wx.ICON_WARNING) - confirmed = ret == wx.YES + """ + message_box = RIDEDialog(title=_('Files Changed On Disk'), message='\n'.join(msg), + style=wx.ICON_WARNING | wx.YES_NO) + ret = message_box.ShowModal() + confirmed = ret == wx.ID_YES if confirmed: # workspace_path should update after open directory/suite # There are two scenarios: diff --git a/src/robotide/widgets/dialog.py b/src/robotide/widgets/dialog.py index dd7ff1281..c5471d3cf 100644 --- a/src/robotide/widgets/dialog.py +++ b/src/robotide/widgets/dialog.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import builtins import webbrowser import wx @@ -20,6 +21,9 @@ from . import sizers, ButtonWithHandler +_ = wx.GetTranslation # To keep linter/code analyser happy +builtins.__dict__['_'] = wx.GetTranslation + class HtmlWindow(html.HtmlWindow): @@ -89,7 +93,8 @@ class RIDEDialog(wx.Dialog): def __init__(self, title='', parent=None, size=None, style=None, message=None): size = size or (-1, -1) - style = style or (wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) + style = style | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER if style else (wx.DEFAULT_DIALOG_STYLE | + wx.RESIZE_BORDER ) wx.Dialog.__init__(self, parent=parent, title=title, size=size, style=style) # set Left to Right direction (while we don't have localization) self.SetLayoutDirection(wx.Layout_LeftToRight) @@ -110,17 +115,32 @@ def __init__(self, title='', parent=None, size=None, style=None, message=None): if self.message: sizer = wx.BoxSizer(wx.VERTICAL) content = wx.StaticText(self, -1, self.message) - button = wx.Button(self, wx.ID_OK, '', style=style) content.SetBackgroundColour(Colour(self.color_background)) content.SetForegroundColour(Colour(self.color_foreground)) - button.SetBackgroundColour(Colour(self.color_secondary_background)) - button.SetForegroundColour(Colour(self.color_secondary_foreground)) sizer.Add(content, 0, wx.ALL | wx.EXPAND, 3) sizer.Add(wx.StaticText(self, -1, "\n\n"), 0, wx.ALL, 3) - sizer.Add(button, 0, wx.ALIGN_CENTER | wx.BOTTOM, 5) + btn_sizer = self._create_buttons_sizer(style) + sizer.Add(btn_sizer, 0, wx.ALIGN_CENTER | wx.BOTTOM, 3) self.SetSizer(sizer) sizer.Fit(self) self.CenterOnParent() + self.Bind(wx.EVT_BUTTON, self.on_button) + + def _create_buttons_sizer(self, style=0): + sizer = wx.BoxSizer(wx.HORIZONTAL) + btn_flag = False + for btn, bid, label in zip([wx.NO, wx.CANCEL, wx.YES, wx.OK], [wx.ID_NO, wx.ID_CANCEL, wx.ID_YES, wx.ID_OK], + [_('No'), _('Cancel'), _('Yes'), _('OK')]): + if btn == style & btn: + print(f"DEBUG: dialog.py RIDEDialog _create_buttons_sizer ID={btn} label={label}") + button = wx.Button(self, id=bid, label=label) + button.SetBackgroundColour(Colour(self.color_secondary_background)) + button.SetForegroundColour(Colour(self.color_secondary_foreground)) + sizer.Add(button, 0, wx.ALIGN_CENTER | wx.BOTTOM, 5) + btn_flag = True + if not btn_flag: + return self._create_buttons_sizer(wx.OK) + return sizer def _create_buttons(self, sizer): buttons = self.CreateStdDialogButtonSizer(wx.OK | wx.CANCEL) @@ -143,9 +163,21 @@ def _create_horizontal_line(self, sizer): sizer.Add(line, border=5, flag=wx.GROW | wx.RIGHT | wx.TOP) sizer.Fit(self) + def on_button(self, event): + retval = event.GetId() + print(f"DEBUG: dialog.py RIDEDialog on_button ={retval}") + if retval in (wx.ID_OK, wx.ID_YES): + try: + retval = self._execute() + except NotImplementedError: + pass + if retval: + self.EndModal(retval) + def execute(self): retval = self.ShowModal() - if retval == wx.ID_OK: + # print(f"DEBUG: dialog.py RIDEDialog execute RETURN MODAL retval={retval}") + if retval in (wx.ID_OK, wx.ID_YES): try: retval = self._execute() except NotImplementedError: From b7add061bfc261eae6857e4be33cf47aa3b0212d Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Thu, 10 Apr 2025 00:44:09 +0100 Subject: [PATCH 03/12] Fix dialogs colour in main and filedialog --- src/robotide/ui/filedialogs.py | 3 ++- src/robotide/widgets/dialog.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/robotide/ui/filedialogs.py b/src/robotide/ui/filedialogs.py index 03bdf3788..d19043c1d 100644 --- a/src/robotide/ui/filedialogs.py +++ b/src/robotide/ui/filedialogs.py @@ -291,7 +291,8 @@ def _execute(self): else CreateNewFileProject self.language = self.selected_language() cmd(self._get_path(), self._is_task_type(), self.language).execute(self._controller) - del self.dlg + if self.dlg: + del self.dlg class NewResourceDialog(_WithImmutableParent, _CreationDialog): diff --git a/src/robotide/widgets/dialog.py b/src/robotide/widgets/dialog.py index c5471d3cf..8c4d1a0e5 100644 --- a/src/robotide/widgets/dialog.py +++ b/src/robotide/widgets/dialog.py @@ -123,8 +123,8 @@ def __init__(self, title='', parent=None, size=None, style=None, message=None): sizer.Add(btn_sizer, 0, wx.ALIGN_CENTER | wx.BOTTOM, 3) self.SetSizer(sizer) sizer.Fit(self) + self.Bind(wx.EVT_BUTTON, self.on_button) self.CenterOnParent() - self.Bind(wx.EVT_BUTTON, self.on_button) def _create_buttons_sizer(self, style=0): sizer = wx.BoxSizer(wx.HORIZONTAL) @@ -173,6 +173,7 @@ def on_button(self, event): pass if retval: self.EndModal(retval) + event.Skip() def execute(self): retval = self.ShowModal() From 0b33662275ac2ee24982b97fea54815a237fe9c2 Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Fri, 11 Apr 2025 02:05:48 +0100 Subject: [PATCH 04/12] Fix dialogs colour in ProgressDialogs --- src/robotide/application/application.py | 9 ++++++++- src/robotide/controller/ctrlcommands.py | 2 +- src/robotide/editor/kweditor.py | 3 ++- src/robotide/ui/mainframe.py | 3 ++- src/robotide/ui/progress.py | 14 +++++++++++--- src/robotide/ui/treenodehandlers.py | 8 ++++++-- src/robotide/ui/treeplugin.py | 9 +++++++-- 7 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/robotide/application/application.py b/src/robotide/application/application.py index 04b004a22..1ea8e6791 100644 --- a/src/robotide/application/application.py +++ b/src/robotide/application/application.py @@ -19,6 +19,9 @@ from contextlib import contextmanager from pathlib import Path + +from pygments.styles.dracula import background + from ..namespace import Namespace from ..controller import Project from ..spec import librarydatabase @@ -329,7 +332,11 @@ def _load_data(self): self.workspace_path = self.workspace_path or self._get_latest_path() if self.workspace_path: self._controller.update_default_dir(self.workspace_path) - observer = LoadProgressObserver(self.frame) + theme = self.settings.get_without_default('General') + background = theme['background'] + foreground = theme['foreground'] + print(f"DEBUG: application.py RIDE _load_data CALL PROGRESS {background=} {foreground=}") + observer = LoadProgressObserver(self.frame, background=background, foreground=foreground) self._controller.load_data(self.workspace_path, observer) @staticmethod diff --git a/src/robotide/controller/ctrlcommands.py b/src/robotide/controller/ctrlcommands.py index 77d8bb599..218af1387 100644 --- a/src/robotide/controller/ctrlcommands.py +++ b/src/robotide/controller/ctrlcommands.py @@ -292,7 +292,7 @@ class RenameKeywordOccurrences(_ReversibleCommand): def __init__(self, original_name, new_name, observer, keyword_info=None, language='En'): self._language = language[0] if isinstance(language, list) else language - if self._language.lower() not in ['en', 'english']: + if self._language and self._language.lower() not in ['en', 'english']: bdd_prefix = f"{obtain_bdd_prefixes(self._language)}|{BDD_ENGLISH}" else: bdd_prefix = BDD_ENGLISH diff --git a/src/robotide/editor/kweditor.py b/src/robotide/editor/kweditor.py index 72792708b..ba6159534 100755 --- a/src/robotide/editor/kweditor.py +++ b/src/robotide/editor/kweditor.py @@ -1161,7 +1161,8 @@ def on_rename_keyword(self, event): new_name = wx.GetTextFromUser(_('New name'), _(REN_KW), default_value=old_name) if new_name: self._execute(RenameKeywordOccurrences( - old_name, new_name, RenameProgressObserver(self.GetParent()), language=self._language)) + old_name, new_name, RenameProgressObserver(self.GetParent(), background=self.color_background, + foreground=self.color_foreground), language=self._language)) # Add one new Dialog to edit pretty json String TODO: use better editor with more functions def on_json_editor(self, event=None): diff --git a/src/robotide/ui/mainframe.py b/src/robotide/ui/mainframe.py index 76b08dc16..2b514ebd2 100644 --- a/src/robotide/ui/mainframe.py +++ b/src/robotide/ui/mainframe.py @@ -530,7 +530,8 @@ def open_suite(self, path): else: set_lang[0] = 'en' try: - err = self.controller.load_datafile(path, LoadProgressObserver(self)) + err = self.controller.load_datafile(path, LoadProgressObserver(self, background=self.color_background, + foreground=self.color_foreground)) if isinstance(err, UserWarning): # DEBUG: raise err # Just leave message in Parser Log return False diff --git a/src/robotide/ui/progress.py b/src/robotide/ui/progress.py index 04fd6c4f9..0497efb83 100644 --- a/src/robotide/ui/progress.py +++ b/src/robotide/ui/progress.py @@ -46,16 +46,23 @@ def error(self, msg): class LoadProgressObserver(ProgressObserver): - def __init__(self, frame): + def __init__(self, frame, background=None, foreground=None): ProgressObserver.__init__(self, frame, 'RIDE', 'Loading the test data') + if background and foreground: + self._progressbar.SetBackgroundColour(background) + self._progressbar.SetForegroundColour(foreground) class RenameProgressObserver(ProgressObserver): - def __init__(self, frame): + def __init__(self, frame, background=None, foreground=None): ProgressObserver.__init__(self, frame, 'RIDE', 'Renaming') - self._notification_occured = 0 + # self._notification_occured = 0.1 + if background and foreground: + self._progressbar.SetBackgroundColour(background) + self._progressbar.SetForegroundColour(foreground) + """ def notify(self): if time.time() - self._notification_occured > 0.1: try: @@ -63,3 +70,4 @@ def notify(self): except RuntimeError: pass self._notification_occured = time.time() + """ \ No newline at end of file diff --git a/src/robotide/ui/treenodehandlers.py b/src/robotide/ui/treenodehandlers.py index 4ded5d500..dced7285b 100644 --- a/src/robotide/ui/treenodehandlers.py +++ b/src/robotide/ui/treenodehandlers.py @@ -754,7 +754,9 @@ def _create_rename_command(self, new_name): # print(f"DEBUG: treenodehandlers.py UserKeywodHandler _create_rename_command controller.name={self.controller.name}" # f", new_name={new_name} info={self.controller.info}") return ctrlcommands.RenameKeywordOccurrences(self.controller.name, new_name, - RenameProgressObserver(self._tree.GetParent()), + RenameProgressObserver(self._tree.GetParent(), + background=self._tree.background, + foreground=self._tree.foreground), self.controller.info, language=self.controller.language) def on_find_usages(self, event): @@ -841,7 +843,9 @@ def on_add_resource(self, event): path = RobotFilePathDialog( self._tree.GetParent(), self.controller, self._settings).execute() if path: - self.controller.load_resource(path, LoadProgressObserver(self._tree.GetParent())) + self.controller.load_resource(path, LoadProgressObserver(self._tree.GetParent(), + background=self._tree.background, + foreground=self._tree.foreground)) class ExcludedDirectoryHandler(TestDataDirectoryHandler): diff --git a/src/robotide/ui/treeplugin.py b/src/robotide/ui/treeplugin.py index 4ae68a493..691affe25 100644 --- a/src/robotide/ui/treeplugin.py +++ b/src/robotide/ui/treeplugin.py @@ -213,6 +213,9 @@ def __init__(self, parent, action_registerer, settings=None): self._RESOURCES_NODE_LABEL = _('External Resources') # print(f"DEBUG: treeplugin.py Tree after importing TreeController __init__ " # f"translated label={self._RESOURCES_NODE_LABEL}") + self.theme = settings.get_without_default('General') + self.background = self.theme['background'] + self.foreground = self.theme['foreground'] self._checkboxes_for_tests = False self._test_selection_controller = self._create_test_selection_controller() self.controller = TreeController(self, action_registerer, settings=settings, @@ -1197,9 +1200,11 @@ def _rename_resource_kw(self, new_name, old_name, resource): RideUserKeywordRenamed(datafile=controller.datafile, item=k, old_name=keyword_name).publish() controller.mark_dirty() - # print(f"DEBUG: treeplugin.py Tree _rename_resource_kw DONE CHANGING: {k.name=}") + print(f"DEBUG: treeplugin.py Tree _rename_resource_kw DONE CHANGING: {k.name=}" + f"background={self.background}, foreground={self.foreground}") # self.controller.mark_node_dirty(self._get_datafile_node(controller.datafile)) - self.observer = RenameProgressObserver(self.GetParent()) + self.observer = RenameProgressObserver(self.GetParent(), background=self.background, + foreground=self.foreground) RenameKeywordOccurrences(keyword_name, new_keyword_name, self.observer) self.observer.finish() self.Collapse(res_node) From a0886fe2bf05a4dce97bc02ad5843f0d00bc7704 Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Sat, 12 Apr 2025 02:44:23 +0100 Subject: [PATCH 05/12] Change dialogs to use customized colors --- CHANGELOG.adoc | 1 + README.adoc | 2 +- src/robotide/application/CHANGELOG.html | 2 ++ src/robotide/application/application.py | 2 +- src/robotide/application/releasenotes.py | 3 ++- src/robotide/editor/kweditor.py | 14 +++++++++++--- src/robotide/editor/texteditor.py | 11 +++++++---- src/robotide/ui/mainframe.py | 11 ----------- src/robotide/ui/treeplugin.py | 13 +++++++++---- src/robotide/validators/__init__.py | 3 +++ src/robotide/version.py | 2 +- src/robotide/widgets/dialog.py | 4 ++-- 12 files changed, 40 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 76f279e4d..fe9373b8b 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -16,6 +16,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni when selecting in Tree shows the filename in StatusBar. === Changed +- Changed some informative dialogs and JSON Editor to use the customized colors. - Modified import statements to allow running RIDE without Robot Framework installed or versions older than 6.0. - On Windows ignore false modification on files when opening Test Suites, causing confirmation dialog. diff --git a/README.adoc b/README.adoc index 712411cf4..f4cd7bfb6 100644 --- a/README.adoc +++ b/README.adoc @@ -40,7 +40,7 @@ Likewise, the current version of wxPython, is 4.2.2, but RIDE is known to work w `pip install -U robotframework-ride` -(3.8 <= python <= 3.13) Install current development version (**2.2dev19**) with: +(3.8 <= python <= 3.13) Install current development version (**2.2dev20**) with: `pip install -U https://github.com/robotframework/RIDE/archive/develop.zip` diff --git a/src/robotide/application/CHANGELOG.html b/src/robotide/application/CHANGELOG.html index fa948f4ba..8875306b5 100644 --- a/src/robotide/application/CHANGELOG.html +++ b/src/robotide/application/CHANGELOG.html @@ -10,6 +10,8 @@ Added divided Status Bar. Left side for main window, right side for Plugins. Working example in Text Editor, when selecting in Tree shows the filename in StatusBar.

1.2. Changed

  • +Changed some informative dialogs and JSON Editor to use the customized colors. +
  • Modified import statements to allow running RIDE without Robot Framework installed or versions older than 6.0.
  • On Windows ignore false modification on files when opening Test Suites, causing confirmation dialog. diff --git a/src/robotide/application/application.py b/src/robotide/application/application.py index 1ea8e6791..f2ed6c06e 100644 --- a/src/robotide/application/application.py +++ b/src/robotide/application/application.py @@ -335,7 +335,7 @@ def _load_data(self): theme = self.settings.get_without_default('General') background = theme['background'] foreground = theme['foreground'] - print(f"DEBUG: application.py RIDE _load_data CALL PROGRESS {background=} {foreground=}") + # print(f"DEBUG: application.py RIDE _load_data CALL PROGRESS {background=} {foreground=}") observer = LoadProgressObserver(self.frame, background=background, foreground=foreground) self._controller.load_data(self.workspace_path, observer) diff --git a/src/robotide/application/releasenotes.py b/src/robotide/application/releasenotes.py index 0d39aa60b..22c6c2137 100644 --- a/src/robotide/application/releasenotes.py +++ b/src/robotide/application/releasenotes.py @@ -170,6 +170,7 @@ def set_content(self, html_win, content):

New Features and Fixes Highlights

    +
  • Changed some informative dialogs and JSON Editor to use the customized colors.
  • Added current executing keyword and other statuses to TestRunner status bar.
  • Modified import statements to allow running RIDE without Robot Framework installed or versions older than 6.0.
  • Added Config Panel button to supported installed Plugins next to their name in Plugin Manager dialog.
  • @@ -231,7 +232,7 @@ def set_content(self, html_win, content):
    python -m robotide.postinstall -install

    or

    ride_postinstall.py -install
    -

    RIDE {VERSION} was released on 02/April/2025.

    +

    RIDE {VERSION} was released on 12/April/2025.

    lang={self._doc_language}") else: @@ -896,9 +895,6 @@ def _handle_sanity_check_failure(self, message): if self._last_answer == wx.ID_NO and time() - self._last_answer_time <= 0.2: # self.source_editor._mark_file_dirty(True) return False - # dlg = wx.MessageDialog(self._editor, f"{_('ERROR: Data sanity check failed!')}\n{_('Error at line')}" - # f" {message[1]}:\n{message[0]}\n\n{_('Reset changes?')}", - # _("Can not apply changes from Text Editor"), style=wx.YES | wx.NO) dlg = RIDEDialog(title=_("Can not apply changes from Text Editor"), message=f"{_('ERROR: Data sanity check failed!')}\n{_('Error at line')}" f" {message[1]}:\n{message[0]}\n\n{_('Reset changes?')}", @@ -2725,7 +2721,6 @@ def set_language(self, dlanguage): try: self.language = obtain_language(dlanguage, content) except ValueError: - # wx.MessageBox(f"Error when selecting Language: {e}", 'Error') self.language = 'English' else: self.language = 'English' diff --git a/src/robotide/ui/treeplugin.py b/src/robotide/ui/treeplugin.py index ecec7dfd8..1315ba0c4 100644 --- a/src/robotide/ui/treeplugin.py +++ b/src/robotide/ui/treeplugin.py @@ -1213,8 +1213,6 @@ def _rename_resource_kw(self, new_name, old_name, resource): self.SelectItem(node) else: from ..widgets import RIDEDialog - # wx.MessageBox(f"Invalid keyword name: {new_keyword_name}", - # "Failed Keyword Name Validation") message_box = RIDEDialog(title=_('Validation Error'), message=_("Invalid keyword name: ") % f"{new_keyword_name}", style=wx.ICON_ERROR | wx.OK) diff --git a/src/robotide/validators/__init__.py b/src/robotide/validators/__init__.py index 79115019f..9aef5efcc 100644 --- a/src/robotide/validators/__init__.py +++ b/src/robotide/validators/__init__.py @@ -48,8 +48,6 @@ def _validate(self, value): return NotImplemented def _show_error(self, message, title="Validation Error"): - # ret = wx.MessageBox(message, title, style=wx.ICON_ERROR) - # print(f"DEBUG: validators __init__.py AbstractValidator _show_error {message}") message_box = RIDEDialog(title=title, message=message, style=wx.ICON_ERROR) ret = message_box.execute() self._set_focus_to_text_control(self.Window)