Files
federated-calendar/src/gui/event-editor/gcal-schedule-section.ui
T
Cyber Phantom e2e7305971 gcal-schedule-section: Port "Repeat" to AdwComboRow
GtkComboBox is going to be deprecated in GTK 4.10.
This commit updates the "Repeat" rows in new schedule window to use AdwComboRow.
2023-04-22 10:14:22 +00:00

217 lines
7.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalScheduleSection" parent="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<style>
<class name="boxed-list" />
</style>
<!-- All Day -->
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">All Day</property>
<property name="activatable-widget">all_day_switch</property>
<child>
<object class="GtkSwitch" id="all_day_switch">
<property name="valign">center</property>
<property name="halign">end</property>
<signal name="notify::active" handler="on_all_day_switch_active_changed_cb" object="GcalScheduleSection" swapped="no"/>
</object>
</child>
</object>
</child>
<!-- Start -->
<child>
<object class="AdwExpanderRow">
<property name="title" translatable="yes">Starts</property>
<child type="action">
<object class="GtkLabel" id="event_start_label">
<property name="xalign">1.0</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">True</property>
<property name="halign">center</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="spacing">6</property>
<child>
<object class="GcalDateSelector" id="start_date_selector">
<property name="valign">center</property>
<signal name="notify::date" handler="sync_datetimes" object="GcalScheduleSection" swapped="yes" />
</object>
</child>
<child>
<object class="GcalTimeSelector" id="start_time_selector">
<signal name="notify::time" handler="sync_datetimes" object="GcalScheduleSection" swapped="yes" />
</object>
</child>
</object>
</child>
</object>
</child>
<!-- End -->
<child>
<object class="AdwExpanderRow">
<property name="title" translatable="yes">Ends</property>
<child type="action">
<object class="GtkLabel" id="event_end_label">
<property name="xalign">1.0</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">True</property>
<property name="halign">center</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="spacing">6</property>
<child>
<object class="GcalDateSelector" id="end_date_selector">
<property name="valign">center</property>
<signal name="notify::date" handler="sync_datetimes" object="GcalScheduleSection" swapped="yes" />
</object>
</child>
<child>
<object class="GcalTimeSelector" id="end_time_selector">
<signal name="notify::time" handler="sync_datetimes" object="GcalScheduleSection" swapped="yes" />
</object>
</child>
</object>
</child>
</object>
</child>
<!-- Repeat -->
<child>
<object class="AdwComboRow" id="repeat_combo">
<property name="title" translatable="yes">Repeat</property>
<property name="valign">center</property>
<property name="model">
<object class="GtkStringList">
<items>
<item translatable="yes">No Repeat</item>
<item translatable="yes">Daily</item>
<item translatable="yes">Monday – Friday</item>
<item translatable="yes">Weekly</item>
<item translatable="yes">Monthly</item>
<item translatable="yes">Yearly</item>
</items>
</object>
</property>
<signal name="notify::selected-item" handler="on_repeat_type_changed_cb" swapped="no"/>
</object>
</child>
<!-- End Repeat -->
<child>
<object class="AdwComboRow" id="repeat_duration_combo">
<property name="title" translatable="yes">End Repeat</property>
<property name="valign">center</property>
<property name="model">
<object class="GtkStringList">
<items>
<item translatable="yes">Forever</item>
<item translatable="yes">No. of occurrences</item>
<item translatable="yes">Until Date</item>
</items>
</object>
</property>
<signal name="notify::selected-item" handler="on_repeat_duration_changed_cb" swapped="no"/>
</object>
</child>
<!-- Number of Occurrences -->
<child>
<object class="AdwActionRow">
<property name="visible" bind-source="number_of_occurrences_spin" bind-property="visible" bind-flags="default|sync-create" />
<property name="title" translatable="yes">Number of Occurrences</property>
<property name="activatable-widget">number_of_occurrences_spin</property>
<child>
<object class = "GtkSpinButton" id="number_of_occurrences_spin">
<property name="visible">False</property>
<property name="numeric">True</property>
<property name="adjustment">number_of_occurrences_adjustment</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<!-- End Repeat Date -->
<child>
<object class="AdwActionRow">
<property name="visible" bind-source="until_date_selector" bind-property="visible" bind-flags="default|sync-create" />
<property name="title" translatable="yes">End Repeat Date</property>
<property name="activatable-widget">until_date_selector</property>
<child>
<object class = "GcalDateSelector" id="until_date_selector">
<property name="visible">False</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkAdjustment" id="number_of_occurrences_adjustment">
<property name="lower">2</property>
<property name="upper">999999999</property>
<property name="step-increment">1</property>
<property name="page-increment">1</property>
<property name="page-size">10</property>
<property name="value">2</property>
</object>
<object class="GtkSizeGroup">
<property name="mode">horizontal</property>
<widgets>
<widget name="end_date_selector" />
<widget name="end_time_selector" />
<widget name="start_date_selector" />
<widget name="start_time_selector" />
</widgets>
</object>
</interface>