aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-03-18 06:04:41 +0000
committerAkshay <[email protected]>2020-03-18 06:04:41 +0000
commit33d053d442082547550fc9a54473e05565907f88 (patch)
treed21697ada3135dd322a80e96cb68dcfe091389f4 /src/main.rs
parent0ed2a357ec1446dd03eba963d0e144ef3ebba25a (diff)
require new super trait, add quit callback
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index bec4536..cb3393b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -77,13 +77,10 @@ fn main() {
77 walking.insert_entry(NaiveDate::from_ymd(2020, 3, 14), false.into()); 77 walking.insert_entry(NaiveDate::from_ymd(2020, 3, 14), false.into());
78 walking.insert_entry(NaiveDate::from_ymd(2020, 3, 15), true.into()); 78 walking.insert_entry(NaiveDate::from_ymd(2020, 3, 15), true.into());
79 79
80 s.add_global_callback('q', |a| a.quit()); 80 let mut app = App::new();
81 let app = App::new() 81 app.add_habit(Box::new(gymming));
82 .add_habit(Box::new(gymming)) 82 app.add_habit(Box::new(reading));
83 .add_habit(Box::new(reading)) 83 app.add_habit(Box::new(walking));
84 .add_habit(Box::new(walking))
85 .set_mode(ViewMode::Month);
86
87 s.add_layer(app); 84 s.add_layer(app);
88 85
89 s.set_theme(theme::theme_gen()); 86 s.set_theme(theme::theme_gen());