File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,13 @@ public class MainWindow : Gtk.Dialog {
8585 spinner. halign = Gtk . Align . CENTER ;
8686 spinner. vexpand = true ;
8787
88+ var alert_label = new Gtk .Label (" Unable to Get Location" );
89+
8890 stack = new Gtk .Stack ();
8991 stack. vhomogeneous = true ;
9092 stack. add (spinner);
9193 stack. add_named (grid, " weather" );
94+ stack. add_named (alert_label, " alert" );
9295
9396 var content_box = get_content_area () as Gtk . Box ;
9497 content_box. border_width = 0 ;
@@ -159,6 +162,7 @@ public class MainWindow : Gtk.Dialog {
159162 on_location_updated (simple. location. latitude, simple. location. longitude);
160163 } catch (Error e) {
161164 warning (" Failed to connect to GeoClue2 service: %s " , e. message);
165+ stack. visible_child_name = " alert" ;
162166 return ;
163167 }
164168 }
You can’t perform that action at this time.
0 commit comments