@@ -49,7 +49,7 @@ use iced::Subscription;
49
49
use iced:: { window, Application as IcedApplication } ;
50
50
pub use message:: Message ;
51
51
use url:: Url ;
52
- #[ cfg( feature = "zbus " ) ]
52
+ #[ cfg( feature = "single-instance " ) ]
53
53
use {
54
54
iced_futures:: futures:: channel:: mpsc:: { Receiver , Sender } ,
55
55
iced_futures:: futures:: SinkExt ,
@@ -122,7 +122,7 @@ pub fn run<App: Application>(settings: Settings, flags: App::Flags) -> iced::Res
122
122
123
123
cosmic:: Cosmic :: < App > :: run ( iced)
124
124
}
125
- #[ cfg( feature = "zbus " ) ]
125
+ #[ cfg( feature = "single-instance " ) ]
126
126
#[ derive( Debug , Clone ) ]
127
127
pub struct DbusActivationMessage < Action = String , Args = Vec < String > > {
128
128
pub activation_token : Option < String > ,
@@ -142,10 +142,10 @@ pub enum DbusActivationDetails<Action = String, Args = Vec<String>> {
142
142
args : Args ,
143
143
} ,
144
144
}
145
- #[ cfg( feature = "zbus " ) ]
145
+ #[ cfg( feature = "single-instance " ) ]
146
146
#[ derive( Debug , Default ) ]
147
147
pub struct DbusActivation ( Option < Sender < DbusActivationMessage > > ) ;
148
- #[ cfg( feature = "zbus " ) ]
148
+ #[ cfg( feature = "single-instance " ) ]
149
149
impl DbusActivation {
150
150
#[ must_use]
151
151
pub fn new ( ) -> Self {
@@ -159,7 +159,7 @@ impl DbusActivation {
159
159
}
160
160
}
161
161
162
- #[ cfg( feature = "zbus " ) ]
162
+ #[ cfg( feature = "single-instance " ) ]
163
163
#[ dbus_proxy( interface = "org.freedesktop.DbusActivation" ) ]
164
164
pub trait DbusActivationInterface {
165
165
/// Activate the application.
@@ -181,7 +181,7 @@ pub trait DbusActivationInterface {
181
181
) -> zbus:: Result < ( ) > ;
182
182
}
183
183
184
- #[ cfg( feature = "zbus " ) ]
184
+ #[ cfg( feature = "single-instance " ) ]
185
185
#[ dbus_interface( interface = "org.freedesktop.DbusActivation" ) ]
186
186
impl DbusActivation {
187
187
async fn activate ( & mut self , platform_data : HashMap < & str , Value < ' _ > > ) {
@@ -258,7 +258,7 @@ impl DbusActivation {
258
258
}
259
259
}
260
260
261
- #[ cfg( feature = "zbus " ) ]
261
+ #[ cfg( feature = "single-instance " ) ]
262
262
263
263
/// Launch a COSMIC application with the given [`Settings`].
264
264
/// If the application is already running, the arguments will be passed to the
@@ -349,15 +349,15 @@ where
349
349
/// Default async executor to use with the app.
350
350
type Executor : iced_futures:: Executor ;
351
351
352
- #[ cfg( feature = "zbus " ) ]
352
+ #[ cfg( feature = "single-instance " ) ]
353
353
/// Argument received [`Application::new`].
354
354
type Flags : Clone + CosmicFlags ;
355
355
356
- #[ cfg( not( feature = "zbus " ) ) ]
356
+ #[ cfg( not( feature = "single-instance " ) ) ]
357
357
/// Argument received [`Application::new`].
358
358
type Flags : Clone ;
359
359
360
- #[ cfg( feature = "zbus " ) ]
360
+ #[ cfg( feature = "single-instance " ) ]
361
361
/// Message type specific to our app.
362
362
type Message : Clone
363
363
+ From <
@@ -369,7 +369,7 @@ where
369
369
+ Send
370
370
+ ' static ;
371
371
372
- #[ cfg( not( feature = "zbus " ) ) ]
372
+ #[ cfg( not( feature = "single-instance " ) ) ]
373
373
/// Message type specific to our app.
374
374
type Message : Clone + std:: fmt:: Debug + Send + ' static ;
375
375
@@ -626,7 +626,7 @@ impl<App: Application> ApplicationExt for App {
626
626
}
627
627
}
628
628
629
- #[ cfg( feature = "zbus " ) ]
629
+ #[ cfg( feature = "single-instance " ) ]
630
630
fn single_instance_subscription < App : ApplicationExt > ( ) -> Subscription < Message < App :: Message > > {
631
631
use iced_futures:: futures:: StreamExt ;
632
632
0 commit comments