calendar
git clone https://git.lucas.co/cce-calendar.git
refactor: build the app with Application::create
Application::new(qh, sender) took the session's Wayland queue handle,
which no client ever used, and calloop's sender; cce-ui is retiring it
for create(sender: AppSender<_>), which names no window system. The
body is unchanged: an app that keeps calloop's sender converts the
AppSender into it on the first line, and the now-unused QueueHandle and
EngineState imports go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index d458296..7c77684 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,9 +25,8 @@ use std::collections::BTreeMap;
use cce_calendar::{load_records, save_records, EventRecord};
use chrono::{Datelike, Days, Local, NaiveDate, Weekday};
-use wayland_client::QueueHandle;
-use cce_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::engine::{Application, LogicalPosition, LogicalSize, WindowSettings};
use cce_ui::colors::{
button_background_color, button_hover_color, button_press_color, control_label_color_u8,
highlight_primary_color, list_font_color, textbox_background_color, textbox_placeholder_text_color,
@@ -904,7 +903,7 @@ impl CalendarApp {
impl Application for CalendarApp {
type Message = Message;
- fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
+ fn create(_sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
let today = Local::now().date_naive();
Self {
events: load_events(),