summaryrefslogtreecommitdiff
path: root/alot/widgets/globals.py
Commit message (Collapse)AuthorAge
* db/attachment: move to mail/Anton Khirnov2021-01-30
| | | | It has nothing whatsoever to do with the database.
* db/attachment: simplify the Attachment classAnton Khirnov2021-01-30
| | | | | Make it a plain container around raw data and a few bits of metadata, rather than around a whole MIME part.
* widgets/global: move HeadersList to the only place where it is usedAnton Khirnov2021-01-26
|
* helper: get rid of decode_string()Anton Khirnov2021-01-16
| | | | | | | | It just adds unnecessary type confusion. In most places where it is used, the types are always str, so it does nothing. In the few others, the encoding/decoding is better handled explicitly.
* AttachmentWidget: drop a useless getterAnton Khirnov2020-02-19
|
* Remove unicode literals syntax from python2Lucas Hoffmann2019-11-06
|
* pep8 fixes in alot/widgetsPatrick Totzke2019-08-11
|
* widgets/globals: inverse search keys (up/down)Dylan Baker2018-07-18
| | | | | | This has really annoyed me for a while, the search is reversed from vim. In alot currently up is older searches, whiles down is newer. In vim it's reversed.
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Merge branch 'master' into py3kDylan Baker2018-03-02
|\
| * CompleteEdit: go up when the up key is pressedDylan Baker2018-03-01
| | | | | | | | | | | | | | The code currently uses "cursor up", which seems wrong to me. This corrects searching through prompt history only moving in one direction. Fixes #1216
* | fix another unicode -> str instanceDylan Baker2018-03-01
| |
* | repalces uses of dict.iter* with non-iter versionsDylan Baker2018-03-01
|/ | | | | | | in python3 dict.{keys,items,values} return views, which are similar to iterators without some of the caveats about modifying the underlying object. The iter* and view* methods have been removed, instead one warps dict.x in iter or list to get those types.
* * apply CR commentsMartin Schaaf2017-12-12
|
* * Extend ChoiceWidget to differentiate between a list of choicesMartin Schaaf2017-11-01
| | | | and a list of return objects for choices.
* Merge branch 'master' into fix/spellingPatrick Totzke2017-09-02
|\
| * pep8 fixesPatrick Totzke2017-09-01
| | | | | | | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
* | Fix some spelling mistakesLucas Hoffmann2017-09-02
|/
* Use a tuple to build a hash valueLucas Hoffmann2017-08-20
| | | | | | | | | The old implementation would raise an error when the translated tag string was a unicode string (might be defined as an abbreviation in the users config). The official docs suggest this kind of implementation: https://docs.python.org/3/reference/datamodel.html#object.__hash__
* widgets/globals: drop functools.totalordering from TagWidgetDylan Baker2017-08-19
| | | | | | Implementing the comparison functions as a shared method rather than in terms of each other (as functools.totalordering does) makes the search interface much snappier.
* widgets/globals: Implement __hash__ for TagWidgetDylan Baker2017-08-19
| | | | | | | | Which is required in python3 when implementing the __eq__ method. The implementation caches the hash method, since it's being called each time the focus is changed in the search view. This doesn't really seem correct to me, but I'm not sure it's wrong.
* settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* Mention "public" attributes in class docstringLucas Hoffmann2017-02-26
|
* Remove getter for alot.widgets.globals.TagWidget.tagLucas Hoffmann2017-02-25
|
* widgets/globals: Optimize sorting TagWidgetsDylan Baker2017-01-27
| | | | | | | | | | | The calculation wants to sort first by length, then by string value (so 'z' would come before 'aa'). The calculation does this by deciding that if one value has a length of 1, and the other doesn't. Currently it does this by calling min, and max, and calling len 4 times. This is pretty inefficient, and more complicated that necessary. Instead, this patch uses 'is not' with booleans to figure out if one and only one of the lengths is 1.
* Replace cmp with rich comparisonsDylan Baker2017-01-27
| | | | | | This is both a performance issue (since cmp is slower than rich comparisons), and a python3 issue since cmp (and __cmp__) are gone in python 3.
* Merge pull request #984 from lucc/future/absolute-importsLucas Hoffmann2017-01-21
|\ | | | | Use absolute_imports from __future__
| * Use absolute_imports from __future__Lucas Hoffmann2017-01-18
| |
* | widgets/globals: Fix typo which would lead to AttributeErrorDylan Baker2017-01-20
|/
* Use dict's iter methodsDylan Baker2016-12-21
| | | | | | | | This patch replaces a number of uses of dict.items, dict.values, and dict.keys with their iterative siblings. The advantage of using the iterator version is that they don't copy the keys, values, or items, but simply return references. This reduces memory usage and may speed up the these operations a bit.
* Define instance attribute in constructor.Dylan Baker2016-12-21
|
* Fix except syntaxLucas Hoffmann2016-12-09
|
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* added ctrl-g to docstring and changed implementation to conform to coding stylebx2016-09-02
|
* add ctrl-g keybinding to cancel promptbx2016-09-01
|
* just formating (pep8 etc.)Patrick Totzke2014-08-02
|
* Use Ctrl-b as in Emacs, not as in VimYour Name2014-08-02
|
* Add documentation and more shortcutsYour Name2014-08-02
|
* Add some basic Emacs keybindings in CompleteEditYour Name2014-08-02
|
* docs for CompleteEditPatrick Totzke2013-07-07
|
* tune CompleteEdit:Patrick Totzke2013-07-07
| | | | | don't insert spaces in case the completions set is unary (no results found)
* handle CompletionErrorsPatrick Totzke2013-07-07
| | | | | | | | this makes the CompleteEdit widget handle errors raised during completions by passing them on to a 'on_error' callback given to its constructor. This is then used in UI.prompt.
* cleanup: pep8/pyflakes fixesPatrick Totzke2012-09-09
|
* make ChoiceWidget more flexiblePatrick Totzke2012-09-06
| | | | cf issue #514
* don't hardcode gaps attribute in HeadersList widgetPatrick Totzke2012-09-06
| | | | cf issue #513
* cleanup input handling in UIPatrick Totzke2012-08-19
| | | | | | | | | | This moves the Command creation/application to UI.input_filter. This function gets directly triggered by the mainloop. We hardcode "esc" and "enter" to widgets.globals.ChoiceWidget and CompleteEdit and thus ditch the abstraction to "cancel" and "select" keypresses. This obsolets the extra InputWrap widget in UI and the global SendKeypressCommand and generally makes UI less messy.
* doc: update api docs wrt moved partsPatrick Totzke2012-08-10
|
* cleanup: split widgets.py and pep8/pyflakes fixesPatrick Totzke2012-08-10