@@ -11,8 +11,8 @@ use crate::pages::desktop::{
11
11
} ,
12
12
} ;
13
13
use crate :: pages:: input:: { self } ;
14
- use crate :: pages:: { self , display, power, sound, system, time} ;
15
- use crate :: subscription:: desktop_files;
14
+ use crate :: pages:: { self , bluetooth , display, power, sound, system, time} ;
15
+ use crate :: subscription:: { desktop_files, watch_bluetooth } ;
16
16
use crate :: widget:: { page_title, search_header} ;
17
17
use crate :: PageCommands ;
18
18
use cosmic:: app:: DbusActivationMessage ;
@@ -59,7 +59,7 @@ impl SettingsApp {
59
59
match cmd {
60
60
PageCommands :: About => self . pages . page_id :: < system:: about:: Page > ( ) ,
61
61
PageCommands :: Appearance => self . pages . page_id :: < desktop:: appearance:: Page > ( ) ,
62
- PageCommands :: Bluetooth => None ,
62
+ PageCommands :: Bluetooth => self . pages . page_id :: < bluetooth :: Page > ( ) ,
63
63
PageCommands :: DateTime => self . pages . page_id :: < time:: date:: Page > ( ) ,
64
64
PageCommands :: Desktop => self . pages . page_id :: < desktop:: Page > ( ) ,
65
65
PageCommands :: Displays => self . pages . page_id :: < display:: Page > ( ) ,
@@ -141,7 +141,8 @@ impl cosmic::Application for SettingsApp {
141
141
search_selections : Vec :: default ( ) ,
142
142
} ;
143
143
144
- let desktop_id = app. insert_page :: < desktop:: Page > ( ) . id ( ) ;
144
+ let desktop_id = app. insert_page :: < bluetooth:: Page > ( ) . id ( ) ;
145
+ app. insert_page :: < desktop:: Page > ( ) ;
145
146
app. insert_page :: < display:: Page > ( ) ;
146
147
app. insert_page :: < sound:: Page > ( ) ;
147
148
app. insert_page :: < power:: Page > ( ) ;
@@ -250,6 +251,8 @@ impl cosmic::Application for SettingsApp {
250
251
wayland_events,
251
252
// Watch for changes to installed desktop entries
252
253
desktop_files( 0 ) . map( |_| Message :: DesktopInfo ) ,
254
+ watch_bluetooth( )
255
+ . map( |bluetooth| Message :: PageMessage ( crate :: pages:: Message :: Bluetooth ( bluetooth) ) ) ,
253
256
// Watch for configuration changes to the panel.
254
257
self . core( )
255
258
. watch_config:: <CosmicPanelConfig >( "com.system76.CosmicPanel.Panel" )
@@ -316,6 +319,10 @@ impl cosmic::Application for SettingsApp {
316
319
}
317
320
}
318
321
322
+ crate :: pages:: Message :: Bluetooth ( message) => {
323
+ page:: update!( self . pages, message, bluetooth:: Page ) ;
324
+ }
325
+
319
326
crate :: pages:: Message :: DateAndTime ( message) => {
320
327
if let Some ( page) = self . pages . page_mut :: < time:: date:: Page > ( ) {
321
328
return page. update ( message) . map ( Into :: into) ;
0 commit comments