File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ mod imp {
6868 export_apps_group. add ( & self . list_box ) ;
6969 self . stack . add_named ( & export_apps_group, Some ( "apps" ) ) ;
7070
71+ let empty_page = adw:: StatusPage :: new ( ) ;
72+ empty_page. set_title ( "No Exportable Apps" ) ;
73+
74+ self . stack . add_named ( & empty_page, Some ( "empty" ) ) ;
75+
7176 self . content . append ( & self . scrolled_window ) ;
7277 self . toolbar_view . set_content ( Some ( & self . content ) ) ;
7378 self . obj ( ) . set_child ( Some ( & self . toolbar_view ) ) ;
@@ -130,6 +135,12 @@ impl ExportableAppsDialog {
130135 let this_clone = this. clone ( ) ;
131136 container. apps ( ) . connect_data_changed ( move |resource| {
132137 let apps = resource. data :: < gio:: ListStore > ( ) . unwrap ( ) ;
138+
139+ if apps. n_items ( ) == 0 {
140+ this_clone. imp ( ) . stack . set_visible_child_name ( "empty" ) ;
141+ return ;
142+ }
143+
133144 this_clone. imp ( ) . stack . set_visible_child_name ( "apps" ) ;
134145
135146 let this = this_clone. clone ( ) ;
You can’t perform that action at this time.
0 commit comments