|
|
@ -247,14 +247,14 @@ class Browser(Application): |
|
|
|
self.show() |
|
|
|
self.show() |
|
|
|
|
|
|
|
|
|
|
|
def load(self): |
|
|
|
def load(self): |
|
|
|
|
|
|
|
self.load_script(':/_greeter/js/bundle.js', 'Web Greeter Bundle') |
|
|
|
|
|
|
|
self.load_theme() |
|
|
|
self.greeter = Greeter() |
|
|
|
self.greeter = Greeter() |
|
|
|
self.greeter_config = Config() |
|
|
|
self.greeter_config = Config() |
|
|
|
self.theme_utils = ThemeUtils(self.greeter) |
|
|
|
self.theme_utils = ThemeUtils(self.greeter) |
|
|
|
|
|
|
|
|
|
|
|
self.bridge_objects = (self.greeter, self.greeter_config, self.theme_utils) |
|
|
|
self.bridge_objects = (self.greeter, self.greeter_config, self.theme_utils) |
|
|
|
self.initialize_bridge_objects() |
|
|
|
self.initialize_bridge_objects() |
|
|
|
self.load_script(':/_greeter/js/bundle.js', 'Web Greeter Bundle') |
|
|
|
|
|
|
|
self.load_theme() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _initialize_devtools(self): |
|
|
|
def _initialize_devtools(self): |
|
|
|
self.dev_view = QWebEngineView(parent=self.window) |
|
|
|
self.dev_view = QWebEngineView(parent=self.window) |
|
|
@ -327,6 +327,8 @@ class Browser(Application): |
|
|
|
print("Path does not exists") |
|
|
|
print("Path does not exists") |
|
|
|
path_to_theme = os.path.join(dir, def_theme, "index.html") |
|
|
|
path_to_theme = os.path.join(dir, def_theme, "index.html") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
web_greeter_config["config"]["greeter"]["theme"] = path_to_theme |
|
|
|
|
|
|
|
|
|
|
|
url = QUrl("web-greeter://app/{0}".format(path_to_theme)) |
|
|
|
url = QUrl("web-greeter://app/{0}".format(path_to_theme)) |
|
|
|
self.page.load(url) |
|
|
|
self.page.load(url) |
|
|
|
|
|
|
|
|
|
|
|