Implement ui.empty-message config option
Also removes some options that aren't going to be supported any time soon.
This commit is contained in:
parent
2ffbe7a6cd
commit
89ffd8653d
3 changed files with 1 additions and 18 deletions
|
@ -15,25 +15,12 @@ index-format=%4C %Z %D %-17.17n %s
|
|||
# Default: %F %l:%M %p (ISO 8501 + 12 hour time)
|
||||
timestamp-format=%F %l:%M %p
|
||||
|
||||
#
|
||||
# The frames of animation to use in the UI for things that are still loading.
|
||||
# Seperate each frame with a comma.
|
||||
#
|
||||
# Default: "[..] , [..] , [..], [..] " (note extra spaces)
|
||||
loading-frames=[..] , [..] , [..], [..]
|
||||
|
||||
#
|
||||
# Width of the sidebar, including the border.
|
||||
#
|
||||
# Default: 20
|
||||
sidebar-width=20
|
||||
|
||||
#
|
||||
# Height of the message preview, including the border.
|
||||
#
|
||||
# Default: 12
|
||||
preview-height=12
|
||||
|
||||
#
|
||||
# Message to display when viewing an empty folder.
|
||||
#
|
||||
|
|
|
@ -17,7 +17,6 @@ type UIConfig struct {
|
|||
IndexFormat string `ini:"index-format"`
|
||||
TimestampFormat string `ini:"timestamp-format"`
|
||||
ShowHeaders []string `delim:","`
|
||||
LoadingFrames []string `delim:","`
|
||||
RenderAccountTabs string `ini:"render-account-tabs"`
|
||||
SidebarWidth int `ini:"sidebar-width"`
|
||||
PreviewHeight int `ini:"preview-height"`
|
||||
|
@ -171,9 +170,6 @@ func LoadConfig(root *string) (*AercConfig, error) {
|
|||
ShowHeaders: []string{
|
||||
"From", "To", "Cc", "Bcc", "Subject", "Date",
|
||||
},
|
||||
LoadingFrames: []string{
|
||||
"[..] ", " [..] ", " [..]", " [..] ",
|
||||
},
|
||||
RenderAccountTabs: "auto",
|
||||
SidebarWidth: 20,
|
||||
PreviewHeight: 12,
|
||||
|
|
|
@ -89,7 +89,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
|
|||
}
|
||||
|
||||
if len(store.Uids) == 0 {
|
||||
msg := "(no messages)"
|
||||
msg := ml.conf.Ui.EmptyMessage
|
||||
ctx.Printf((ctx.Width()/2)-(len(msg)/2), 0,
|
||||
tcell.StyleDefault, "%s", msg)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue