Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
84110a3c
Commit
84110a3c
authored
Jan 11, 2016
by
Jacek Sowiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't focus back cmd-line until ':' is pressed
parent
2ece2812
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
topydo/ui/ConsoleWidget.py
topydo/ui/ConsoleWidget.py
+5
-1
topydo/ui/Main.py
topydo/ui/Main.py
+4
-1
No files found.
topydo/ui/ConsoleWidget.py
View file @
84110a3c
...
...
@@ -16,6 +16,7 @@
import
urwid
class
ConsoleWidget
(
urwid
.
LineBox
):
def
__init__
(
self
,
p_text
=
""
):
urwid
.
register_signal
(
ConsoleWidget
,
[
'close'
])
...
...
@@ -29,7 +30,10 @@ class ConsoleWidget(urwid.LineBox):
if
p_key
==
'enter'
or
p_key
==
'q'
or
p_key
==
'esc'
:
urwid
.
emit_signal
(
self
,
'close'
)
# don't return the key, 'enter', 'escape' or 'q' are your only escape.
# don't return the key, 'enter', 'escape', 'q' or ':' are your only
# escape. ':' will reenter to the cmdline.
elif
p_key
==
':'
:
urwid
.
emit_signal
(
self
,
'close'
,
True
)
def
render
(
self
,
p_size
,
focus
):
"""
...
...
topydo/ui/Main.py
View file @
84110a3c
...
...
@@ -103,8 +103,10 @@ class UIApplication(CLIApplicationBase):
urwid
.
connect_signal
(
self
.
commandline
,
'execute_command'
,
self
.
_execute_handler
)
def
hide_console
():
def
hide_console
(
p_focus_commandline
=
False
):
self
.
_console_visible
=
False
if
p_focus_commandline
:
self
.
_focus_commandline
()
urwid
.
connect_signal
(
self
.
console
,
'close'
,
hide_console
)
# view widget
...
...
@@ -363,6 +365,7 @@ class UIApplication(CLIApplicationBase):
elif
p_enabled
==
False
and
self
.
_console_visible
:
self
.
console
.
clear
()
del
contents
[
2
]
self
.
mainwindow
.
focus_position
=
0
@
property
def
_viewwidget_visible
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment