Run cargo update`, adjust for changes in gtk-rs/relm4, and format
This commit is contained in:
parent
0aaa0dd74d
commit
eabe58f62c
10 changed files with 81 additions and 105 deletions
|
|
@ -30,17 +30,8 @@ impl ObjectSubclass for DockItem {
|
|||
|
||||
impl ObjectImpl for DockItem {
|
||||
fn signals() -> &'static [Signal] {
|
||||
static SIGNALS: Lazy<Vec<Signal>> = Lazy::new(|| {
|
||||
vec![Signal::builder(
|
||||
// Signal name
|
||||
"popover-closed",
|
||||
// Types of the values which will be sent to the signal handler
|
||||
&[],
|
||||
// Type of the value the signal handler sends back
|
||||
<()>::static_type().into(),
|
||||
)
|
||||
.build()]
|
||||
});
|
||||
static SIGNALS: Lazy<Vec<Signal>> =
|
||||
Lazy::new(|| vec![Signal::builder("popover-closed").build()]);
|
||||
SIGNALS.as_ref()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
use crate::{
|
||||
dock_item::DockItem,
|
||||
utils::{AppListEvent, BoxedWindowList, data_path},
|
||||
dock_object::DockObject,
|
||||
utils::{data_path, AppListEvent, BoxedWindowList},
|
||||
wayland::{Toplevel, ToplevelEvent},
|
||||
{TX, WAYLAND_TX}, dock_object::DockObject,
|
||||
{TX, WAYLAND_TX},
|
||||
};
|
||||
use cascade::cascade;
|
||||
use cosmic_panel_config::{CosmicPanelConfig, PanelAnchor};
|
||||
|
|
|
|||
|
|
@ -34,17 +34,8 @@ impl ObjectSubclass for DockPopover {
|
|||
|
||||
impl ObjectImpl for DockPopover {
|
||||
fn signals() -> &'static [Signal] {
|
||||
static SIGNALS: Lazy<Vec<Signal>> = Lazy::new(|| {
|
||||
vec![Signal::builder(
|
||||
// Signal name
|
||||
"menu-hide",
|
||||
// Types of the values which will be sent to the signal handler
|
||||
&[],
|
||||
// Type of the value the signal handler sends back
|
||||
<()>::static_type().into(),
|
||||
)
|
||||
.build()]
|
||||
});
|
||||
static SIGNALS: Lazy<Vec<Signal>> =
|
||||
Lazy::new(|| vec![Signal::builder("menu-hide").build()]);
|
||||
SIGNALS.as_ref()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ fn main() {
|
|||
} else {
|
||||
cached_results.push(top_level);
|
||||
}
|
||||
true
|
||||
true
|
||||
}
|
||||
};
|
||||
if should_apply_changes {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ use cosmic_protocols::{
|
|||
zcosmic_workspace_manager_v1::{self, ZcosmicWorkspaceManagerV1},
|
||||
},
|
||||
};
|
||||
use wayland_client::protocol::wl_seat::{WlSeat, self};
|
||||
use std::{env, os::unix::net::UnixStream, path::PathBuf, time::Duration};
|
||||
use wayland_client::protocol::wl_seat::{self, WlSeat};
|
||||
use wayland_client::{
|
||||
event_created_child,
|
||||
protocol::{
|
||||
|
|
@ -89,8 +89,9 @@ pub fn spawn_toplevels() -> SyncSender<ToplevelEvent> {
|
|||
Event::Msg(ToplevelEvent::Activate(toplevel)) => {
|
||||
if let Some(manager) = &state.toplevel_manager {
|
||||
for seat in &state.seats {
|
||||
manager.activate(&toplevel,seat)
|
||||
} }
|
||||
manager.activate(&toplevel, seat)
|
||||
}
|
||||
}
|
||||
}
|
||||
Event::Msg(ToplevelEvent::Close(t)) => {
|
||||
if let Some(manager) = &state.toplevel_manager {
|
||||
|
|
@ -582,7 +583,6 @@ impl Dispatch<WlOutput, ()> for State {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
impl Dispatch<WlSeat, ()> for State {
|
||||
fn event(
|
||||
state: &mut Self,
|
||||
|
|
|
|||
|
|
@ -59,5 +59,3 @@ impl<T, F: ?Sized> Drop for PAFut<T, F> {
|
|||
self.operation.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ use libpulse_binding::{
|
|||
volume::ChannelVolumes,
|
||||
};
|
||||
use libpulse_glib_binding::Mainloop;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
rc::Rc,
|
||||
};
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
mod future;
|
||||
use future::{PAFut, PAFutWaker};
|
||||
|
|
|
|||
|
|
@ -358,6 +358,6 @@ impl SimpleComponent for AppModel {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let app: RelmApp<AppModel> = RelmApp::new("com.system76.CosmicAppletBattery");
|
||||
app.run(());
|
||||
let app = RelmApp::new("com.system76.CosmicAppletBattery");
|
||||
app.run::<AppModel>(());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,18 +169,12 @@ impl ObjectImpl for NotificationsInner {
|
|||
fn signals() -> &'static [Signal] {
|
||||
static SIGNALS: Lazy<Vec<Signal>> = Lazy::new(|| {
|
||||
vec![
|
||||
Signal::builder(
|
||||
"notification-received",
|
||||
&[NotificationId::static_type().into()],
|
||||
glib::Type::UNIT.into(),
|
||||
)
|
||||
.build(),
|
||||
Signal::builder(
|
||||
"notification-closed",
|
||||
&[NotificationId::static_type().into()],
|
||||
glib::Type::UNIT.into(),
|
||||
)
|
||||
.build(),
|
||||
Signal::builder("notification-received")
|
||||
.param_types(&[NotificationId::static_type().into()])
|
||||
.build(),
|
||||
Signal::builder("notification-closed")
|
||||
.param_types(&[NotificationId::static_type().into()])
|
||||
.build(),
|
||||
]
|
||||
});
|
||||
SIGNALS.as_ref()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue