calendar-management: Introduce GcalEditCalendarPage
This is the second of the three original pages we used to have. This one edits calendars.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<file alias="calendars-page.ui" compressed="true">ui/calendars-page.ui</file>
|
||||
<file alias="date-chooser.ui" compressed="true">ui/date-chooser.ui</file>
|
||||
<file alias="date-selector.ui" compressed="true">ui/date-selector.ui</file>
|
||||
<file alias="edit-calendar-page.ui" compressed="true">ui/edit-calendar-page.ui</file>
|
||||
<file alias="edit-dialog.ui" compressed="true">ui/edit-dialog.ui</file>
|
||||
<file alias="event-widget.ui" compressed="true">ui/event-widget.ui</file>
|
||||
<file alias="month-cell.ui" compressed="true">ui/month-cell.ui</file>
|
||||
|
||||
@@ -89,6 +89,7 @@ resource_data = files(
|
||||
'ui/date-chooser.ui',
|
||||
'ui/date-selector.ui',
|
||||
'ui/edit-dialog.ui',
|
||||
'ui/edit-calendar-page.ui',
|
||||
'ui/help-overlay.ui',
|
||||
'ui/menus.ui',
|
||||
'ui/month-cell.ui',
|
||||
|
||||
@@ -28,204 +28,6 @@
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<signal name="notify::visible-child-name" handler="stack_visible_child_name_changed" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkGrid" id="edit_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="border_width">18</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="default_check">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="notify::active" handler="default_check_toggled" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="default_check_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Add new events to this calendar by default</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="remove_button">
|
||||
<property name="label" translatable="yes">Remove Calendar</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<signal name="clicked" handler="remove_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="calendar_visible_check">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="notify::active" handler="calendar_visible_check_toggled" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="display_calendar_check_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Display calendar</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="calendar_color_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">start</property>
|
||||
<signal name="color-set" handler="color_set" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<signal name="notify::text" handler="name_entry_text_changed" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="calendar_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Calendar name</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="color_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="account_dim_label">
|
||||
<property name="visible" bind-source="account_box" bind-property="visible" bind-flags="default|sync-create"/>
|
||||
<property name="label" translatable="yes">Account</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="location_dim_label">
|
||||
<property name="visible" bind-source="calendar_url_button" bind-property="visible" bind-flags="default|sync-create"/>
|
||||
<property name="label" translatable="yes">Location</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="account_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="account_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="settings_button">
|
||||
<property name="label" translatable="yes">Settings</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="settings_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="calendar_url_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">edit</property>
|
||||
<property name="title" translatable="yes">Edit Calendar</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="web_source_grid">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GcalEditCalendarPage" parent="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="border_width">18</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
|
||||
<!-- Online Accounts -->
|
||||
<child>
|
||||
<object class="GtkLabel" id="account_dim_label">
|
||||
<property name="visible" bind-source="account_box" bind-property="visible" bind-flags="default" />
|
||||
<property name="label" translatable="yes">Account</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkBox" id="account_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="account_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="settings_button">
|
||||
<property name="label" translatable="yes">Settings</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="on_settings_button_clicked_cb" object="GcalEditCalendarPage" swapped="no" />
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Location (URL, file path) -->
|
||||
<child>
|
||||
<object class="GtkLabel" id="location_dim_label">
|
||||
<property name="visible" bind-source="calendar_url_button" bind-property="visible" bind-flags="default" />
|
||||
<property name="label" translatable="yes">Location</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="calendar_url_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Calendar name -->
|
||||
<child>
|
||||
<object class="GtkLabel" id="calendar_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Calendar name</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Color -->
|
||||
<child>
|
||||
<object class="GtkLabel" id="color_dim_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkColorButton" id="calendar_color_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Calendar visibility -->
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="calendar_visible_check">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="display_calendar_check_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Display calendar</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Default calendar -->
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="default_check">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="default_check_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Add new events to this calendar by default</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<!-- Remove button -->
|
||||
<child>
|
||||
<object class="GtkButton" id="remove_button">
|
||||
<property name="label" translatable="yes">Remove Calendar</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<signal name="clicked" handler="on_remove_button_clicked_cb" object="GcalEditCalendarPage" swapped="no" />
|
||||
<style>
|
||||
<class name="destructive-action" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
Reference in New Issue
Block a user