Commit cd342d5b authored by Andy Stewart's avatar Andy Stewart
Browse files

Update HACKING.md with add update_settings interface docs.

parent 3ff7829b
Loading
Loading
Loading
Loading
+37 −21
Original line number Diff line number Diff line
@@ -236,6 +236,22 @@ self.emacs_var_dict["eaf-camera-save-path"]

Above is an example of ```eaf-camera-save-path```, you can customize any variable on elisp side actually, don't need modify python code to customize EAF application!

### Update settings at Python side along with customize option change at Elisp side.
Once you change customize option by ```eaf-setq```, everytime EAF buffer is created, AppBuffer's interface ```update_settings``` will execute.

You can implement your own ```update_settings``` interface, such as, we can write below ```update_settings``` in browser plugin:

```Python
def update_settings(self):
    settings = QWebEngineSettings.globalSettings()
    try:
        settings.setAttribute(QWebEngineSettings.PluginsEnabled, self.emacs_var_dict["eaf-browser-enable-plugin"] == "true")
        settings.setAttribute(QWebEngineSettings.JavascriptEnabled, self.emacs_var_dict["eaf-browser-enable-javascript"] == "true")
    except Exception:
        pass

```


## Todolist
[Some works you can hacking ;)](TODOLIST.md)