diff options
Diffstat (limited to 'src/gui/calendar.rs')
-rw-r--r-- | src/gui/calendar.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/calendar.rs b/src/gui/calendar.rs index 7a040f5..38f5d55 100644 --- a/src/gui/calendar.rs +++ b/src/gui/calendar.rs @@ -36,14 +36,14 @@ pub fn create( attach_days(tx.clone(), &grid, start_date, today, events, &repetitions, categories, default_color); let event_controller_key = gtk::EventControllerKey::new(); - event_controller_key.connect_key_released(glib::clone!(@strong tx => move |_, _, keycode, _| { + event_controller_key.connect_key_released(glib::clone!(#[strong] tx, move |_, _, keycode, _| { match keycode { 111 => update::send(tx.clone(), Msg::SelectPreviousWeek), // UP 116 => update::send(tx.clone(), Msg::SelectNextWeek), // DOWN _ => () } })); - grid.add_controller(&event_controller_key); + grid.add_controller(event_controller_key); grid } @@ -141,12 +141,12 @@ pub fn day_entry( vbox.add_css_class("g-Calendar__Day"); let gesture = gtk::GestureClick::new(); - gesture.connect_pressed(glib::clone!(@strong tx => move |_, n, _, _| { + gesture.connect_pressed(glib::clone!(#[strong] tx, move |_, n, _, _| { if n == 2 { update::send(tx.clone(), Msg::ShowAddForm { date }); } })); - vbox.add_controller(&gesture); + vbox.add_controller(gesture); if date == today { vbox.add_css_class("g-Calendar__Day--Today"); @@ -236,8 +236,7 @@ fn day_events( }} ", background_color - ) - .as_bytes(), + ).as_str() ); hbox.style_context() .add_provider(&provider, gtk::STYLE_PROVIDER_PRIORITY_APPLICATION); @@ -245,7 +244,7 @@ fn day_events( let gesture = gtk::GestureClick::new(); gesture.connect_pressed( - glib::clone!(@strong event, @strong tx => move |gesture, n, _, _| { + glib::clone!(#[strong] event, #[strong] tx, move |gesture, n, _, _| { gesture.set_state(gtk::EventSequenceState::Claimed); if n == 2 { if event.repetition.is_some() { @@ -256,7 +255,7 @@ fn day_events( } }), ); - hbox.add_controller(&gesture); + hbox.add_controller(gesture); let event_txt = &event.pprint(); let label = gtk::Label::builder() |