Files
federated-calendar/src/gui/event-editor/gcal-date-chooser.ui
T
Adrien Plazas 78931df46c date-chooser: Add the split-month-year property
This allows unifying the month and year selectors into a single month
and year selector by setting it to false.
2022-06-16 08:23:44 -03:00

115 lines
5.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.16"/>
<template class="GcalDateChooser" parent="AdwBin">
<child>
<object class="GtkGrid">
<property name="orientation">vertical</property>
<child>
<object class="GcalMultiChoice" id="month_choice">
<property name="halign">fill</property>
<property name="min-value">0</property>
<property name="max-value">11</property>
<property name="animate">False</property>
<property name="value">0</property>
<binding name="visible">
<closure type="gboolean" function="get_split_choice_visible">
<lookup name="show-heading">GcalDateChooser</lookup>
<lookup name="split-month-year">GcalDateChooser</lookup>
</closure>
</binding>
<signal name="notify::value" handler="split_multi_choice_changed" swapped="yes"/>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GcalMultiChoice" id="year_choice">
<binding name="visible">
<closure type="gboolean" function="get_split_choice_visible">
<lookup name="show-heading">GcalDateChooser</lookup>
<lookup name="split-month-year">GcalDateChooser</lookup>
</closure>
</binding>
<property name="halign">fill</property>
<property name="min-value">1</property>
<property name="max-value">9999</property>
<property name="animate">False</property>
<property name="value">0</property>
<signal name="notify::value" handler="split_multi_choice_changed" swapped="yes"/>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GcalMultiChoice" id="combined_choice">
<binding name="visible">
<closure type="gboolean" function="get_combined_choice_visible">
<lookup name="show-heading">GcalDateChooser</lookup>
<lookup name="split-month-year">GcalDateChooser</lookup>
</closure>
</binding>
<property name="halign">fill</property>
<!-- From January 1 (month 12) to December 9999 (month 119999) -->
<property name="min-value">12</property>
<property name="max-value">119999</property>
<property name="popover">popover</property>
<property name="animate">False</property>
<property name="value">0</property>
<signal name="notify::value" handler="combined_multi_choice_changed" swapped="yes"/>
<layout>
<property name="column">0</property>
<property name="column-span">2</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkGrid" id="grid">
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
<layout>
<property name="column">0</property>
<property name="column-span">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
</object>
</child>
</template>
<object class="GtkPopover" id="popover">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GcalMultiChoice" id="popover_month_choice">
<property name="min-value" bind-source="month_choice" bind-property="min-value" bind-flags="sync-create|bidirectional" />
<property name="max-value" bind-source="month_choice" bind-property="max-value" bind-flags="sync-create|bidirectional" />
<property name="animate" bind-source="month_choice" bind-property="animate" bind-flags="sync-create|bidirectional" />
<property name="value" bind-source="month_choice" bind-property="value" bind-flags="sync-create|bidirectional" />
</object>
</child>
<child>
<object class="GcalMultiChoice">
<property name="min-value" bind-source="year_choice" bind-property="min-value" bind-flags="sync-create|bidirectional" />
<property name="max-value" bind-source="year_choice" bind-property="max-value" bind-flags="sync-create|bidirectional" />
<property name="animate" bind-source="year_choice" bind-property="animate" bind-flags="sync-create|bidirectional" />
<property name="value" bind-source="year_choice" bind-property="value" bind-flags="sync-create|bidirectional" />
</object>
</child>
<style>
<class name="activatable"/>
<class name="month"/>
</style>
</object>
</child>
</object>
</interface>