Remove deprecated canMinimizeToTray option
This commit is contained in:
parent
e9a599dfd8
commit
46fc044b5c
@ -27,11 +27,6 @@ Additional Options
|
||||
``can_minimize_to_tray``
|
||||
''''''''''''''''''''''''
|
||||
|
||||
.. important::
|
||||
|
||||
This option was changed in version 0.4.0 from ``canMinimizeToTray`` to ``can_minimize_to_tray``. The old option
|
||||
is still available, but is deprecated. It will be removed in 0.6.0.
|
||||
|
||||
To install a system tray icon, and minimize your application to the system tray, simply pass
|
||||
``can_minimize_to_tray=True`` to the class and a tray icon will be installed with the necessary menu options.
|
||||
|
||||
@ -41,6 +36,10 @@ To install a system tray icon, and minimize your application to the system tray,
|
||||
|
||||
Clicking on the tray icon will show the window, while right-clicking will show the menu.
|
||||
|
||||
.. note::
|
||||
|
||||
The `canMinimizeToTray` version of this option was removed in 0.6.0
|
||||
|
||||
.. |pypi| image:: https://img.shields.io/pypi/v/WebAppify
|
||||
:target: https://pypi.org/project/webappify/
|
||||
.. |license| image:: https://img.shields.io/pypi/l/WebAppify
|
||||
|
@ -209,7 +209,7 @@ class WebApp(QtWidgets.QApplication):
|
||||
"""
|
||||
A generic application to open a web page in a desktop app
|
||||
"""
|
||||
def __init__(self, title, url, icon, can_minimize_to_tray=False, canMinimizeToTray=False):
|
||||
def __init__(self, title, url, icon, can_minimize_to_tray=False):
|
||||
"""
|
||||
Create an application which loads a URL into a window
|
||||
"""
|
||||
@ -219,8 +219,7 @@ class WebApp(QtWidgets.QApplication):
|
||||
self.title = title
|
||||
self.url = url
|
||||
self.icon = icon
|
||||
self.can_minimize_to_tray = QtWidgets.QSystemTrayIcon.isSystemTrayAvailable() and \
|
||||
(can_minimize_to_tray or canMinimizeToTray)
|
||||
self.can_minimize_to_tray = QtWidgets.QSystemTrayIcon.isSystemTrayAvailable() and can_minimize_to_tray
|
||||
if self.can_minimize_to_tray:
|
||||
self.setQuitOnLastWindowClosed(False)
|
||||
self.setWindowIcon(QtGui.QIcon(self.icon))
|
||||
|
Loading…
Reference in New Issue
Block a user