Merged with branch 'eric7' in order to get the latest changes and bug fixes. mpy_network

Tue, 14 Mar 2023 19:55:10 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 14 Mar 2023 19:55:10 +0100
branch
mpy_network
changeset 9897
e8757b18b245
parent 9892
ddb698b2935b (current diff)
parent 9896
bef51a4fc5c5 (diff)
child 9914
3f2f0c4bc114

Merged with branch 'eric7' in order to get the latest changes and bug fixes.

--- a/src/eric7/MicroPython/Devices/__init__.py	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/MicroPython/Devices/__init__.py	Tue Mar 14 19:55:10 2023 +0100
@@ -264,9 +264,17 @@
     },
     "pyboard": {
         "ids": [
-            (0xF055, 0x9800),  # Pyboard in CDC mode
+            (0xF055, 0x9800),  # Pyboard in CDC+MSC mode
             (0xF055, 0x9801),  # Pyboard in CDC+HID mode
-            (0xF055, 0x9802),  # Pyboard in CDC+MSC mode
+            (0xF055, 0x9802),  # Pyboard in CDC mode
+            (0xF055, 0x9803),  # Pyboard in MSC mode
+            (0xF055, 0x9804),  # Pyboard in CDC2+MSC mode
+            (0xF055, 0x9805),  # Pyboard in CDC2 mode
+            (0xF055, 0x9806),  # Pyboard in CDC3 mode
+            (0xF055, 0x9807),  # Pyboard in CDC3+MSC mode
+            (0xF055, 0x9808),  # Pyboard in CDC+MSC+HID mode
+            (0xF055, 0x9809),  # Pyboard in CDC2+MSC+HID mode
+            (0xF055, 0x980A),  # Pyboard in CDC3+MSC+HID mode
         ],
         "description": "PyBoard",
         "icon": "micropython48",
@@ -275,8 +283,17 @@
     },
     "rp2040": {
         "ids": [
+            (0x16D0, 0x08C7),  # Pimoroni Tiny 2040 (8MB)
+            (0x1B4F, 0x0025),  # SparkFun Thing Plus RP2040
+            (0x1B4F, 0x0026),  # SparkFun Pro Micro RP2040
+            (0x2341, 0x025e),  # Arduino Nano RP2040 Connect
+            (0x239A, 0x80F2),  # Adafruit Feather RP2040
+            (0x239A, 0x80F8),  # Adafruit QT Py RP2040
+            (0x239A, 0x80FE),  # Adafruit ItsyBitsy RP2040
             (0x2E8A, 0x0005),  # Raspberry Pi Pico
             (0x2E8A, 0x000C),  # Raspberry Pi Pico
+            (0x2E8A, 0x1002),  # Pimoroni Pico LiPo (4MB)
+            (0x2E8A, 0x1003),  # Pimoroni Pico LiPo (16MB)
         ],
         "description": QCoreApplication.translate("MicroPythonDevice", "RP2040 based"),
         "icon": "rp2040Device",
--- a/src/eric7/MicroPython/MicroPythonWidget.py	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/MicroPython/MicroPythonWidget.py	Tue Mar 14 19:55:10 2023 +0100
@@ -2124,6 +2124,8 @@
                 package, version, mpy = dlg.getData()
                 with EricOverrideCursor():
                     out, err = self.__device.mipInstall(package, version, mpy)
+            else:
+                return
         elif method == "upip":
             title = self.tr("Install Packages")
             packagesStr, ok = QInputDialog.getText(
--- a/src/eric7/Preferences/__init__.py	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/Preferences/__init__.py	Tue Mar 14 19:55:10 2023 +0100
@@ -246,112 +246,113 @@
         "NotificationCriticalBackground": "#ffd0d0",
         "LoadUnknownMimeTypeFiles": False,
         "TextMimeTypes": [
+            "application/atom+xml",
             "application/bookmarks.xbel",
-            "application/x-xbel",
+            "application/javascript",
+            "application/json",
             "application/opensearchdescription+xml",
+            "application/postscript",
+            "application/rss+xml",
+            "application/sql",
             "application/x-actionscript",
             "application/x-actionscript3",
             "application/x-awk",
-            "application/x-sh",
-            "application/x-shellscript",
-            "application/x-shell-session",
-            "application/x-dos-batch",
             "application/x-befunge",
             "application/x-brainfuck",
-            "application/x-javascript+cheetah",
-            "application/x-javascript+spitfire",
             "application/x-cheetah",
-            "application/x-spitfire",
-            "application/xml+cheetah",
-            "application/xml+spitfire",
             "application/x-clojure",
             "application/x-coldfusion",
+            "application/x-csh",
             "application/x-cython",
+            "application/x-desktop",
             "application/x-django-templating",
-            "application/x-jinja",
-            "application/xml-dtd",
+            "application/x-dos-batch",
             "application/x-ecl",
-            "application/x-ruby-templating",
             "application/x-evoque",
-            "application/xml+evoque",
             "application/x-fantom",
             "application/x-genshi",
-            "application/x-kid",
             "application/x-genshi-text",
             "application/x-gettext",
-            "application/x-troff",
-            "application/x-troff-man",
-            "application/x-troff-me",
-            "application/x-troff-ms",
-            "application/xhtml+xml",
-            "application/x-php",
+            "application/x-gooddata-maql",
+            "application/x-httpd-lasso",
+            "application/x-httpd-lasso[89]",
+            "application/x-httpd-lasso8",
+            "application/x-httpd-lasso9",
             "application/x-httpd-php",
             "application/x-httpd-php3",
             "application/x-httpd-php4",
             "application/x-httpd-php5",
             "application/x-hybris",
+            "application/x-javascript+cheetah",
+            "application/x-javascript+spitfire",
             "application/x-javascript+django",
             "application/x-javascript+jinja",
             "application/x-javascript+ruby",
             "application/x-javascript+genshi",
-            "application/javascript",
             "application/x-javascript",
             "application/x-javascript+php",
             "application/x-javascript+smarty",
-            "application/json",
+            "application/x-javascript+lasso",
+            "application/x-javascript+mako",
+            "application/x-javascript+myghty",
+            "application/x-jinja",
             "application/x-jsp",
             "application/x-julia",
-            "application/x-httpd-lasso",
-            "application/x-httpd-lasso[89]",
-            "application/x-httpd-lasso8",
-            "application/x-httpd-lasso9",
-            "application/x-javascript+lasso",
-            "application/xml+lasso",
+            "application/x-kid",
+            "application/x-latex",
             "application/x-lua",
-            "application/x-javascript+mako",
             "application/x-mako",
-            "application/xml+mako",
-            "application/x-gooddata-maql",
             "application/x-mason",
             "application/x-moonscript",
-            "application/x-javascript+myghty",
             "application/x-myghty",
-            "application/xml+myghty",
             "application/x-newlisp",
             "application/x-openedge",
             "application/x-perl",
-            "application/postscript",
+            "application/x-php",
+            "application/x-pygments-tokens",
             "application/x-pypylog",
+            "application/x-python",
             "application/x-python3",
-            "application/x-python",
             "application/x-qml",
             "application/x-racket",
-            "application/x-pygments-tokens",
             "application/x-ruby",
-            "application/x-standardml",
+            "application/x-ruby-templating",
             "application/x-scheme",
+            "application/x-sh",
             "application/x-sh-session",
+            "application/x-shell-session",
+            "application/x-shellscript",
             "application/x-smarty",
+            "application/x-spitfire",
             "application/x-ssp",
+            "application/x-standardml",
             "application/x-tcl",
-            "application/x-csh",
+            "application/x-tex",
+            "application/x-texinfo",
+            "application/x-troff",
+            "application/x-troff-man",
+            "application/x-troff-me",
+            "application/x-troff-ms",
             "application/x-urbiscript",
-            "application/xml+velocity",
-            "application/xquery",
+            "application/x-xbel",
+            "application/xhtml+xml",
+            "application/xml",
+            "application/xml+cheetah",
             "application/xml+django",
+            "application/xml+evoque",
             "application/xml+jinja",
+            "application/xml+lasso",
+            "application/xml+mako",
+            "application/xml+myghty",
+            "application/xml+php",
             "application/xml+ruby",
-            "application/xml",
-            "application/rss+xml",
-            "application/atom+xml",
-            "application/xml+php",
             "application/xml+smarty",
+            "application/xml+spitfire",
+            "application/xml+velocity",
+            "application/xml-dtd",
+            "application/xquery",
             "application/xsl+xml",
             "application/xslt+xml",
-            "application/x-desktop",
-            "application/x-latex",
-            "application/x-tex",
-            "application/x-texinfo",
             "image/svg+xml",
             "message/rfc822",
         ],
--- a/src/eric7/UI/FindFileWidget.ui	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/UI/FindFileWidget.ui	Tue Mar 14 19:55:10 2023 +0100
@@ -40,6 +40,9 @@
        <property name="insertPolicy">
         <enum>QComboBox::InsertAtTop</enum>
        </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+       </property>
        <property name="duplicatesEnabled">
         <bool>false</bool>
        </property>
@@ -79,6 +82,9 @@
        <property name="insertPolicy">
         <enum>QComboBox::InsertAtTop</enum>
        </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+       </property>
        <property name="duplicatesEnabled">
         <bool>false</bool>
        </property>
--- a/src/eric7/UI/SymbolsWidget.ui	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/UI/SymbolsWidget.ui	Tue Mar 14 19:55:10 2023 +0100
@@ -37,6 +37,9 @@
      <property name="toolTip">
       <string>Select the table to be shown</string>
      </property>
+     <property name="sizeAdjustPolicy">
+      <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
+     </property>
     </widget>
    </item>
    <item>
--- a/src/eric7/Utilities/MimeTypes.py	Tue Mar 14 13:30:28 2023 +0100
+++ b/src/eric7/Utilities/MimeTypes.py	Tue Mar 14 19:55:10 2023 +0100
@@ -46,8 +46,22 @@
             )
         )
     else:
-        return mimetype.split("/")[0] == "text" or mimetype in Preferences.getUI(
-            "TextMimeTypes"
+        return (
+            mimetype.split("/")[0] == "text"
+            or mimetype in Preferences.getUI("TextMimeTypes")
+            or EricMessageBox.yesNo(
+                None,
+                QCoreApplication.translate("MimeTypes", "Open File"),
+                QCoreApplication.translate(
+                    "MimeTypes",
+                    "<p>The file <b>{0}</b> has the mime type <b>{1}</b>. This type"
+                    " is not recognized as being text to be opened in eric. Is this"
+                    " an editable text file?</p>"
+                    "<p><b>Note:</b> You may suppress this question by adding an"
+                    " entry to the list of known text file types on the"
+                    " <b>MimeTypes</b> configuration page.</p>",
+                ).format(filename, mimetype),
+            )
         )
 
 

eric ide

mercurial