Prechádzať zdrojové kódy

- added a new package to be installed in Linux to make available the black theme for FlatCAM beta
- moved all the 'share' resources (icons) to the 'assets/resources' folder
- some more fixes to problems generated by latest changes in the open handlers
- modified the make_freezed.py script for the new location of the icons
- added a fix for the ConnectionRefusedError in Linux that is issued when first running after a FlatCAM crash

Marius Stanciu 5 rokov pred
rodič
commit
f03d6bfda4
100 zmenil súbory, kde vykonal 34 pridanie a 18 odobranie
  1. 6 0
      CHANGELOG.md
  2. 24 14
      FlatCAMApp.py
  3. 4 4
      FlatCAMTranslation.py
  4. 0 0
      assets/resources/about32.png
  5. 0 0
      assets/resources/active.gif
  6. 0 0
      assets/resources/active_2.gif
  7. 0 0
      assets/resources/active_2_static.png
  8. 0 0
      assets/resources/active_3.gif
  9. 0 0
      assets/resources/active_3_static.png
  10. 0 0
      assets/resources/active_4.gif
  11. 0 0
      assets/resources/active_4_static.png
  12. 0 0
      assets/resources/active_static.png
  13. 0 0
      assets/resources/addarray16.png
  14. 0 0
      assets/resources/addarray20.png
  15. 0 0
      assets/resources/addarray32.png
  16. 0 0
      assets/resources/aero.png
  17. 0 0
      assets/resources/aero_arc.png
  18. 0 0
      assets/resources/aero_array.png
  19. 0 0
      assets/resources/aero_buffer.png
  20. 0 0
      assets/resources/aero_circle.png
  21. 0 0
      assets/resources/aero_circle_geo.png
  22. 0 0
      assets/resources/aero_disc.png
  23. 0 0
      assets/resources/aero_drill.png
  24. 0 0
      assets/resources/aero_drill_array.png
  25. 0 0
      assets/resources/aero_path1.png
  26. 0 0
      assets/resources/aero_path2.png
  27. 0 0
      assets/resources/aero_path3.png
  28. 0 0
      assets/resources/aero_path4.png
  29. 0 0
      assets/resources/aero_path5.png
  30. 0 0
      assets/resources/aero_semidisc.png
  31. 0 0
      assets/resources/aero_slot.png
  32. 0 0
      assets/resources/aero_text.png
  33. 0 0
      assets/resources/align16.png
  34. 0 0
      assets/resources/align32.png
  35. 0 0
      assets/resources/align_center32.png
  36. 0 0
      assets/resources/align_justify32.png
  37. 0 0
      assets/resources/align_left32.png
  38. 0 0
      assets/resources/align_right32.png
  39. 0 0
      assets/resources/aperture16.png
  40. 0 0
      assets/resources/aperture32.png
  41. 0 0
      assets/resources/arc16.png
  42. 0 0
      assets/resources/arc24.png
  43. 0 0
      assets/resources/arc32.png
  44. 0 0
      assets/resources/axis32.png
  45. 0 0
      assets/resources/backup24.png
  46. 0 0
      assets/resources/backup_export24.png
  47. 0 0
      assets/resources/backup_import24.png
  48. 0 0
      assets/resources/black32.png
  49. 0 0
      assets/resources/blocked16.png
  50. 0 0
      assets/resources/blue32.png
  51. 0 0
      assets/resources/bluelight12.png
  52. 0 0
      assets/resources/bold32.png
  53. 0 0
      assets/resources/bookmarks16.png
  54. 0 0
      assets/resources/bookmarks32.png
  55. 0 0
      assets/resources/brown32.png
  56. 0 0
      assets/resources/buffer16-2.png
  57. 0 0
      assets/resources/buffer16.png
  58. 0 0
      assets/resources/buffer20.png
  59. 0 0
      assets/resources/buffer24.png
  60. 0 0
      assets/resources/bug16.png
  61. 0 0
      assets/resources/bug32.png
  62. 0 0
      assets/resources/calculator16.png
  63. 0 0
      assets/resources/calculator24.png
  64. 0 0
      assets/resources/calibrate_16.png
  65. 0 0
      assets/resources/calibrate_32.png
  66. 0 0
      assets/resources/cancel_edit16.png
  67. 0 0
      assets/resources/cancel_edit32.png
  68. 0 0
      assets/resources/circle32.png
  69. 0 0
      assets/resources/clear_plot16.png
  70. 0 0
      assets/resources/clear_plot32.png
  71. 0 0
      assets/resources/close_edit_file16.png
  72. 0 0
      assets/resources/close_edit_file32.png
  73. 0 0
      assets/resources/cnc16.png
  74. 0 0
      assets/resources/cnc32.png
  75. 0 0
      assets/resources/code.png
  76. 0 0
      assets/resources/code_editor32.png
  77. 0 0
      assets/resources/convert24.png
  78. 0 0
      assets/resources/copperfill16.png
  79. 0 0
      assets/resources/copperfill32.png
  80. 0 0
      assets/resources/copy.png
  81. 0 0
      assets/resources/copy16.png
  82. 0 0
      assets/resources/copy32.png
  83. 0 0
      assets/resources/copy_file16.png
  84. 0 0
      assets/resources/copy_file32.png
  85. 0 0
      assets/resources/copy_geo.png
  86. 0 0
      assets/resources/corner32.png
  87. 0 0
      assets/resources/cut16.png
  88. 0 0
      assets/resources/cut16_bis.png
  89. 0 0
      assets/resources/cut32.png
  90. 0 0
      assets/resources/cut32_bis.png
  91. 0 0
      assets/resources/cutpath16.png
  92. 0 0
      assets/resources/cutpath24.png
  93. 0 0
      assets/resources/cutpath32.png
  94. 0 0
      assets/resources/dark_resources/Makefile
  95. 0 0
      assets/resources/dark_resources/about32.png
  96. 0 0
      assets/resources/dark_resources/active.gif
  97. 0 0
      assets/resources/dark_resources/active_2.gif
  98. 0 0
      assets/resources/dark_resources/active_2_static.png
  99. 0 0
      assets/resources/dark_resources/active_3.gif
  100. 0 0
      assets/resources/dark_resources/active_3_static.png

