summaryrefslogtreecommitdiff
path: root/alot/ui.py
Commit message (Collapse)AuthorAge
...
* | Merge pull request #966 from dcbaker/pr/fix-965Dylan Baker2017-01-20
|\ \ | | | | | | alot/ui: Handle Exceptions in UI.apply_command callbacks
| * | alot/ui: Handle Exceptions in UI.apply_command callbacksDylan Baker2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports the same handling used in UI.apply_commandline to UI.apply_command. This is necessary since though the first implies the other, they are actually separate Deferred instances, and don't share a callback/errback chain; but they can both receive a CommandCanceled exception. Fixes #965
* | | Add docstrings to some methods and functions.Lucas Hoffmann2017-01-20
| |/ |/|
* | ui: Fix typo in protected method nameDylan Baker2017-01-17
| |
* | Add a setting for enabling or disabling mouse support.Jody Foo2017-01-13
|/ | | | | | | | | | Mouse support is enabled by default. To disable mouse support, set ``` handle_mouse = False ``` in your config file.
* Eliminates bug where a modifier + mouse click would crash alot.Jody Foo2017-01-10
| | | | Fixes pazz/alot#955
* adding support for mouse scrollingSamantha Marshall2017-01-09
|
* ui: Use xrange instead of rangeDylan Baker2016-12-27
| | | | They are the same, except xrange returns an iterator instead of a list.
* Replace unused arguments with _Dylan Baker2016-12-21
| | | | | | | | | | This patch replaces a large number (but not all) unused arguments with the standard ``_`` placeholder. This has the advantage of signaling that these values are unused. There are a number of places that I've chosen not to apply this, largely in methods that have publicly define signatures that they inherit (usually from urwid).
* ui: Don't build lists in memory for assertDylan Baker2016-12-21
| | | | | | This patch changes an assertion to avoid building a list in memory by using dict.keys() and then concatenating it (building a second list in memory). This is both faster and uses less memory.
* Replace map() and filter() with comprehensionsDylan Baker2016-12-21
| | | | | | | | This had the advantage of being more readable to people without a functional programming background, and it avoids the need to use lambdas which are both slow and have many corners in python. In a few cases it also allows us to use a generator expression instead of a materialized list, which save some memory.
* Turn methods with no `self` usage into staticmethodsLucas Hoffmann2016-12-18
|
* Merge pull request #885 from lucc/historyPatrick Totzke2016-12-15
|\ | | | | Save command line history across sessions
| * Fix typo in commentLucas Hoffmann2016-12-15
| |
| * Address comments by @dcbakerLucas Hoffmann2016-12-15
| |
| * Expand history concept for sender and recipient of mailLucas Hoffmann2016-12-14
| |
| * Add history_size optionLucas Hoffmann2016-12-14
| | | | | | | | | | The option allows to limit the size of recent command line entries that are store on disk.
| * Save and load command history across invocationsLucas Hoffmann2016-12-14
| | | | | | | | | | | | Initialize the command history with lines from ${XDG_CACHE_HOME:-~/.cache}/alot at startup. Write the current history to the file again during shutdown.
* | Remove an unused variableLucas Hoffmann2016-12-14
|/
* Replace mutable keyword argumentsDylan Baker2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | There are a number of cases of mutable keyword arguments (list and dict in this case). Mutable keyword arguments are rather dangerous, since any mutation of the default value is persistent, which will inevitably lead to bugs. For example, imagine this code: def func(def=[]): def.append('foo') return def >>> func() ['foo'] >>> func() ['foo', 'foo'] This is almost certainly not what was intended. This code generally uses the idiom of setting the default value to None, and then assigning with or `value = value or []` which will replace value with the empty list (or dict) when value is falsey, like None or another empty list.
* Further minor style fixesLucas Hoffmann2016-12-09
|
* 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
* Use logging's native string interpolationLucas Hoffmann2016-12-09
|
* ui: Only update via SIGINT1 when in search bufferDimitrios Semitsoglou-Tsiapos2016-11-13
| | | | | | | | Refreshing non-search buffers (eg the thread view) can have undesired effects. This defensively only refreshes when the search buffer is visible. (fixes #871) Signed-off-by: Dimitrios Semitsoglou-Tsiapos <kmhzsem@gmx.com>
* Add signal for SIGINT callback ExitCommandGuillaume Seren2016-03-10
|
* Added function docstring to UI.handle_signalMicah Nordland2016-01-26
|
* refresh current buffer on SIGUSR1Micah Nordland2016-01-26
|
* pep8 fixesPatrick Totzke2015-12-16
|
* properly interpret initial_command as cmdsequencePatrick Totzke2014-04-02
| | | | | | | | | | This ensures the default initial command as given by the `initial_command` config option will be interpreted as command*line* as expected, and not as single command. As a result, one can now use e.g. initial_command = search A ; search B issue: #698
* cmd instanciation from within a callbackPatrick Totzke2013-10-30
| | | | | | | | | | | | | | This ensures that calls to commands.commandfactory are done just before these are applied: In command sequences, some previous cmd might have changed the mode, which in turn influences the commandfactory as some commandstrings are interpreted differently in different modes. This patch ensures that one command has completed before a next one gets instantiated. Also, this adds a global error handler for command sequence deferreds. cf issue #629
* re-raise CommandCanceled failuresPatrick Totzke2013-10-30
|
* hand Command instance to pre/post hooksPatrick Totzke2013-10-30
| | | | | | | When a pre or post command hook is called it gets the Command instance it belongs to as keyword parameter "cmd". This allows e.g. the post hook of TagCommands to access the query string used in this particular instance.
* docstrings for ui.appli_commandlinePatrick Totzke2013-10-30
|
* integrate sequencing of commands into ui.apply_commandlinePatrick Totzke2013-10-30
| | | | and obsolete commands.globals.CommandSequenceCommand
* canceling a command in a sequence will now stop the subsequent commands from ↵Yann Rouillard2013-10-30
| | | | | | | | being run Conflicts: alot/commands/globals.py alot/ui.py
* ui: remove ui update() from each keypressSiim Põder2013-07-07
| | | | update() call causes several hundred ms delay for each keypress. Removing it causes no immediately observable differences of behaviour.
* pep8&pyflakes fixesPatrick Totzke2013-07-07
| | | | mostly automatically fixed
* 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.
* fix: fix Command mechanism for move cmds in non-locked stateSebastian Jeltsch2013-05-26
|
* repeat complete command linesSebastian Jeltsch2013-05-26
| | | | furthermore, the special treatment of individual commands has been removed
* change cmd repeatability to be command prop and make move cmds non-repeatableSebastian Jeltsch2013-05-26
|
* revert to """ notation for UI attributes docsPatrick Totzke2013-05-26
|
* restore sphinx documentationSebastian Jeltsch2013-04-26
|
* change static members of UI class to membersSebastian Jeltsch2013-04-26
|
* pep8/pyflakes fixesPatrick Totzke2013-03-16
|
* fix #577Patrick Totzke2013-03-06
|
* Merge branch '0.3.4-feature-hooks-563' into 0.3.4-feature-urwidtreesPatrick Totzke2013-03-03
|\
| * allow asynchronous pre/post command hooksPatrick Totzke2013-02-20
| | | | | | | | | | | | | | also, with this a pre-command-hook can cancel the further execution of the command by raising an Exception. cf. issue #395
| * re-introduce redraw parm to UI.buffer_closePatrick Totzke2013-02-19
| | | | | | | | .. which got lost during a previous rebase