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
9550c16a
Commit
9550c16a
authored
Apr 25, 2016
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'column-ui' of
https://github.com/bram85/topydo
into column-ui
parents
274ddf0e
c8eccd69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
topydo/ui/Main.py
topydo/ui/Main.py
+23
-5
No files found.
topydo/ui/Main.py
View file @
9550c16a
...
...
@@ -149,7 +149,12 @@ class UIApplication(CLIApplicationBase):
self
.
_blur_commandline
()
self
.
_screen
=
urwid
.
raw_display
.
Screen
()
if
config
().
colors
():
self
.
_screen
.
register_palette
(
self
.
_create_color_palette
())
else
:
self
.
_screen
.
register_palette
(
self
.
_create_mono_palette
())
self
.
_screen
.
set_terminal_properties
(
256
)
self
.
mainloop
=
urwid
.
MainLoop
(
...
...
@@ -163,10 +168,6 @@ class UIApplication(CLIApplicationBase):
self
.
_set_alarm_for_next_midnight_update
()
def
_create_color_palette
(
self
):
if
not
config
().
colors
():
# return an empty palette:
return
[]
project_color
=
to_urwid_color
(
config
().
project_color
())
context_color
=
to_urwid_color
(
config
().
context_color
())
metadata_color
=
to_urwid_color
(
config
().
metadata_color
())
...
...
@@ -200,6 +201,23 @@ class UIApplication(CLIApplicationBase):
return
palette
def
_create_mono_palette
(
self
):
palette
=
[
(
PaletteItem
.
DEFAULT_FOCUS
,
'black'
,
'light gray'
),
(
PaletteItem
.
PROJECT_FOCUS
,
PaletteItem
.
DEFAULT_FOCUS
),
(
PaletteItem
.
CONTEXT_FOCUS
,
PaletteItem
.
DEFAULT_FOCUS
),
(
PaletteItem
.
METADATA_FOCUS
,
PaletteItem
.
DEFAULT_FOCUS
),
(
PaletteItem
.
LINK_FOCUS
,
PaletteItem
.
DEFAULT_FOCUS
),
(
PaletteItem
.
MARKED
,
'default,underline,bold'
,
'default'
),
]
for
C
in
ascii_uppercase
:
palette
.
append
(
(
'pri_'
+
C
+
'_focus'
,
PaletteItem
.
DEFAULT_FOCUS
)
)
return
palette
def
_set_alarm_for_next_midnight_update
(
self
):
def
callback
(
p_loop
,
p_data
):
self
.
_update_all_columns
()
...
...
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