+ 6 - 0
CHANGELOG.md

@@ -20,6 +20,12 @@ CHANGELOG for FlatCAM beta
 - added a new Tcl command named OpenDXF (open_dxf alias)
 - fixed some errors in Scripting features
 - added a new Tcl command named GetPath as a convenient way to get the current default path stored in App.defaults['global_tcl_path']
+- added a new package to be installed in Linux to make available the black theme for FlatCAM beta
+- moved all the 'share' resources (icons) to the 'assets/resources' folder
+- some more fixes to problems generated by latest changes in the open handlers
+- modified the make_freezed.py script for the new location of the icons
+- added a fix for the ConnectionRefusedError in Linux that is issued when first running after a FlatCAM crash
+
 
 27.04.2020
 

+ 24 - 14
FlatCAMApp.py

@@ -1096,9 +1096,9 @@ class App(QtCore.QObject):
             self.decimals = int(self.defaults['decimals_inch'])
 
         if self.defaults["global_gray_icons"] is False:
-            self.resource_location = 'share'
+            self.resource_location = 'assets/resources'
         else:
-            self.resource_location = 'share/dark_resources'
+            self.resource_location = 'assets/resources/dark_resources'
 
         self.current_units = self.defaults['units']
 
@@ -3032,7 +3032,7 @@ class App(QtCore.QObject):
                             if silent is False:
                                 self.inform.emit(_("Open Excellon file failed."))
                         else:
-                            self.on_fileopenexcellon(name=file_name)
+                            self.on_fileopenexcellon(name=file_name, signal=None)
                             return
 
                 gco_list = self.ui.util_defaults_form.fa_gcode_group.gco_list_text.get_value().split(',')
@@ -3045,7 +3045,7 @@ class App(QtCore.QObject):
                             if silent is False:
                                 self.inform.emit(_("Open GCode file failed."))
                         else:
-                            self.on_fileopengcode(name=file_name)
+                            self.on_fileopengcode(name=file_name, signal=None)
                             return
 
                 grb_list = self.ui.util_defaults_form.fa_gerber_group.grb_list_text.get_value().split(',')
@@ -3058,7 +3058,7 @@ class App(QtCore.QObject):
                             if silent is False:
                                 self.inform.emit(_("Open Gerber file failed."))
                         else:
-                            self.on_fileopengerber(name=file_name)
+                            self.on_fileopengerber(name=file_name, signal=None)
                             return
 
         # if it reached here without already returning then the app was registered with a file that it does not
@@ -12929,16 +12929,26 @@ class ArgsThread(QtCore.QObject):
                 conn = self.listener.accept()
                 self.serve(conn)
         except socket.error:
-            conn = Client(*address)
-            conn.send(sys.argv)
-            conn.send('close')
-            # close the current instance only if there are args
-            if len(sys.argv) > 1:
-                try:
-                    self.listener.close()
-                except Exception:
+            try:
+                conn = Client(*address)
+                conn.send(sys.argv)
+                conn.send('close')
+                # close the current instance only if there are args
+                if len(sys.argv) > 1:
+                    try:
+                        self.listener.close()
+                    except Exception:
+                        pass
+                    sys.exit()
+            except ConnectionRefusedError:
+                if sys.platform == 'win32':
                     pass
