chore: udpate libcosmic
This commit is contained in:
parent
61d1d1b91d
commit
c54ddeb38a
17 changed files with 139 additions and 426 deletions
|
|
@ -4,6 +4,7 @@
|
|||
mod localize;
|
||||
mod subscriptions;
|
||||
use cosmic::{
|
||||
app,
|
||||
applet::{
|
||||
menu_control_padding, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
|
|
@ -17,8 +18,7 @@ use cosmic::{
|
|||
window, Alignment, Length, Limits, Subscription,
|
||||
},
|
||||
iced_widget::{scrollable, Column},
|
||||
surface_message::{MessageWrapper, SurfaceMessage},
|
||||
theme,
|
||||
surface, theme,
|
||||
widget::{button, container, divider, icon, text},
|
||||
Element, Task,
|
||||
};
|
||||
|
|
@ -95,22 +95,7 @@ enum Message {
|
|||
CardsToggled(String, bool),
|
||||
Token(TokenUpdate),
|
||||
OpenSettings,
|
||||
Surface(SurfaceMessage),
|
||||
}
|
||||
|
||||
impl From<Message> for MessageWrapper<Message> {
|
||||
fn from(value: Message) -> Self {
|
||||
match value {
|
||||
Message::Surface(s) => MessageWrapper::Surface(s),
|
||||
m => MessageWrapper::Message(m),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SurfaceMessage> for Message {
|
||||
fn from(value: SurfaceMessage) -> Self {
|
||||
Message::Surface(value)
|
||||
}
|
||||
Surface(surface::Action),
|
||||
}
|
||||
|
||||
impl cosmic::Application for Notifications {
|
||||
|
|
@ -119,13 +104,7 @@ impl cosmic::Application for Notifications {
|
|||
type Flags = ();
|
||||
const APP_ID: &'static str = "com.system76.CosmicAppletNotifications";
|
||||
|
||||
fn init(
|
||||
core: cosmic::app::Core,
|
||||
_flags: Self::Flags,
|
||||
) -> (
|
||||
Self,
|
||||
cosmic::iced::Task<cosmic::app::Message<Self::Message>>,
|
||||
) {
|
||||
fn init(core: cosmic::app::Core, _flags: Self::Flags) -> (Self, app::Task<Self::Message>) {
|
||||
let helper = Config::new(
|
||||
cosmic_notifications_config::ID,
|
||||
NotificationsConfig::VERSION,
|
||||
|
|
@ -193,10 +172,7 @@ impl cosmic::Application for Notifications {
|
|||
])
|
||||
}
|
||||
|
||||
fn update(
|
||||
&mut self,
|
||||
message: Self::Message,
|
||||
) -> cosmic::iced::Task<cosmic::app::Message<Self::Message>> {
|
||||
fn update(&mut self, message: Self::Message) -> app::Task<Self::Message> {
|
||||
match message {
|
||||
Message::Frame(now) => {
|
||||
self.timeline.now(now);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue