From f403b8632f292f6c975082518e2e8699e2310e34 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Tue, 8 Aug 2023 17:25:53 -0400 Subject: [PATCH] Clean up dead code --- dashboard/src/main.rs | 59 ------------------------------------------- 1 file changed, 59 deletions(-) diff --git a/dashboard/src/main.rs b/dashboard/src/main.rs index 2afaeea..ef4316b 100644 --- a/dashboard/src/main.rs +++ b/dashboard/src/main.rs @@ -271,70 +271,11 @@ impl TransitClock { *s.imp().info.borrow_mut() = Some(sun_moon_info); - /* - s.set_draw_func({ - let s = s.clone(); - move |_, context, width, height| { - let info = s.imp().info.borrow(); - - context.set_source_rgba(0., 0., 0., 0.); - let _ = context.paint(); - - context.set_line_width(2.); - context.set_source_rgb(0.7, 0., 0.9); - context.arc(width as f64 / 2., height as f64 / 2., 200., 0., PI * 2.); - let _ = context.stroke(); - - if let Some(info) = info.deref() { - context.move_to(width as f64 / 2., height as f64 / 2.); - let full_day = Duration::days(1).num_seconds() as f64; - let sunrise = info.sunrise - NaiveTime::from_hms_opt(0, 0, 0).unwrap(); - let sunset = info.sunset - NaiveTime::from_hms_opt(0, 0, 0).unwrap(); - - let start = (PI * 2.) * sunset.num_seconds() as f64 / full_day - (PI / 2.); - let end = (PI * 2.) * sunrise.num_seconds() as f64 / full_day - (PI / 2.); - - context.set_source_rgb(0., 0.7, 0.9); - context.arc(width as f64 / 2., height as f64 / 2., 200., start, end); - let _ = context.fill(); - } - - (0..24).for_each(|hour| { - context.translate(width as f64 / 2., height as f64 / 2.); - context.rotate(PI / 12. * hour as f64); - context.move_to(185., 0.); - context.line_to(195., 0.); - context.identity_matrix(); - let _ = context.stroke(); - }); - } - }); - */ - s } } -/* -pub struct AppPrivate { -} - -impl AppPrivate { - const NAME: &'static str = "App"; - type Type = App; - type ParentType = adw::Application; -} -*/ - pub fn main() { - /* - let runtime = Arc::new( - tokio::runtime::Builder::new_multi_thread() - .enable_all() - .build() - .unwrap(), - ); - */ let app = gtk::Application::builder() .application_id("com.luminescent-dreams.dashboard") .resource_base_path("/com/luminescent-dreams/dashboard")