-                sys.exit()
+                else:
+                    os.system('rm /tmp/testipc')
+                    self.listener = Listener(*address)
+                    while True:
+                        conn = self.listener.accept()
+                        self.serve(conn)
 
     def serve(self, conn):
         while True:

+ 4 - 4
FlatCAMTranslation.py

@@ -88,9 +88,9 @@ def on_language_apply_click(app, restart=False):
         theme = 'white'
 
     if theme == 'white':
-        resource_loc = 'share'
+        resource_loc = 'assets/resources'
     else:
-        resource_loc = 'share'
+        resource_loc = 'assets/resources'
 
     # do nothing if trying to apply the language that is the current language (already applied).
     settings = QSettings("Open Source", "FlatCAM")
@@ -180,9 +180,9 @@ def restart_program(app, ask=None):
         theme = 'white'
 
     if theme == 'white':
-        resource_loc = 'share'
+        resource_loc = 'assets/resources'
     else:
-        resource_loc = 'share'
+        resource_loc = 'assets/resources'
 
     # close the Socket in ArgsThread class
     app.new_launch.listener.close()

+ 0 - 0
share/about32.png → assets/resources/about32.png


+ 0 - 0
share/active.gif → assets/resources/active.gif


+ 0 - 0
share/active_2.gif → assets/resources/active_2.gif


+ 0 - 0
share/active_2_static.png → assets/resources/active_2_static.png


+ 0 - 0
share/active_3.gif → assets/resources/active_3.gif


+ 0 - 0
share/active_3_static.png → assets/resources/active_3_static.png


+ 0 - 0
share/active_4.gif → assets/resources/active_4.gif


+ 0 - 0
share/active_4_static.png → assets/resources/active_4_static.png


+ 0 - 0
share/active_static.png → assets/resources/active_static.png


+ 0 - 0
share/addarray16.png → assets/resources/addarray16.png


+ 0 - 0
share/addarray20.png → assets/resources/addarray20.png


+ 0 - 0
share/addarray32.png → assets/resources/addarray32.png


+ 0 - 0
share/aero.png → assets/resources/aero.png


+ 0 - 0
share/aero_arc.png → assets/resources/aero_arc.png


+ 0 - 0
share/aero_array.png → assets/resources/aero_array.png


+ 0 - 0
share/aero_buffer.png → assets/resources/aero_buffer.png


+ 0 - 0
share/aero_circle.png → assets/resources/aero_circle.png


+ 0 - 0
share/aero_circle_geo.png → assets/resources/aero_circle_geo.png


+ 0 - 0
share/aero_disc.png → assets/resources/aero_disc.png


+ 0 - 0
share/aero_drill.png → assets/resources/aero_drill.png


+ 0 - 0
share/aero_drill_array.png → assets/resources/aero_drill_array.png


+ 0 - 0
share/aero_path1.png → assets/resources/aero_path1.png


+ 0 - 0
share/aero_path2.png → assets/resources/aero_path2.png


+ 0 - 0
share/aero_path3.png → assets/resources/aero_path3.png


+ 0 - 0
share/aero_path4.png → assets/resources/aero_path4.png


+ 0 - 0
share/aero_path5.png → assets/resources/aero_path5.png


+ 0 - 0
share/aero_semidisc.png → assets/resources/aero_semidisc.png


+ 0 - 0
share/aero_slot.png → assets/resources/aero_slot.png


+ 0 - 0
share/aero_text.png → assets/resources/aero_text.png


+ 0 - 0
share/align16.png → assets/resources/align16.png


+ 0 - 0
share/align32.png → assets/resources/align32.png


+ 0 - 0
share/align_center32.png → assets/resources/align_center32.png


+ 0 - 0
share/align_justify32.png → assets/resources/align_justify32.png


+ 0 - 0
share/align_left32.png → assets/resources/align_left32.png


+ 0 - 0
share/align_right32.png → assets/resources/align_right32.png


+ 0 - 0
share/aperture16.png → assets/resources/aperture16.png


+ 0 - 0
share/aperture32.png → assets/resources/aperture32.png


+ 0 - 0
share/arc16.png → assets/resources/arc16.png


+ 0 - 0
share/arc24.png → assets/resources/arc24.png


+ 0 - 0
share/arc32.png → assets/resources/arc32.png


+ 0 - 0
share/axis32.png → assets/resources/axis32.png


+ 0 - 0
share/backup24.png → assets/resources/backup24.png


