mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
build: Update pnpm to v9 (#1309)
* build: Update pnpm to v9 * update actions * remove last actions-rs usage * clippy * clippy again * revert default feature
This commit is contained in:
@@ -48,7 +48,7 @@ pub enum Hint {
|
||||
/// * <https://developer.gnome.org/notification-spec/#categories>
|
||||
Category(String),
|
||||
|
||||
/// Name of the DesktopEntry representing the calling application. In case of "firefox.desktop"
|
||||
/// Name of the `DesktopEntry` representing the calling application. In case of "firefox.desktop"
|
||||
/// use "firefox". May be used to retrieve the correct icon.
|
||||
DesktopEntry(String),
|
||||
|
||||
@@ -91,7 +91,7 @@ pub enum Hint {
|
||||
/// A custom numerical (integer) hint
|
||||
CustomInt(String, i32),
|
||||
|
||||
/// Only used by this NotificationServer implementation
|
||||
/// Only used by this `NotificationServer` implementation
|
||||
Invalid // TODO find a better solution to this
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ fn test_hints_to_map() {
|
||||
|
||||
// custom value should only be there once if the names are identical
|
||||
|
||||
let n1 = super::Notification::new()
|
||||
let n1 = Notification::new()
|
||||
.hint(Hint::Custom("foo".into(), "bar1".into()))
|
||||
.hint(Hint::Custom("foo".into(), "bar2".into()))
|
||||
.hint(Hint::Custom("f00".into(), "bar3".into()))
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
pub const ACTION_ICONS: &str = "action-icons";
|
||||
pub const CATEGORY: &str = "category";
|
||||
pub const DESKTOP_ENTRY: &str = "desktop-entry";
|
||||
pub const IMAGE_PATH: &str = "image-path";
|
||||
pub const RESIDENT: &str = "resident";
|
||||
pub const SOUND_FILE: &str = "sound-file";
|
||||
pub const SOUND_NAME: &str = "sound-name";
|
||||
pub const SUPPRESS_SOUND: &str = "suppress-sound";
|
||||
pub const TRANSIENT: &str = "transient";
|
||||
pub const X: &str = "x";
|
||||
pub const Y: &str = "y";
|
||||
pub const URGENCY: &str = "urgency";
|
||||
pub const ACTION_ICONS: &str = "action-icons";
|
||||
pub const CATEGORY: &str = "category";
|
||||
pub const DESKTOP_ENTRY: &str = "desktop-entry";
|
||||
pub const IMAGE_PATH: &str = "image-path";
|
||||
pub const RESIDENT: &str = "resident";
|
||||
pub const SOUND_FILE: &str = "sound-file";
|
||||
pub const SOUND_NAME: &str = "sound-name";
|
||||
pub const SUPPRESS_SOUND: &str = "suppress-sound";
|
||||
pub const TRANSIENT: &str = "transient";
|
||||
pub const X: &str = "x";
|
||||
pub const Y: &str = "y";
|
||||
pub const URGENCY: &str = "urgency";
|
||||
|
||||
|
||||
pub const INVALID: &str = "invalid";
|
||||
pub const INVALID: &str = "invalid";
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
#![cfg(all(test, unix, not(target_os = "macos")))]
|
||||
|
||||
use dbus::arg::messageitem::MessageItem as Item;
|
||||
use ctor::ctor;
|
||||
use dbus::arg::messageitem::MessageItem as Item;
|
||||
|
||||
use super::*;
|
||||
use self::Hint as Hint;
|
||||
use self::Hint;
|
||||
use super::Urgency::*;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[ctor]
|
||||
fn init_color_backtrace() {
|
||||
@@ -61,12 +60,14 @@ fn imagedata_hint_to_item() {
|
||||
Item::Bool(false),
|
||||
Item::Int32(8),
|
||||
Item::Int32(3),
|
||||
Item::Array(dbus::MessageItemArray::new(vec![
|
||||
Item::Byte(0),
|
||||
Item::Byte(0),
|
||||
Item::Byte(0),
|
||||
],"ay".into()).unwrap())
|
||||
]))))
|
||||
Item::Array(
|
||||
dbus::MessageItemArray::new(
|
||||
vec![Item::Byte(0), Item::Byte(0), Item::Byte(0)],
|
||||
"ay".into(),
|
||||
)
|
||||
.unwrap(),
|
||||
),
|
||||
])))),
|
||||
);
|
||||
assert_eq!(item, test_item);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ impl Notification {
|
||||
/// # Platform Support
|
||||
/// Please note that this method has no effect on macOS. Here you can only set the application via [`set_application()`](fn.set_application.html)
|
||||
pub fn appname(&mut self, appname: &str) -> &mut Notification {
|
||||
self.appname = appname.to_owned();
|
||||
appname.clone_into(&mut self.appname);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ impl Notification {
|
||||
///
|
||||
/// Often acts as title of the notification. For more elaborate content use the `body` field.
|
||||
pub fn summary(&mut self, summary: &str) -> &mut Notification {
|
||||
self.summary = summary.to_owned();
|
||||
summary.clone_into(&mut self.summary);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ impl Notification {
|
||||
/// Each line should be treated as a paragraph.
|
||||
/// Simple html markup should be supported, depending on the server implementation.
|
||||
pub fn body(&mut self, body: &str) -> &mut Notification {
|
||||
self.body = body.to_owned();
|
||||
body.clone_into(&mut self.body);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ impl Notification {
|
||||
/// # Platform support
|
||||
/// macOS does not have support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html)
|
||||
pub fn icon(&mut self, icon: &str) -> &mut Notification {
|
||||
self.icon = icon.to_owned();
|
||||
icon.clone_into(&mut self.icon);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -390,8 +390,8 @@ impl Notification {
|
||||
#[cfg(feature = "async")]
|
||||
// #[cfg(test)]
|
||||
pub async fn show_async_at_bus(&self, sub_bus: &str) -> Result<xdg::NotificationHandle> {
|
||||
let bus = super::xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
|
||||
super::xdg::show_notification_async_at_bus(self, bus).await
|
||||
let bus = xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?;
|
||||
xdg::show_notification_async_at_bus(self, bus).await
|
||||
}
|
||||
|
||||
/// Sends Notification to `NSUserNotificationCenter`.
|
||||
|
||||
Reference in New Issue
Block a user