diff cagou/core/platform_/base.py @ 491:203755bbe0fe

massive refactoring from camelCase -> snake_case. See backend commit log for more details
author Goffi <goffi@goffi.org>
date Sat, 08 Apr 2023 13:44:32 +0200
parents 3c9ba4a694ef
children
line wrap: on
line diff
--- a/cagou/core/platform_/base.py	Sat Apr 08 13:34:55 2023 +0200
+++ b/cagou/core/platform_/base.py	Sat Apr 08 13:44:32 2023 +0200
@@ -50,10 +50,10 @@
     def on_host_init(self, host):
         pass
 
-    def on_initFrontendState(self):
+    def on_init_frontend_state(self):
         pass
 
-    def do_postInit(self):
+    def do_post_init(self):
         return True
 
     def on_pause(self):
@@ -79,9 +79,9 @@
         subprocess.Popen(sys.argv)
 
     def on_extra_menu_init(self, extra_menu):
-        extra_menu.addItem(_('new window'), self._on_new_window)
+        extra_menu.add_item(_('new window'), self._on_new_window)
 
-    def updateParamsExtra(self, extra):
+    def update_params_extra(self, extra):
         pass
 
     def check_plugin_permissions(self, plug_info, callback, errback):
@@ -116,13 +116,13 @@
         if parsed_url.scheme == "aesgcm" and wid is not None:
             # aesgcm files need to be decrypted first
             # so we download them before opening
-            quick_widget = G.host.getAncestorWidget(wid, QuickWidget)
+            quick_widget = G.host.get_ancestor_widget(wid, QuickWidget)
             if quick_widget is None:
                 msg = f"Can't find ancestor QuickWidget of {wid}"
                 log.error(msg)
                 G.host.errback(exceptions.InternalError(msg))
                 return
-            G.host.downloadURL(
+            G.host.download_url(
                 parsed_url, self.open_url, G.host.errback, profile=quick_widget.profile
             )
         else: