summaryrefslogtreecommitdiff
path: root/alot/widgets
Commit message (Collapse)AuthorAge
* don't include quoted lines in msg content summaryPatrick Totzke2018-11-08
|
* Merge pull request #1256 from pazz/namedqueriesDylan Baker2018-07-24
|\ | | | | New buffer type for notmuch's named query strings
| * add text widget used in namedqueries buffersPatrick Totzke2018-07-24
| |
* | deal with cases where part widget can be NonePatrick Totzke2018-07-24
| | | | | | | | | | this is only possible for "tags" parts, in case the list of tags is empty or all tags are hidden.
* | determine min/max width and alignment when usedPatrick Totzke2018-07-24
| | | | | | | | | | .. from the theming structure, instead of pushing these as extra parameters through helper functions.
* | further break down threadline.build_text_partPatrick Totzke2018-07-24
| | | | | | | | | | into several small functions that prepare the content string for their respective part of a threadline.
* | widgets/search: Don't try to sort an iteratorDylan Baker2018-07-24
| | | | | | | | | | | | We currently call dict_keys.sort(), which doesn't work because it doesn't exist. The whole function is kinda strange anyway, since there's a lot of work done in general that only applies in once case.
* | refactor widgets.search.ThreadlinePatrick Totzke2018-07-24
| | | | | | | | | | | | | | | | | | This factors out the method _build_part, which is used to create local Text/Column widgets for each indivitual part of the threadline. The method is now broken in two: one for text (= subject, authors,..) parts and one for tags (= Columns of TagWidgets) and both those functions are moved out of the Threadline class.
* | remove unused static methodPatrick Totzke2018-07-24
| | | | | | | | This was superseeded by settings.get_threadline_theming a while back
* | refactor threadline widgetPatrick Totzke2018-07-24
| | | | | | | | | | this simplifies the rebuilding of alot.widgets.search.Threadline, removes duplicate and ugly code.
* | fix wide characters in search modePatrick Totzke2018-07-24
|/ | | | | | | | | | this will cause the width of a (author/tag/..) string in a threadline widget to be computed by urwids `Widget.pack` function rather than just taking the length of the string. This fixes an issue with utf-8 wide characters such as Kanji, fow which urwid needs extra space, and consequently adds additional rows when packing such Textwidgets into Columns as we do in threadlines.
* 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.
* Merge pull request #1172 from Dica-Developer/patch-4Dylan Baker2018-02-08
|\ | | | | Fix for issue 1164 - Cannot select key for encryption by number keys
| * * 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.
* | mention unredered HTML parts in message body textPatrick Totzke2018-01-16
|/
* Call _get_body() only once.Christian Geier2017-09-23
|
* 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.
* widgets/thread: Delete unused variableDylan Baker2017-08-19
| | | | | This wasn't caught by static checkers since it is used in the other brach of the if statement containing this value.
* 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
|
* optional linewise focussing in thread modePatrick Totzke2017-02-09
| | | | | | | | This introduces a new config option 'thread_focus_linewise', (defaults to True), which determines if the message texts are split into individually focussable lines in thread mode. fixes #645
* Merge pull request #1009 from dcbaker/pr/remove_cmpPatrick Totzke2017-01-30
|\ | | | | Remove remaining uses of cmp
| * 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.
* | widgets/thread: Fix improper use of iteritemsDylan Baker2017-01-30
|/ | | | Fixes #1016
* 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
| |
* | Remove unused methodLucas Hoffmann2017-01-18
|/
* fix odd continuation and indentationDylan Baker2016-12-27
| | | | This is just whitespace changes.
* 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.
* widgets/search: make method that doesn't use self a static methodDylan Baker2016-12-21
|
* Define instance attribute in constructor.Dylan Baker2016-12-21
|
* Turn methods with no `self` usage into staticmethodsLucas Hoffmann2016-12-18
|
* Turn method into static methodLucas Hoffmann2016-12-17
|
* Remove redundant None argument in dict.get()Lucas Hoffmann2016-12-17
|
* 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