window: Delegate changing dates to GcalView

The view knows its time range, and knows what the
next or previous dates should be. So instead of
calculating the next date manually, ask the views
for that.
This commit is contained in:
Georges Basile Stavracas Neto
2019-05-09 17:42:59 -03:00
parent da31180cba
commit 0baeaa160a
7 changed files with 190 additions and 69 deletions
+3 -3
View File
@@ -168,9 +168,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action-name">win.today</property>
<accelerator key="t" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
<accelerator key="Home" signal="clicked"/>
<signal name="clicked" handler="date_updated" object="GcalWindow" swapped="yes"/>
</object>
<packing>
<property name="position">1</property>
@@ -184,9 +184,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action-name">win.previous-date</property>
<accelerator key="Left" modifiers="GDK_MOD1_MASK" signal="clicked"/>
<accelerator key="Page_Up" signal="clicked"/>
<signal name="clicked" handler="date_updated" object="GcalWindow" swapped="yes"/>
<child>
<object class="GtkImage" id="go_back_image">
<property name="visible">True</property>
@@ -200,9 +200,9 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="action-name">win.next-date</property>
<accelerator key="Right" modifiers="GDK_MOD1_MASK" signal="clicked"/>
<accelerator key="Page_Down" signal="clicked"/>
<signal name="clicked" handler="date_updated" object="GcalWindow" swapped="yes"/>
<child>
<object class="GtkImage" id="go_next_image">
<property name="visible">True</property>