Commit 053ff006 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko Committed by Zander Brown
Browse files

window: Update window title for the new subscreens

Since the subscreens are now a part of the window instead of their
respective views, binding the title is no longer useful. Instead,
reimplement it in a less generic way for these views specifically.
parent 20d25c96
......@@ -11,6 +11,7 @@
<property name="orientation">vertical</property>
<property name="visible-child">world_deck</property>
<property name="transition-type">under</property>
<signal name="notify::visible-child" handler="visible_child_changed"/>
<child>
<object class="ClocksAlarmRingingPanel" id="alarm_ringing_panel">
<property name="visible">True</property>
......@@ -21,6 +22,7 @@
<object class="HdyDeck" id="world_deck">
<property name="visible">True</property>
<property name="can-swipe-back">True</property>
<signal name="notify::visible-child" handler="visible_child_changed"/>
<child>
<object class="GtkBox" id="main_view">
<property name="visible">True</property>
......
......@@ -362,6 +362,17 @@ public class Window : Hdy.ApplicationWindow {
stack.visible_child.grab_focus ();
}
[GtkCallback]
private void visible_child_changed () {
if (alarm_deck.visible_child == alarm_ringing_panel) {
title = _("Alarm");
} else if (world_deck.visible_child == world_standalone) {
title = world_standalone.title;
} else {
title = _("Clocks");
}
}
[GtkCallback]
private void alarm_dismissed () {
alarm_deck.visible_child = world_deck;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment