Convert Configure Screen into the Main Application Window

- What
  - Convert the config screen into the main application window
    with configuration as just one of the functionality it provides
  - Rename config screen to main window to match new designation

- Why
  - System Tray isn't available everywhere (e.g Linux)
  - This requires moving functionality into a normal window for cross-compat
This commit is contained in:
Debanjum Singh Solanky
2022-08-13 01:39:46 +03:00
parent a6b2190f7a
commit a0759dd923
3 changed files with 35 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ from PyQt6 import QtGui, QtWidgets
from src.utils import constants
def create_system_tray(gui: QtWidgets.QApplication, configure_screen: QtWidgets.QDialog):
def create_system_tray(gui: QtWidgets.QApplication, main_window: QtWidgets.QMainWindow):
"""Create System Tray with Menu. Menu contain options to
1. Open Search Page on the Web Interface
2. Open App Configuration Screen
@@ -25,7 +25,7 @@ def create_system_tray(gui: QtWidgets.QApplication, configure_screen: QtWidgets.
menu = QtWidgets.QMenu()
menu_actions = [
('Search', lambda: webbrowser.open('http://localhost:8000/')),
('Configure', configure_screen.show),
('Configure', main_window.show),
('Quit', gui.quit),
]