Browse Source

Bugfixes

sisyphus
JezerM 4 years ago
parent
commit
bdeb0017b7
No known key found for this signature in database
GPG Key ID: 66BBC5D01388C6B5
  1. 10
      web-greeter/bridge/__init__.py
  2. 2
      web-greeter/utils/keyboard.py
  3. 3
      web-greeter/whither.yml

10
web-greeter/bridge/__init__.py

@ -91,10 +91,14 @@ class Battery:
return self._state return self._state
def language_to_dict(lang): def language_to_dict(lang):
if (not lang):
return dict()
return dict(code=lang.get_code(), name=lang.get_name(), territory=lang.get_territory()) return dict(code=lang.get_code(), name=lang.get_name(), territory=lang.get_territory())
def layout_to_dict(layout): def layout_to_dict(layout):
if (not layout):
return dict()
return dict( return dict(
description=layout.get_description(), description=layout.get_description(),
name=layout.get_name(), name=layout.get_name(),
@ -103,6 +107,8 @@ def layout_to_dict(layout):
def session_to_dict(session): def session_to_dict(session):
if (not session):
return dict()
return dict( return dict(
comment=session.get_comment(), comment=session.get_comment(),
key=session.get_key(), key=session.get_key(),
@ -112,6 +118,8 @@ def session_to_dict(session):
def user_to_dict(user): def user_to_dict(user):
if (not user):
return dict()
return dict( return dict(
display_name=user.get_display_name(), display_name=user.get_display_name(),
home_directory=user.get_home_directory(), home_directory=user.get_home_directory(),
@ -124,6 +132,8 @@ def user_to_dict(user):
) )
def battery_to_dict(battery): def battery_to_dict(battery):
if (not battery):
return dict()
return dict( return dict(
name = battery.get_name(), name = battery.get_name(),
level = battery.get_level(), level = battery.get_level(),

2
web-greeter/utils/keyboard.py

@ -30,6 +30,8 @@ from whither.toolkits.bootstrap import WebPage, MainWindow
from PyQt5.QtCore import QUrl, pyqtSignal, Qt from PyQt5.QtCore import QUrl, pyqtSignal, Qt
from PyQt5.QtGui import QKeyEvent from PyQt5.QtGui import QKeyEvent
import globals
def keyPressEvent(self, keyEvent: QKeyEvent): def keyPressEvent(self, keyEvent: QKeyEvent):
super(MainWindow, self).keyPressEvent(keyEvent) super(MainWindow, self).keyPressEvent(keyEvent)
if (keyEvent.key() == Qt.Key.Key_MonBrightnessUp): if (keyEvent.key() == Qt.Key.Key_MonBrightnessUp):

3
web-greeter/whither.yml

@ -38,8 +38,7 @@ WebGreeter:
secure_mode: True secure_mode: True
theme: default theme: default
icon_theme: Adwaita icon_theme: Adwaita
time_format: LT time_language: ""
time_language: auto
features: features:
battery: False battery: False
backlight: backlight:

Loading…
Cancel
Save