qutebrowser/doc/notes
2014-08-13 00:13:32 +02:00

81 lines
2.8 KiB
Plaintext

click inspirations
===================
- Editor: https://github.com/mitsuhiko/click/blob/master/click/_termui_impl.py#L311
- Types: https://github.com/mitsuhiko/click/blob/master/click/types.py
Multiwindow
===========
cmdutils.register (and thus Command) gets argument scope which is global/window
when scope=global, instance is searched starting with the application
singleton.
when scope=window, instance is searched starting with the window the command
was executed in.
Each window has its own CommandDispatcher, which adds the window as an
attribute to every Command before calling the handler. The handler then uses
this to get the starting point for instance=.
IPC
===
We use QLocalSocket to communicate with another instance
TODO: find out why many apps just use QLocalSocket as a control channel, and
shared memory for data.
Max data size might be 8k, but this is enough for commandline args.
http://developer.nokia.com/community/wiki/Qt_IPC_using_QLocalSocket_%26_QLocalServer
https://www.mail-archive.com/pyqt@riverbankcomputing.com/msg22736.html
http://stackoverflow.com/a/8795563/2085149
http://nullege.com/codes/show/src%40n%40i%40ninja-ide2-2.1.1%40ninja_ide%40core%40ipc.py/20/PyQt4.QtNetwork.QLocalSocket/python
http://nullege.com/codes/show/src%40t%40a%40taurus-3.0.0%40lib%40taurus%40qt%40qtgui%40container%40taurusmainwindow.py/780/PyQt4.QtNetwork.QLocalSocket/python
http://nullege.com/codes/show/src%40h%40e%40Heliotrope-HEAD%40purple_server.py/95/PyQt4.QtNetwork.QLocalSocket/python
Netscape cookies
================
http://www.cookiecentral.com/faq/#3.5
https://docs.python.org/3.4/library/http.cookies.html
http://qt-project.org/doc/qt-4.8/qnetworkcookie.html
- Second column (flag): TRUE if domain starts with ., else FALSE
- if a cookie is a http-only cookie domain is prepended with a #HttpOnly_
- Python's http.cookiejar.MozillaCookieJar might help
Caching
=======
QNetworkManager.setCache() and use a QNetworkDiskCache probably
Element selection detection
===========================
Possible options:
- javascript: http://stackoverflow.com/a/2848120/2085149
- microFocusChanged and check active element via:
frame = page.currentFrame()
elem = frame.findFirstElement('*:focus')
Completion view (not QTreeView)
===============================
Perhaps using a QHBoxLayout of QTableViews and creating/destroying them based
on the completion would be a better idea?
Debug console
=============
https://github.com/karelklic/flashfit/blob/1a2393cb2fb3e44d2e34bf568386d9d4a9b22148/gui_console.py
http://code.google.com/p/pyqtlive/source/browse/pycute4.py
http://stackoverflow.com/questions/12431555/enabling-code-completion-in-an-embedded-python-interpreter
http://docs.projexsoftware.com/wp-content/docs/projexui/0.5.1/api/projexui/widgets/xconsoleedit-source.html