+ 0 - 0
share/backup_export24.png → assets/resources/backup_export24.png


+ 0 - 0
share/backup_import24.png → assets/resources/backup_import24.png


+ 0 - 0
share/black32.png → assets/resources/black32.png


+ 0 - 0
share/blocked16.png → assets/resources/blocked16.png


+ 0 - 0
share/blue32.png → assets/resources/blue32.png


+ 0 - 0
share/bluelight12.png → assets/resources/bluelight12.png


+ 0 - 0
share/bold32.png → assets/resources/bold32.png


+ 0 - 0
share/bookmarks16.png → assets/resources/bookmarks16.png


+ 0 - 0
share/bookmarks32.png → assets/resources/bookmarks32.png


+ 0 - 0
share/brown32.png → assets/resources/brown32.png


+ 0 - 0
share/buffer16-2.png → assets/resources/buffer16-2.png


+ 0 - 0
share/buffer16.png → assets/resources/buffer16.png


+ 0 - 0
share/buffer20.png → assets/resources/buffer20.png


+ 0 - 0
share/buffer24.png → assets/resources/buffer24.png


+ 0 - 0
share/bug16.png → assets/resources/bug16.png


+ 0 - 0
share/bug32.png → assets/resources/bug32.png


+ 0 - 0
share/calculator16.png → assets/resources/calculator16.png


+ 0 - 0
share/calculator24.png → assets/resources/calculator24.png


+ 0 - 0
share/calibrate_16.png → assets/resources/calibrate_16.png


+ 0 - 0
share/calibrate_32.png → assets/resources/calibrate_32.png


+ 0 - 0
share/cancel_edit16.png → assets/resources/cancel_edit16.png


+ 0 - 0
share/cancel_edit32.png → assets/resources/cancel_edit32.png


+ 0 - 0
share/circle32.png → assets/resources/circle32.png


+ 0 - 0
share/clear_plot16.png → assets/resources/clear_plot16.png


+ 0 - 0
share/clear_plot32.png → assets/resources/clear_plot32.png


+ 0 - 0
share/close_edit_file16.png → assets/resources/close_edit_file16.png


+ 0 - 0
share/close_edit_file32.png → assets/resources/close_edit_file32.png


+ 0 - 0
share/cnc16.png → assets/resources/cnc16.png


+ 0 - 0
share/cnc32.png → assets/resources/cnc32.png


+ 0 - 0
share/code.png → assets/resources/code.png


+ 0 - 0
share/code_editor32.png → assets/resources/code_editor32.png


+ 0 - 0
share/convert24.png → assets/resources/convert24.png


+ 0 - 0
share/copperfill16.png → assets/resources/copperfill16.png


+ 0 - 0
share/copperfill32.png → assets/resources/copperfill32.png


+ 0 - 0
share/copy.png → assets/resources/copy.png


+ 0 - 0
share/copy16.png → assets/resources/copy16.png


+ 0 - 0
share/copy32.png → assets/resources/copy32.png


+ 0 - 0
share/copy_file16.png → assets/resources/copy_file16.png


+ 0 - 0
share/copy_file32.png → assets/resources/copy_file32.png


+ 0 - 0
share/copy_geo.png → assets/resources/copy_geo.png


+ 0 - 0
share/corner32.png → assets/resources/corner32.png


+ 0 - 0
share/cut16.png → assets/resources/cut16.png


+ 0 - 0
share/cut16_bis.png → assets/resources/cut16_bis.png


+ 0 - 0
share/cut32.png → assets/resources/cut32.png


+ 0 - 0
share/cut32_bis.png → assets/resources/cut32_bis.png


+ 0 - 0
share/cutpath16.png → assets/resources/cutpath16.png


+ 0 - 0
share/cutpath24.png → assets/resources/cutpath24.png


+ 0 - 0
share/cutpath32.png → assets/resources/cutpath32.png


+ 0 - 0
share/dark_resources/Makefile → assets/resources/dark_resources/Makefile


+ 0 - 0
share/dark_resources/about32.png → assets/resources/dark_resources/about32.png


+ 0 - 0
share/dark_resources/active.gif → assets/resources/dark_resources/active.gif


+ 0 - 0
share/dark_resources/active_2.gif → assets/resources/dark_resources/active_2.gif


+ 0 - 0
share/dark_resources/active_2_static.png → assets/resources/dark_resources/active_2_static.png


+ 0 - 0
share/dark_resources/active_3.gif → assets/resources/dark_resources/active_3.gif


+ 0 - 0
share/dark_resources/active_3_static.png → assets/resources/dark_resources/active_3_static.png


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov