diff --git a/Bookmark.py b/Bookmark.py index c0c7a839..77664c6a 100644 --- a/Bookmark.py +++ b/Bookmark.py @@ -240,7 +240,7 @@ class BookmarkManager(QtWidgets.QWidget): index_list.append(index) title_to_remove = self.table_widget.item(model_index.row(), 1).text() - if title_to_remove == 'FlatCAM' or title_to_remove == 'Backup Site': + if title_to_remove == 'FlatCAM' or title_to_remove == _('Backup Site'): self.app.inform.emit('[WARNING_NOTCL] %s.' % _("This bookmark can not be removed")) self.build_bm_ui() return diff --git a/CHANGELOG.md b/CHANGELOG.md index d363bae7..5a8f4d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ CHANGELOG for FlatCAM beta - some UI cleanup in the Geometry UI - updated the translation strings except Russian which could be in the works - fixed an error that did not allowed for the older preferences to be deleted when installing a different version of the software +- in Legacy Mode fixed a small issue: the status bar icon for the Grid axis was not colored on app start +- added a new string to the translatable strings +- fixed an error that sometime showed in Legacy Mode when moving the mouse outside canvas +- reactivated the shortcut key 'S' in TCL Shell, to close the shell dock when it was open (of course the focus has to be not on the command line) 27.10.2020 diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py index 9e0ce207..eaa40bc4 100644 --- a/appGUI/GUIElements.py +++ b/appGUI/GUIElements.py @@ -3757,14 +3757,18 @@ class _BrowserTextEdit(QTextEdit): # Copy Text elif key == QtCore.Qt.Key_C: self.copy_text() - # Copy Text + # Save Log elif key == QtCore.Qt.Key_S: if self.app: self.save_log(app=self.app) elif modifiers == QtCore.Qt.NoModifier: + # Clear all if key == QtCore.Qt.Key_Delete: self.clear() + # Shell toggle + if key == QtCore.Qt.Key_S: + self.app.ui.toggle_shell_ui() def copy_text(self): tcursor = self.textCursor() diff --git a/appGUI/PlotCanvas.py b/appGUI/PlotCanvas.py index 18f24b66..c1b2c351 100644 --- a/appGUI/PlotCanvas.py +++ b/appGUI/PlotCanvas.py @@ -191,13 +191,13 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): # enable the HUD if it is activated in FlatCAM Preferences if self.fcapp.defaults['global_hud'] is True: - self.on_toggle_hud(state=True) + self.on_toggle_hud(state=True, silent=True) # Axis Display self.axis_enabled = True # enable Axis - self.on_toggle_axis(state=True) + self.on_toggle_axis(state=True, silent=True) # enable Grid lines self.grid_lines_enabled = True @@ -218,8 +218,8 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): self.graph_event_connect('mouse_wheel', self.on_mouse_scroll) - def on_toggle_axis(self, signal=None, state=None): - if state is None: + def on_toggle_axis(self, signal=None, state=None, silent=None): + if not state: state = not self.axis_enabled if state: @@ -234,16 +234,18 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): background-color: orange; } """) - self.fcapp.inform[str, bool].emit(_("Axis enabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("Axis enabled."), False) else: self.axis_enabled = False self.fcapp.defaults['global_axis'] = False self.v_line.parent = None self.h_line.parent = None self.fcapp.ui.axis_status_label.setStyleSheet("") - self.fcapp.inform[str, bool].emit(_("Axis disabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("Axis disabled."), False) - def on_toggle_hud(self, signal=None, state=None): + def on_toggle_hud(self, signal=None, state=None, silent=None): if state is None: state = not self.hud_enabled @@ -259,7 +261,8 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): background-color: mediumpurple; } """) - self.fcapp.inform[str, bool].emit(_("HUD enabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("HUD enabled."), False) else: self.hud_enabled = False @@ -267,21 +270,24 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas): self.text_hud.parent = None self.fcapp.defaults['global_hud'] = False self.fcapp.ui.hud_label.setStyleSheet("") - self.fcapp.inform[str, bool].emit(_("HUD disabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("HUD disabled."), False) - def on_toggle_grid_lines(self): + def on_toggle_grid_lines(self, signal=None, silent=None): state = not self.grid_lines_enabled if state: self.fcapp.defaults['global_grid_lines'] = True self.grid_lines_enabled = True self.grid.parent = self.view.scene - self.fcapp.inform[str, bool].emit(_("Grid enabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("Grid enabled."), False) else: self.fcapp.defaults['global_grid_lines'] = False self.grid_lines_enabled = False self.grid.parent = None - self.fcapp.inform[str, bool].emit(_("Grid disabled."), False) + if silent is None: + self.fcapp.inform[str, bool].emit(_("Grid disabled."), False) # HACK: enabling/disabling the cursor seams to somehow update the shapes on screen # - perhaps is a bug in VisPy implementation diff --git a/appGUI/PlotCanvasLegacy.py b/appGUI/PlotCanvasLegacy.py index 83b6eb88..994140e7 100644 --- a/appGUI/PlotCanvasLegacy.py +++ b/appGUI/PlotCanvasLegacy.py @@ -306,9 +306,13 @@ class PlotCanvasLegacy(QtCore.QObject): # signal if there is a doubleclick self.is_dblclk = False + # HUD Display self.hud_enabled = False self.text_hud = self.Thud(plotcanvas=self) + if self.app.defaults['global_hud'] is True: + self.on_toggle_hud(state=True, silent=None) + # enable Grid lines self.grid_lines_enabled = True @@ -317,17 +321,21 @@ class PlotCanvasLegacy(QtCore.QObject): if self.app.defaults['global_workspace'] is True: self.draw_workspace(workspace_size=self.app.defaults["global_workspaceT"]) - if self.app.defaults['global_hud'] is True: - self.on_toggle_hud(state=True) - # Axis Display self.axis_enabled = True # enable Axis - self.on_toggle_axis(state=True) + self.on_toggle_axis(state=True, silent=True) + self.app.ui.axis_status_label.setStyleSheet(""" + QLabel + { + color: black; + background-color: orange; + } + """) - def on_toggle_axis(self, signal=None, state=None): - if state is None: + def on_toggle_axis(self, signal=None, state=None, silent=None): + if not state: state = not self.axis_enabled if state: @@ -343,7 +351,8 @@ class PlotCanvasLegacy(QtCore.QObject): background-color: orange; } """) - self.app.inform[str, bool].emit(_("Axis enabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("Axis enabled."), False) else: self.axis_enabled = False self.app.defaults['global_axis'] = False @@ -351,11 +360,12 @@ class PlotCanvasLegacy(QtCore.QObject): self.axes.lines.remove(self.h_line) self.axes.lines.remove(self.v_line) self.app.ui.axis_status_label.setStyleSheet("") - self.app.inform[str, bool].emit(_("Axis disabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("Axis disabled."), False) self.canvas.draw() - def on_toggle_hud(self, signal=None, state=None): + def on_toggle_hud(self, signal=None, state=None, silent=None): if state is None: state = not self.hud_enabled @@ -371,13 +381,15 @@ class PlotCanvasLegacy(QtCore.QObject): background-color: mediumpurple; } """) - self.app.inform[str, bool].emit(_("HUD enabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("HUD enabled."), False) else: self.hud_enabled = False self.text_hud.remove_artist() self.app.defaults['global_hud'] = False self.app.ui.hud_label.setStyleSheet("") - self.app.inform[str, bool].emit(_("HUD disabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("HUD disabled."), False) self.canvas.draw() @@ -440,7 +452,7 @@ class PlotCanvasLegacy(QtCore.QObject): if self.hud_holder in self.p.axes.artists: self.p.axes.artists.remove(self.hud_holder) - def on_toggle_grid_lines(self): + def on_toggle_grid_lines(self, signal=None, silent=None): state = not self.grid_lines_enabled if state: @@ -451,7 +463,8 @@ class PlotCanvasLegacy(QtCore.QObject): self.canvas.draw() except IndexError: pass - self.app.inform[str, bool].emit(_("Grid enabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("Grid enabled."), False) else: self.app.defaults['global_grid_lines'] = False self.grid_lines_enabled = False @@ -460,7 +473,8 @@ class PlotCanvasLegacy(QtCore.QObject): self.canvas.draw() except IndexError: pass - self.app.inform[str, bool].emit(_("Grid disabled."), False) + if silent is None: + self.app.inform[str, bool].emit(_("Grid disabled."), False) def draw_workspace(self, workspace_size): """ diff --git a/app_Main.py b/app_Main.py index e64b019f..10cb990f 100644 --- a/app_Main.py +++ b/app_Main.py @@ -3204,7 +3204,7 @@ class App(QtCore.QObject): self.defaults["global_bookmarks"].update( { '1': ['FlatCAM', "http://flatcam.org"], - '2': ['Backup Site', ""] + '2': [_('Backup Site'), ""] } ) else: @@ -3246,7 +3246,7 @@ class App(QtCore.QObject): act.setIcon(QtGui.QIcon(self.resource_location + '/link16.png')) # from here: https://stackoverflow.com/questions/20390323/pyqt-dynamic-generate-qmenu-action-and-connect - if title == 'Backup Site' and weblink == "": + if title == _('Backup Site') and weblink == "": act.triggered.connect(self.on_backup_site) else: act.triggered.connect(lambda sig, link=weblink: webbrowser.open(link)) @@ -6377,7 +6377,10 @@ class App(QtCore.QObject): pos_canvas = self.plotcanvas.translate_coords(event_pos) if self.grid_status(): - pos = self.geo_editor.snap(pos_canvas[0], pos_canvas[1]) + try: + pos = self.geo_editor.snap(pos_canvas[0], pos_canvas[1]) + except TypeError: + return else: pos = (pos_canvas[0], pos_canvas[1]) diff --git a/locale/de/LC_MESSAGES/strings.mo b/locale/de/LC_MESSAGES/strings.mo index b1ecdbd0..7d4e7a18 100644 Binary files a/locale/de/LC_MESSAGES/strings.mo and b/locale/de/LC_MESSAGES/strings.mo differ diff --git a/locale/de/LC_MESSAGES/strings.po b/locale/de/LC_MESSAGES/strings.po index cfc84da8..cd309533 100644 --- a/locale/de/LC_MESSAGES/strings.po +++ b/locale/de/LC_MESSAGES/strings.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:19+0200\n" -"PO-Revision-Date: 2020-10-28 03:19+0200\n" +"POT-Creation-Date: 2020-10-28 10:53+0200\n" +"PO-Revision-Date: 2020-10-28 10:53+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -84,6 +84,12 @@ msgstr "" msgid "Bookmark added." msgstr "Lesezeichen verwalten." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +#, fuzzy +#| msgid "Backup" +msgid "Backup Site" +msgstr "Sicherungskopie" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Dieses Lesezeichen kann nicht entfernt werden" diff --git a/locale/en/LC_MESSAGES/strings.mo b/locale/en/LC_MESSAGES/strings.mo index d4dc57d9..3f023a60 100644 Binary files a/locale/en/LC_MESSAGES/strings.mo and b/locale/en/LC_MESSAGES/strings.mo differ diff --git a/locale/en/LC_MESSAGES/strings.po b/locale/en/LC_MESSAGES/strings.po index c36a028d..1252b10f 100644 --- a/locale/en/LC_MESSAGES/strings.po +++ b/locale/en/LC_MESSAGES/strings.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:19+0200\n" -"PO-Revision-Date: 2020-10-28 03:19+0200\n" +"POT-Creation-Date: 2020-10-28 10:53+0200\n" +"PO-Revision-Date: 2020-10-28 10:53+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: en\n" @@ -88,6 +88,11 @@ msgstr "Either the Title or the Weblink already in the table." msgid "Bookmark added." msgstr "Bookmark added." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +#| msgid "Backup" +msgid "Backup Site" +msgstr "Backup Site" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "This bookmark can not be removed" @@ -13466,7 +13471,6 @@ msgid "Working..." msgstr "Working..." #: appObjects/FlatCAMGeometry.py:2425 -#| msgid "Add Polish" msgid "Polish" msgstr "Polish" diff --git a/locale/es/LC_MESSAGES/strings.mo b/locale/es/LC_MESSAGES/strings.mo index 9e3dd912..7d068634 100644 Binary files a/locale/es/LC_MESSAGES/strings.mo and b/locale/es/LC_MESSAGES/strings.mo differ diff --git a/locale/es/LC_MESSAGES/strings.po b/locale/es/LC_MESSAGES/strings.po index 38bc0847..19f33562 100644 --- a/locale/es/LC_MESSAGES/strings.po +++ b/locale/es/LC_MESSAGES/strings.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:19+0200\n" -"PO-Revision-Date: 2020-10-28 03:20+0200\n" +"POT-Creation-Date: 2020-10-28 10:53+0200\n" +"PO-Revision-Date: 2020-10-28 10:54+0200\n" "Last-Translator: Marius Stanciu - Google Translate\n" "Language-Team: \n" "Language: es\n" @@ -88,6 +88,10 @@ msgstr "Ya sea el Título o el Enlace web ya en la tabla." msgid "Bookmark added." msgstr "Marcador agregado." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +msgid "Backup Site" +msgstr "Sitio de respaldo" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Este marcador no se puede eliminar" diff --git a/locale/fr/LC_MESSAGES/strings.mo b/locale/fr/LC_MESSAGES/strings.mo index 169db83e..313073b1 100644 Binary files a/locale/fr/LC_MESSAGES/strings.mo and b/locale/fr/LC_MESSAGES/strings.mo differ diff --git a/locale/fr/LC_MESSAGES/strings.po b/locale/fr/LC_MESSAGES/strings.po index 34f33839..12ae420b 100644 --- a/locale/fr/LC_MESSAGES/strings.po +++ b/locale/fr/LC_MESSAGES/strings.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:21+0200\n" -"PO-Revision-Date: 2020-10-28 03:21+0200\n" +"POT-Creation-Date: 2020-10-28 10:55+0200\n" +"PO-Revision-Date: 2020-10-28 10:55+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -89,6 +89,12 @@ msgstr "Titre ou lien Web déjà dans le tableau." msgid "Bookmark added." msgstr "Signet ajouté." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +#, fuzzy +#| msgid "Backup" +msgid "Backup Site" +msgstr "F. Paramètres" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Ce menu ne peut être supprimé" diff --git a/locale/it/LC_MESSAGES/strings.mo b/locale/it/LC_MESSAGES/strings.mo index 0806c59b..6e82486f 100644 Binary files a/locale/it/LC_MESSAGES/strings.mo and b/locale/it/LC_MESSAGES/strings.mo differ diff --git a/locale/it/LC_MESSAGES/strings.po b/locale/it/LC_MESSAGES/strings.po index e6d564df..cf698b9d 100644 --- a/locale/it/LC_MESSAGES/strings.po +++ b/locale/it/LC_MESSAGES/strings.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:21+0200\n" -"PO-Revision-Date: 2020-10-28 03:21+0200\n" +"POT-Creation-Date: 2020-10-28 10:55+0200\n" +"PO-Revision-Date: 2020-10-28 10:56+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: it\n" @@ -88,6 +88,10 @@ msgstr "Il titolo o il link sono già presenti nella tabella." msgid "Bookmark added." msgstr "Segnalibro aggiunto." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +msgid "Backup Site" +msgstr "Sito di backup" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Questo segnalibro non può essere rimosso" diff --git a/locale/pt_BR/LC_MESSAGES/strings.mo b/locale/pt_BR/LC_MESSAGES/strings.mo index 7805d20c..52498ccd 100644 Binary files a/locale/pt_BR/LC_MESSAGES/strings.mo and b/locale/pt_BR/LC_MESSAGES/strings.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/strings.po b/locale/pt_BR/LC_MESSAGES/strings.po index a42fbe28..f797c81d 100644 --- a/locale/pt_BR/LC_MESSAGES/strings.po +++ b/locale/pt_BR/LC_MESSAGES/strings.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:21+0200\n" -"PO-Revision-Date: 2020-10-28 03:25+0200\n" +"POT-Creation-Date: 2020-10-28 10:56+0200\n" +"PO-Revision-Date: 2020-10-28 10:57+0200\n" "Last-Translator: Carlos Stein \n" "Language-Team: \n" "Language: pt_BR\n" @@ -84,6 +84,10 @@ msgstr "O título ou o link da Web já está na tabela." msgid "Bookmark added." msgstr "Favorito adicionado." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +msgid "Backup Site" +msgstr "Site de backup" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Este favorito não pode ser removido" diff --git a/locale/ro/LC_MESSAGES/strings.mo b/locale/ro/LC_MESSAGES/strings.mo index b9994786..3e68cbe9 100644 Binary files a/locale/ro/LC_MESSAGES/strings.mo and b/locale/ro/LC_MESSAGES/strings.mo differ diff --git a/locale/ro/LC_MESSAGES/strings.po b/locale/ro/LC_MESSAGES/strings.po index c374100b..0cf732ce 100644 --- a/locale/ro/LC_MESSAGES/strings.po +++ b/locale/ro/LC_MESSAGES/strings.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:25+0200\n" -"PO-Revision-Date: 2020-10-28 03:26+0200\n" +"POT-Creation-Date: 2020-10-28 10:57+0200\n" +"PO-Revision-Date: 2020-10-28 10:57+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: ro\n" @@ -89,6 +89,10 @@ msgstr "Fie Titlul, fie Weblink-ul deja sunt in tabel." msgid "Bookmark added." msgstr "Bookmark adăugat." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +msgid "Backup Site" +msgstr "Site de Backup" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Acest bookmark nu poate fi eliminat" @@ -5026,7 +5030,7 @@ msgstr "F1" #: appGUI/MainGUI.py:592 app_Main.py:3263 app_Main.py:3272 msgid "Bookmarks Manager" -msgstr "Bookmarks Manager" +msgstr "Manager Bookmark-uri" #: appGUI/MainGUI.py:597 msgid "Report a bug" diff --git a/locale/tr/LC_MESSAGES/strings.mo b/locale/tr/LC_MESSAGES/strings.mo index 2a69e1b3..a9456957 100644 Binary files a/locale/tr/LC_MESSAGES/strings.mo and b/locale/tr/LC_MESSAGES/strings.mo differ diff --git a/locale/tr/LC_MESSAGES/strings.po b/locale/tr/LC_MESSAGES/strings.po index fb7b9636..a16bb3d1 100644 --- a/locale/tr/LC_MESSAGES/strings.po +++ b/locale/tr/LC_MESSAGES/strings.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:26+0200\n" -"PO-Revision-Date: 2020-10-28 03:26+0200\n" +"POT-Creation-Date: 2020-10-28 10:58+0200\n" +"PO-Revision-Date: 2020-10-28 10:58+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: tr_TR\n" @@ -88,6 +88,12 @@ msgstr "Başlık veya Web Bağlantısı zaten tabloda." msgid "Bookmark added." msgstr "Yer işareti eklendi." +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +#, fuzzy +#| msgid "Backup" +msgid "Backup Site" +msgstr "Yedekleme" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr "Bu yer işareti silinemez" @@ -4980,7 +4986,7 @@ msgstr "Gerber Özellikleri" #: appGUI/MainGUI.py:610 msgid "Shortcuts List" -msgstr "Shortcuts List" +msgstr "" #: appGUI/MainGUI.py:610 appGUI/MainGUI.py:4398 msgid "F3" diff --git a/locale_template/strings.pot b/locale_template/strings.pot index 1d864e04..c5b6d6ca 100644 --- a/locale_template/strings.pot +++ b/locale_template/strings.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-10-28 03:27+0200\n" +"POT-Creation-Date: 2020-10-28 10:53+0200\n" "PO-Revision-Date: 2019-03-25 15:08+0200\n" "Last-Translator: \n" "Language-Team: \n" @@ -84,6 +84,10 @@ msgstr "" msgid "Bookmark added." msgstr "" +#: Bookmark.py:243 app_Main.py:3207 app_Main.py:3249 +msgid "Backup Site" +msgstr "" + #: Bookmark.py:244 msgid "This bookmark can not be removed" msgstr ""