pyloid 0.11.1__tar.gz → 0.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyloid-0.11.1 → pyloid-0.11.2}/LICENSE +1 -1
- {pyloid-0.11.1 → pyloid-0.11.2}/PKG-INFO +2 -2
- {pyloid-0.11.1 → pyloid-0.11.2}/README.md +1 -1
- {pyloid-0.11.1 → pyloid-0.11.2}/pyproject.toml +1 -1
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/pyloid.py +25 -38
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/__init__.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/api.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/autostart.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/monitor.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/timer.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/tray.py +0 -0
- {pyloid-0.11.1 → pyloid-0.11.2}/src/pyloid/utils.py +0 -0
@@ -198,4 +198,4 @@ Apache License
|
|
198
198
|
distributed under the License is distributed on an "AS IS" BASIS,
|
199
199
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
200
|
See the License for the specific language governing permissions and
|
201
|
-
limitations under the License.
|
201
|
+
limitations under the License.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyloid
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.2
|
4
4
|
Summary:
|
5
5
|
Author: aesthetics-of-record
|
6
6
|
Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
|
@@ -48,7 +48,7 @@ With Pyloid, you can leverage the full power of Python in your desktop applicati
|
|
48
48
|
|
49
49
|
#### Creating a React + Vite + Pyloid Project ⚛️
|
50
50
|
|
51
|
-
[https://github.com/pylonic/pyloid_react_boilerplate](https://github.com/Pyloid/
|
51
|
+
[https://github.com/pylonic/pyloid_react_boilerplate](https://github.com/Pyloid/yloid_react_boilerplate)
|
52
52
|
|
53
53
|
### Custom Your Boilerplate 🔨
|
54
54
|
|
@@ -33,7 +33,7 @@ With Pyloid, you can leverage the full power of Python in your desktop applicati
|
|
33
33
|
|
34
34
|
#### Creating a React + Vite + Pyloid Project ⚛️
|
35
35
|
|
36
|
-
[https://github.com/pylonic/pyloid_react_boilerplate](https://github.com/Pyloid/
|
36
|
+
[https://github.com/pylonic/pyloid_react_boilerplate](https://github.com/Pyloid/yloid_react_boilerplate)
|
37
37
|
|
38
38
|
### Custom Your Boilerplate 🔨
|
39
39
|
|
@@ -8,16 +8,7 @@ from PySide6.QtWidgets import (
|
|
8
8
|
)
|
9
9
|
from PySide6.QtWebEngineWidgets import QWebEngineView
|
10
10
|
from PySide6.QtWebChannel import QWebChannel
|
11
|
-
from PySide6.QtGui import
|
12
|
-
QIcon,
|
13
|
-
QKeySequence,
|
14
|
-
QShortcut,
|
15
|
-
QClipboard,
|
16
|
-
QImage,
|
17
|
-
QAction,
|
18
|
-
QPalette,
|
19
|
-
QColor,
|
20
|
-
)
|
11
|
+
from PySide6.QtGui import QIcon, QKeySequence, QShortcut, QClipboard, QImage, QAction, QPalette, QColor
|
21
12
|
from PySide6.QtCore import Qt, Signal, QUrl, QObject, QTimer
|
22
13
|
from PySide6.QtNetwork import QLocalServer, QLocalSocket
|
23
14
|
from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineSettings
|
@@ -32,14 +23,13 @@ import json
|
|
32
23
|
from .autostart import AutoStart
|
33
24
|
from .filewatcher import FileWatcher
|
34
25
|
import logging
|
35
|
-
from PySide6.QtCore import QCoreApplication
|
26
|
+
from PySide6.QtCore import QCoreApplication
|
36
27
|
|
37
28
|
# for linux debug
|
38
29
|
os.environ["QTWEBENGINE_DICTIONARIES_PATH"] = "/"
|
39
30
|
|
40
31
|
# for macos debug
|
41
|
-
logging.getLogger(
|
42
|
-
|
32
|
+
logging.getLogger('Qt').setLevel(logging.ERROR)
|
43
33
|
|
44
34
|
def custom_message_handler(mode, context, message):
|
45
35
|
if not hasattr(custom_message_handler, "vulkan_warning_shown") and (
|
@@ -52,13 +42,7 @@ def custom_message_handler(mode, context, message):
|
|
52
42
|
)
|
53
43
|
os.environ["QT_QUICK_BACKEND"] = "software"
|
54
44
|
custom_message_handler.vulkan_warning_shown = True
|
55
|
-
|
56
|
-
if "Autofill.enable failed" in message:
|
57
|
-
print(
|
58
|
-
"\033[93mPyloid Warning: Autofill is not enabled in developer tools.\033[0m"
|
59
|
-
)
|
60
|
-
|
61
|
-
if "vulkan" not in message.lower() and "Autofill.enable failed" not in message:
|
45
|
+
if "vulkan" not in message.lower():
|
62
46
|
print(message)
|
63
47
|
|
64
48
|
|
@@ -76,6 +60,14 @@ class WindowAPI(PyloidAPI):
|
|
76
60
|
"""Returns the current window ID."""
|
77
61
|
return self.window_id
|
78
62
|
|
63
|
+
@Bridge(result=str)
|
64
|
+
def getWindowProperties(self):
|
65
|
+
"""Returns the properties of the window."""
|
66
|
+
window = self.app.get_window_by_id(self.window_id)
|
67
|
+
if window:
|
68
|
+
return window.get_window_properties()
|
69
|
+
return None
|
70
|
+
|
79
71
|
@Bridge()
|
80
72
|
def close(self):
|
81
73
|
"""Closes the window."""
|
@@ -406,11 +398,6 @@ class BrowserWindow:
|
|
406
398
|
self.dev_tools_window.resize(800, 600)
|
407
399
|
self.dev_tools_window.show()
|
408
400
|
|
409
|
-
# Add this line to handle dev tools window closure
|
410
|
-
self.dev_tools_window.closeEvent = lambda event: setattr(
|
411
|
-
self, "dev_tools_window", None
|
412
|
-
)
|
413
|
-
|
414
401
|
def get_window_properties(self):
|
415
402
|
"""Returns the properties of the window."""
|
416
403
|
return {
|
@@ -432,14 +419,6 @@ class BrowserWindow:
|
|
432
419
|
|
433
420
|
def closeEvent(self, event):
|
434
421
|
"""Handles the event when the window is closed."""
|
435
|
-
# Close developer tools if open
|
436
|
-
if hasattr(self, "dev_tools_window") and self.dev_tools_window:
|
437
|
-
self.dev_tools_window.close()
|
438
|
-
self.dev_tools_window = None
|
439
|
-
|
440
|
-
# Solve memory leak issue with web view engine
|
441
|
-
self.web_view.page().deleteLater()
|
442
|
-
self.web_view.deleteLater()
|
443
422
|
self._remove_from_app_windows()
|
444
423
|
event.accept() # Accept the event (allow the window to close)
|
445
424
|
|
@@ -576,6 +555,17 @@ class BrowserWindow:
|
|
576
555
|
}})();
|
577
556
|
"""
|
578
557
|
self.web_view.page().runJavaScript(script)
|
558
|
+
###########################################################################################
|
559
|
+
# Get Properties
|
560
|
+
###########################################################################################
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
|
568
|
+
|
579
569
|
|
580
570
|
|
581
571
|
class _WindowController(QObject):
|
@@ -759,11 +749,8 @@ class Pyloid(QApplication):
|
|
759
749
|
window._window.close()
|
760
750
|
|
761
751
|
def quit(self):
|
762
|
-
"""
|
763
|
-
|
764
|
-
window._window.close()
|
765
|
-
window.web_page.deleteLater()
|
766
|
-
window.web_view.deleteLater()
|
752
|
+
"""Quits the application."""
|
753
|
+
self.close_all_windows()
|
767
754
|
QApplication.quit()
|
768
755
|
|
769
756
|
###########################################################################################
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|