| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/blueman/main/ |
Upload File : |
from typing import Any, Optional
from gi.repository import Gio, GObject
import logging
class Config(Gio.Settings):
def __init__(self, schema_id: str, path: Optional[str] = None) -> None:
# Add backwards compat with pygobject < 3.11.2
if Gio.Settings.__init__.__name__ == "new_init":
super().__init__(schema_id=schema_id, path=path)
else:
super().__init__(schema=schema_id, path=path)
def bind_to_widget(self, key: str, widget: GObject.Object, prop: str,
flags: Gio.SettingsBindFlags = Gio.SettingsBindFlags.DEFAULT) -> None:
self.bind(key, widget, prop, flags)
def __setitem__(self, key: str, value: Any) -> None:
if not self.is_writable(key):
logging.error("GSetting not writable, settings not saved")
super().__setitem__(key, value)