Move notes to own file

This commit is contained in:
Florian Bruhin 2014-06-04 22:34:18 +02:00
parent d5891b2e86
commit a6ae2961ec
3 changed files with 86 additions and 30 deletions

12
BUGS
View File

@ -31,17 +31,7 @@ Bugs
See also: http://qt-project.org/doc/qt-4.8/qwebpage.html#createWindow
Asked here: http://stackoverflow.com/q/23498666/2085149
- Shutdown is still flaky.
Some pointers:
https://code.google.com/p/webscraping/source/browse/webkit.py
Simply does setPage(None) in __del__ of webview.
http://www.tenox.net/out/wrp11-qt.py
does del self._window; del self._view; del self._page
http://pydoc.net/Python/grab/0.4.5/ghost.ghost/
does webview.close(); del self.manager; del self.page; del self.mainframe
- Shutdown is still flaky. (see notes)
- Eliding doesn't work correctly in tabs (cuts off start)
This especially happens when there's no favicon

25
TODO
View File

@ -32,8 +32,8 @@ New big features
https://chrome.google.com/webstore/detail/remove-google-redirects/ccenmflbeofaceccfhhggbagkblihpoh
- Downloads
- session handling / saving
- multi window
- IPC, like dwb -x
- multi window (see notes)
- IPC, like dwb -x (see notes)
- Bookmarks
- Internationalization
- more completions (URLs, ...)
@ -45,13 +45,7 @@ Improvements / minor features
- Print some meaningful message (via qInstallMsgHandler) when platform plugins
are missing, especially with xcb (on Arch: libxkbcommon-x11)
- Reimplement tabbar to paint it by ourselves to look like dwb
- Save cookies in Netscape format so it can be used by wget.
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
- Save cookies in Netscape format so it can be used by wget. (see notes)
- Zoom with ctrl + mousewheel
- search highlighting
- vertical tabbar
@ -60,17 +54,12 @@ Improvements / minor features
- Display metavars for commands in input bar.
- count support for special keys
- set-as-default argument/command
- Enable disk caching
QNetworkManager.setCache() and use a QNetworkDiskCache probably
- Enable disk caching (see notes)
- clear cookies command
- keybind/aliases should have completion for commands/arguments
- Hiding scrollbars
- Ctrl+A/X to increase/decrease last number in URL
- Add more element-selection-detection code (with options?) based on:
-> javascript: http://stackoverflow.com/a/2848120/2085149
-> microFocusChanged and check active element via:
frame = page.currentFrame()
elem = frame.findFirstElement('*:focus')
- Add more element-selection-detection code (with options?) (see notes)
- somehow unfocus elements (hide blinking cursor) when insert mode is left?
- tabs: some more padding?
- Copy link location on crash mail should not copy mailto:
@ -79,9 +68,7 @@ Improvements / minor features
- Multi-line statusbar or own widget for long messages?
- :messages command to view past messages
- Maybe the completion widget shouldn't be a QTreeView with tree models as
there are many hacks involved by now.
Perhaps using a QHBoxLayout of QTableViews and creating/destroying them based
on the completion would be a better idea?
there are many hacks involved by now (see notes).
hints
-----

79
notes Normal file
View File

@ -0,0 +1,79 @@
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?
Shutdown
========
Some pointers:
https://code.google.com/p/webscraping/source/browse/webkit.py
Simply does setPage(None) in __del__ of webview.
http://www.tenox.net/out/wrp11-qt.py
does del self._window; del self._view; del self._page
http://pydoc.net/Python/grab/0.4.5/ghost.ghost/
does webview.close(); del self.manager; del self.page; del self.mainframe