Move UI files to src/

Keep it in sync with what To Do and Settings do.
This commit is contained in:
Georges Basile Stavracas Neto
2019-12-02 16:41:56 -03:00
parent d843885fc0
commit b772349c3f
51 changed files with 81 additions and 281 deletions
+73
View File
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ellipsize">end</property>
<property name="xalign">0</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="volume_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip-text" translatable="yes">Toggles the sound of the alarm</property>
<child>
<object class="GtkImage" id="volume_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">audio-volume-high-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip-text" translatable="yes">Remove the alarm</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">window-close-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="linked"/>
</style>
</object>
</interface>
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.16"/>
<object class="GtkListBoxRow" id="row">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkImage" id="icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">24</property>
<style>
<class name="calendar-color-image"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="subtitle">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<!-- Visibility switch -->
<child>
<object class="GtkSwitch" id="switch">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="height">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
@@ -274,7 +274,7 @@ gcal_calendar_management_dialog_class_init (GcalCalendarManagementDialogClass *k
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calendar/calendar-management-dialog.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/calendar-management/gcal-calendar-management-dialog.ui");
gtk_widget_class_bind_template_child (widget_class, GcalCalendarManagementDialog, headerbar);
gtk_widget_class_bind_template_child (widget_class, GcalCalendarManagementDialog, stack);
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.15"/>
<template class="GcalCalendarManagementDialog" parent="GtkDialog">
<property name="width_request">450</property>
<property name="can_focus">False</property>
<property name="border_width">0</property>
<property name="default_width">550</property>
<property name="default_height">500</property>
<property name="type_hint">dialog</property>
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="modal">True</property>
<signal name="response" handler="on_dialog_response_signal_cb" object="GcalCalendarManagementDialog" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="vbox">
<property name="orientation">vertical</property>
<property name="border_width">0</property>
<child>
<object class="GtkOverlay" id="overlay">
<property name="visible">True</property>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="vhomogeneous">False</property>
<property name="transition_type">crossfade</property>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="title" translatable="yes">Calendar Settings</property>
<property name="show_close_button">True</property>
</object>
</child>
</template>
</interface>
@@ -84,7 +84,7 @@ make_calendar_row (GcalCalendarsPage *self,
manager = gcal_context_get_manager (self->context);
get_source_parent_name_color (manager, gcal_calendar_get_source (calendar), &parent_name, NULL);
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/calendar-row.ui");
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/ui/gui/calendar-management/calendar-row.ui");
/*
* Since we're destroying the builder instance before adding
@@ -486,7 +486,7 @@ gcal_calendars_page_class_init (GcalCalendarsPageClass *klass)
g_object_class_override_property (object_class, PROP_CONTEXT, "context");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/calendars-page.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/calendar-management/gcal-calendars-page.ui");
gtk_widget_class_bind_template_child (widget_class, GcalCalendarsPage, add_calendar_row);
gtk_widget_class_bind_template_child (widget_class, GcalCalendarsPage, listbox);
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalCalendarsPage" parent="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<child type="overlay">
<object class="GtkRevealer" id="notification_revealer">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="notification_label">
<property name="visible">True</property>
<property name="use_markup">True</property>
</object>
</child>
<child>
<object class="GtkButton" id="notification_action_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Undo</property>
<signal name="clicked" handler="on_undo_remove_button_clicked_cb" object="GcalCalendarsPage" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<signal name="clicked" handler="on_close_notification_button_clicked_cb" object="GcalCalendarsPage" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">window-close-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<style>
<class name="app-notification"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="max_content_height">600</property>
<property name="propagate_natural_height">True</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="margin-top">24</property>
<property name="margin-bottom">24</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="visible">True</property>
<property name="selection-mode">none</property>
<signal name="row-activated" handler="on_listbox_row_activated_cb" object="GcalCalendarsPage" swapped="no" />
<style>
<class name="calendars-list"/>
</style>
<child>
<object class="GtkListBoxRow" id="add_calendar_row">
<property name="visible">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="expand">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="label" translatable="yes">Add Calendar…</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<!-- Size group for the listbox rows -->
<object class="GtkSizeGroup" id="sizegroup">
<property name="mode">vertical</property>
<widgets>
<widget name="add_calendar_row" />
</widgets>
</object>
</interface>
@@ -415,7 +415,7 @@ gcal_edit_calendar_page_class_init (GcalEditCalendarPageClass *klass)
g_object_class_override_property (object_class, PROP_CONTEXT, "context");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/edit-calendar-page.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/calendar-management/gcal-edit-calendar-page.ui");
gtk_widget_class_bind_template_child (widget_class, GcalEditCalendarPage, account_box);
gtk_widget_class_bind_template_child (widget_class, GcalEditCalendarPage, account_label);
@@ -0,0 +1,228 @@
<?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>
<!-- Headerbar buttons -->
<object class="GtkButton" id="back_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_back_button_clicked_cb" object="GcalEditCalendarPage" swapped="no" />
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon-name">go-previous-symbolic</property>
</object>
</child>
</object>
</interface>
@@ -615,7 +615,7 @@ gcal_new_calendar_page_class_init (GcalNewCalendarPageClass *klass)
g_object_class_override_property (object_class, PROP_CONTEXT, "context");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/new-calendar-page.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/calendar-management/gcal-new-calendar-page.ui");
gtk_widget_class_bind_template_child (widget_class, GcalNewCalendarPage, add_button);
gtk_widget_class_bind_template_child (widget_class, GcalNewCalendarPage, calendar_address_entry);
@@ -0,0 +1,357 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalNewCalendarPage" parent="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="margin-top">24</property>
<property name="margin-bottom">24</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<!-- Local calendar -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="margin-bottom">18</property>
<property name="orientation">vertical</property>
<style>
<class name="view" />
<class name="frame" />
</style>
<!-- Calendar name -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="margin">12</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Calendar Name</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkEntry" id="local_calendar_name_entry">
<property name="visible">True</property>
<property name="placeholder-text" translatable="yes">Calendar Name</property>
<signal name="notify::text" handler="on_local_calendar_name_entry_text_changed_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
</object>
</child>
<!-- Color -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="margin">12</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Color</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="local_calendar_color_button">
<property name="visible">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Import a Calendar</property>
<property name="xalign">0.0</property>
<attributes>
<attribute name="scale" value="1.3" />
<attribute name="weight" value="bold" />
</attributes>
</object>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<!-- Online Accounts reference label-->
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Alternatively, enter the web address of an online calendar you want to import, or open a supported calendar file.</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
<!-- URL entry -->
<child>
<object class="GtkEntry" id="calendar_address_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="placeholder-text">https://example.com/calendar.ics</property>
<signal name="notify::text" handler="on_url_entry_text_changed_cb" object="GcalNewCalendarPage" swapped="no" />
<signal name="activate" handler="on_calendar_address_activated_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<!-- File Chooser button -->
<child>
<object class="GtkFileChooserButton" id="calendar_file_chooser_button">
<property name="visible">True</property>
<property name="filter">calendar_file_filter</property>
<property name="title" translatable="yes">Open a File</property>
<signal name="file-set" handler="on_file_chooser_button_file_set_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkRevealer" id="web_sources_revealer">
<property name="transition_type">crossfade</property>
<property name="transition_duration">200</property>
<child>
<object class="GtkBox" id="web_sources_listbox_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="web_sources_calendar_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Calendars</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold" />
</attributes>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="height_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkViewport" id="viewport">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkListBox" id="web_sources_listbox">
<property name="visible">True</property>
<property name="activate_on_single_click">False</property>
<property name="selection_mode">none</property>
<style>
<class name="calendar-list" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</property>
</packing>
</child>
<!-- Online Accounts reference label-->
<child>
<object class="GtkLabel" id="web_description_label">
<property name="visible">True</property>
<property name="label" translatable="yes">If the calendar belongs to one of your online accounts, you can add it through the &lt;a href=&quot;GOA&quot;&gt;online account settings&lt;/a&gt;.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<signal name="activate-link" handler="on_web_description_label_link_activated_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
</packing>
</child>
</object>
</child>
</template>
<!-- Credentials popover -->
<object class="GtkPopover" id="credentials_popover">
<property name="relative-to">calendar_address_entry</property>
<property name="position">top</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin">12</property>
<child>
<object class="GtkGrid" id="credentials_grid">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="border_width">12</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="credentials_user_dim_label">
<property name="visible">True</property>
<property name="label" translatable="yes">User</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="credentials_password_dim_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Password</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="GtkEntry" id="credentials_user_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<signal name="activate" handler="on_credential_entry_activate_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="credentials_password_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="visibility">False</property>
<signal name="activate" handler="on_credential_entry_activate_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="spacing">12</property>
<child>
<object class="GtkButton" id="credentials_cancel_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Cancel</property>
<signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
</child>
<child>
<object class="GtkButton" id="credentials_connect_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Connect</property>
<signal name="clicked" handler="on_credential_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
<style>
<class name="suggested-action" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<!-- Calendar file filter -->
<object class="GtkFileFilter" id="calendar_file_filter">
<patterns>
<pattern>*.ical</pattern>
<pattern>*.icalendar</pattern>
<pattern>*.ics</pattern>
<pattern>*.ifb</pattern>
<pattern>*.vcs</pattern>
</patterns>
<mime-types>
<mime-type>text/calendar</mime-type>
</mime-types>
</object>
<!-- Headerbar buttons -->
<object class="GtkButton" id="cancel_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Cancel</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_cancel_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
</object>
<object class="GtkButton" id="add_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Add</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_add_button_clicked_cb" object="GcalNewCalendarPage" swapped="no" />
<style>
<class name="suggested-action"/>
</style>
</object>
</interface>
+1 -1
View File
@@ -352,7 +352,7 @@ gcal_calendar_popover_class_init (GcalCalendarPopoverClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/calendar-popover.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-calendar-popover.ui");
gtk_widget_class_bind_template_child (widget_class, GcalCalendarPopover, calendar_listbox);
gtk_widget_class_bind_template_child (widget_class, GcalCalendarPopover, icon_stack);
+91
View File
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalCalendarPopover" parent="GtkPopover">
<property name="can_focus">False</property>
<property name="position">bottom</property>
<property name="constrain_to">none</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin">6</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar_policy">never</property>
<property name="max_content_height">450</property>
<property name="propagate-natural-height">True</property>
<child>
<object class="GtkListBox" id="calendar_listbox">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="selection_mode">none</property>
<signal name="row-activated" handler="on_listbox_row_activated_cb" object="GcalCalendarPopover" swapped="no"/>
<style>
<class name="calendar-list"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
</object>
</child>
<!-- Synchronize -->
<child>
<object class="GtkModelButton" id="synchronize_button">
<property name="visible">True</property>
<property name="action-name">app.sync</property>
<property name="text" translatable="yes">_Synchronize Calendars</property>
</object>
</child>
<child>
<object class="GtkModelButton" id="calendar_settings_button">
<property name="visible">True</property>
<property name="action_name">win.show-calendars</property>
<property name="text" translatable="yes">Manage Calendars…</property>
</object>
</child>
</object>
</child>
</template>
<!-- Icon -->
<object class="GtkStack" id="icon_stack">
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<property name="transition-duration">250</property>
<child>
<object class="GtkImage" id="calendar_image">
<property name="visible">True</property>
<property name="icon_name">x-office-calendar-symbolic</property>
</object>
<packing>
<property name="name">icon</property>
</packing>
</child>
<child>
<object class="GtkSpinner" id="refreshing_spinner">
<property name="active">True</property>
<property name="tooltip_text" translatable="yes" context="tooltip">Synchronizing remote calendars…</property>
</object>
<packing>
<property name="name">spinner</property>
</packing>
</child>
<child>
<object class="GtkImage" id="success_image">
<property name="visible">True</property>
<property name="icon_name">emblem-ok-symbolic</property>
</object>
<packing>
<property name="name">success</property>
</packing>
</child>
</object>
</interface>
+1 -1
View File
@@ -485,7 +485,7 @@ gcal_date_chooser_class_init (GcalDateChooserClass *class)
widget_class->drag_data_received = calendar_drag_data_received;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/date-chooser.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-date-chooser.ui");
properties[PROP_DATE] = g_param_spec_boxed ("date",
"Date",
+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.16"/>
<template class="GcalDateChooser" parent="GtkBin">
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GcalMultiChoice" id="month_choice">
<property name="visible" bind-source="GcalDateChooser" bind-property="show-heading" bind-flags="sync-create"/>
<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>
<signal name="notify::value" handler="multi_choice_changed" swapped="yes"/>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GcalMultiChoice" id="year_choice">
<property name="visible" bind-source="GcalDateChooser" bind-property="show-heading" bind-flags="sync-create"/>
<property name="halign">fill</property>
<property name="min-value">0</property>
<property name="max-value">120000</property>
<property name="animate">False</property>
<property name="value">0</property>
<signal name="notify::value" handler="multi_choice_changed" swapped="yes"/>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="row-homogeneous">True</property>
<property name="column-homogeneous">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -214,7 +214,7 @@ gcal_date_selector_class_init (GcalDateSelectorClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/date-selector.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-date-selector.ui");
gtk_widget_class_bind_template_child (widget_class, GcalDateSelector, date_chooser);
gtk_widget_class_bind_template_child (widget_class, GcalDateSelector, date_selector_popover);
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.12"/>
<template class="GcalDateSelector" parent="GtkEntry">
<property name="visible">True</property>
<property name="width-chars">16</property>
<property name="max-width-chars">16</property>
<property name="secondary-icon-name">pan-down-symbolic</property>
<property name="input-hints">no-emoji</property>
<signal name="icon-press" handler="icon_pressed_cb" object="GcalDateSelector" swapped="no"/>
</template>
<object class="GtkPopover" id="date_selector_popover">
<property name="position">bottom</property>
<property name="border_width">12</property>
<child>
<object class="GcalDateChooser" id="date_chooser">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_week_numbers">True</property>
<signal name="day-selected" handler="calendar_day_selected" object="GcalDateSelector" swapped="yes"/>
</object>
</child>
</object>
</interface>
+2 -2
View File
@@ -565,7 +565,7 @@ create_row_for_alarm (GcalEvent *event,
g_object_set_data (G_OBJECT (row), "event", event);
/* Build the UI */
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/alarm-row.ui");
builder = gtk_builder_new_from_resource ("/org/gnome/calendar/ui/gui/alarm-row.ui");
#define WID(x) (GTK_WIDGET (gtk_builder_get_object (builder, x)))
@@ -1270,7 +1270,7 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/edit-dialog.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-edit-dialog.ui");
/* Alarms */
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, five_minutes_button);
+692
View File
@@ -0,0 +1,692 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalEditDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="use_header_bar">1</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="titlebar">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="clicked" handler="on_action_button_clicked_cb" object="GcalEditDialog" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImage" id="lock">
<property name="visible" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default|invert-boolean" />
<property name="icon_name">changes-prevent-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
<child type="title">
<object class="GtkMenuButton" id="sources_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">sources_popover</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<property name="tooltip-text" translatable="yes">Click to select the calendar</property>
<style>
<class name="flat"/>
<class name="sources-button"/>
</style>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="title_label_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ellipsize">middle</property>
<property name="max_width_chars">40</property>
<property name="label" bind-source="summary_entry" bind-property="text" bind-flags="default" />
<style>
<class name="title"/>
</style>
</object>
</child>
<child>
<object class="GtkBox" id="subtitle_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
<property name="halign">center</property>
<child>
<object class="GtkImage" id="source_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<style>
<class name="calendar-color-image"/>
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="subtitle_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<style>
<class name="subtitle"/>
</style>
</object>
</child>
<style>
<class name="subtitle"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkImage" id="pan_down_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">pan-down-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="done_button">
<property name="label" translatable="yes">Done</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_action_button_clicked_cb" object="GcalEditDialog" swapped="no"/>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox">
<property name="visible">true</property>
<property name="spacing">0</property>
<property name="border_width">0</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="min_content_height">400</property>
<property name="propagate_natural_height">true</property>
<child>
<object class="GtkGrid" id="main_grid">
<property name="visible">True</property>
<property name="border_width">18</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="summary_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="label" translatable="yes">Title</property>
<property name="ellipsize">end</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<signal name="size-allocate" handler="fix_reminders_label_height_cb" object="reminders_label" swapped="no" after="yes" />
<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="dates_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="label" translatable="yes">Date</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<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="GtkLabel">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="label" translatable="yes">Repeat</property>
<property name="ellipsize">end</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="reminders_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Reminders</property>
<property name="ellipsize">end</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="notes_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Notes</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="location_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="margin-top">12</property>
<property name="label" translatable="yes">Location</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">7</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="summary_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="margin-top">12</property>
<property name="editable" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<signal name="notify::text" handler="on_summary_entry_changed_cb" object="GcalEditDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="margin-top">12</property>
<property name="spacing">6</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<child>
<object class="GcalDateSelector" id="start_date_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="input-hints">no-emoji</property>
<signal name="notify::date" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">-</property>
</object>
</child>
<child>
<object class="GcalDateSelector" id="end_date_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="input-hints">no-emoji</property>
<signal name="notify::date" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="times_label">
<property name="visible">True</property>
<property name="xalign">1.0</property>
<property name="label" translatable="yes">Time</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="GtkBox">
<property name="visible">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<object class="GcalTimeSelector" id="start_time_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">-</property>
</object>
</child>
<child>
<object class="GcalTimeSelector" id="end_time_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="all_day_check">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin-top">12</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="yes">All Day</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<signal name="toggled" handler="on_all_day_check_changed_cb" object="GcalEditDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin-top">12</property>
<property name="spacing">6</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<child>
<object class="GtkListBox" id="alarms_listbox">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<style>
<class name="background" />
</style>
</object>
</child>
<child>
<object class="GtkMenuButton" id="alarms_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="popover">alarms_popover</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0.0</property>
<property name="label" translatable="yes">Add reminder…</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">pan-down-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">6</property>
<property name="width">4</property>
</packing>
</child>
<!-- combo-box with options to define the recurrence-rules !-->
<child>
<object class="GtkComboBoxText" id="repeat_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin-top">12</property>
<property name="hexpand">True</property>
<signal name="changed" handler="on_repeat_type_changed_cb" object="GcalEditDialog" swapped="no"/>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<items>
<item translatable="yes" id="no_repeat">No Repeat</item>
<item translatable="yes" id="daily">Daily</item>
<item translatable="yes" id="mon_fri">Monday – Friday</item>
<item translatable="yes" id="weekly">Weekly</item>
<item translatable="yes" id="monthly">Monthly</item>
<item translatable="yes" id="yearly">Yearly</item>
</items>
<property name="active_id">no_repeat</property>
<style>
<class name="background" />
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="repeat_limits_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="hexpand">True</property>
<property name="orientation">horizontal</property>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<child>
<object class="GtkComboBoxText" id="repeat_duration_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<signal name="changed" handler="on_repeat_duration_changed_cb" object="GcalEditDialog" swapped="no"/>
<items>
<item translatable="yes" id="forever">Forever</item>
<item translatable="yes" id="number_of_occurrences_spin">No. of occurrences</item>
<item translatable="yes" id="until_date">Until Date</item>
</items>
<property name="active_id">forever</property>
<style>
<class name="background" />
</style>
</object>
</child>
<child>
<object class="GtkStack" id="repeat_duration_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<child>
<object class = "GtkSpinButton" id="number_of_occurrences_spin">
<property name="visible">True</property>
<property name="input_purpose">number</property>
<property name="input-hints">no-emoji</property>
</object>
</child>
<child>
<object class = "GcalDateSelector" id="until_date_selector">
<property name="visible">True</property>
</object>
</child>
<style>
<class name="background" />
</style>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="location_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin-top">12</property>
<property name="secondary_icon_name">find-location-symbolic</property>
<property name="editable" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<signal name="notify::text" handler="on_location_entry_changed_cb" object="GcalEditDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">7</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="min_content_height">120</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin-top">12</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="notes_text">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="top_margin">6</property>
<property name="bottom_margin">6</property>
<property name="left_margin">6</property>
<property name="right_margin">6</property>
<property name="sensitive">True</property>
<property name="editable" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<property name="cursor_visible" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<property name="wrap_mode">GTK_WRAP_WORD_CHAR</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">8</property>
<property name="width">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="delete_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin-top">12</property>
<signal name="clicked" handler="on_action_button_clicked_cb" object="GcalEditDialog" swapped="no"/>
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
<child>
<object class="GtkLabel" id="delete_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Delete Event</property>
</object>
</child>
<style>
<class name="destructive-action"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">9</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkPopover" id="sources_popover">
</object>
<object class="GtkPopoverMenu" id="alarms_popover">
<property name="can_focus">False</property>
<property name="width_request">175</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkModelButton" id="five_minutes_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">5 minutes</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="ten_minutes_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">10 minutes</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="thirty_minutes_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">30 minutes</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="one_hour_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">1 hour</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="one_day_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="text" translatable="yes">1 day</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="two_days_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">2 days</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="three_days_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">3 days</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
<child>
<object class="GtkModelButton" id="one_week_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="text" translatable="yes">1 week</property>
<signal name="clicked" handler="on_add_alarm_button_clicked_cb" object="GcalEditDialog" swapped="no" />
</object>
</child>
</object>
</child>
</object>
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
<widget name="cancel_button" />
<widget name="done_button" />
<widget name="sources_button" />
</widgets>
</object>
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
<widget name="pan_down_image" />
<widget name="title_label_box" />
</widgets>
</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>
+1 -1
View File
@@ -971,7 +971,7 @@ gcal_event_widget_class_init (GcalEventWidgetClass *klass)
G_TYPE_NONE,
0);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/event-widget.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-event-widget.ui");
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, color_box);
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, horizontal_grid);
+115
View File
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalEventWidget" parent="GtkBin">
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
<property name="margin-top">1</property>
<property name="margin-bottom">1</property>
<property name="margin-start">6</property>
<property name="margin-end">4</property>
<property name="homogeneous">false</property>
<!-- Horizontal page -->
<child>
<object class="GtkGrid" id="horizontal_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">4</property>
<child>
<object class="GtkBox" id="color_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="width-request">16</property>
<property name="height-request">16</property>
<style>
<class name="icon-box" />
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0.0</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="hour_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no-show-all">True</property>
<style>
<class name="dim-label" />
</style>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="name">horizontal</property>
</packing>
</child>
<!-- Vertical page -->
<child>
<object class="GtkGrid" id="vertical_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" bind-source="hour_label" bind-property="label" bind-flags="default" />
<property name="xalign">0.0</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">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" bind-source="summary_label" bind-property="label" bind-flags="default" />
<property name="wrap">True</property>
<property name="hexpand">True</property>
<property name="xalign">0.0</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">vertical</property>
</packing>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -426,7 +426,7 @@ gcal_multi_choice_class_init (GcalMultiChoiceClass *class)
NULL,
G_TYPE_NONE, 0);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/multi-choice.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-multi-choice.ui");
gtk_widget_class_bind_template_child (widget_class, GcalMultiChoice, down_button);
gtk_widget_class_bind_template_child (widget_class, GcalMultiChoice, up_button);
+71
View File
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
<requires lib="gtk+" version="3.16"/>
<template class="GcalMultiChoice" parent="GtkBox">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="down_button">
<property name="visible">True</property>
<property name="relief">none</property>
<signal name="button-press-event" handler="button_press_cb"/>
<signal name="button-release-event" handler="button_release_cb"/>
<signal name="clicked" handler="button_clicked_cb"/>
<style>
<class name="image-button"/>
<class name="back-button"/>
<class name="circular"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">pan-start-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
</object>
<packing>
<property name="name">label1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
</object>
<packing>
<property name="name">label2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="up_button">
<property name="visible">True</property>
<property name="relief">none</property>
<signal name="button-press-event" handler="button_press_cb"/>
<signal name="button-release-event" handler="button_release_cb"/>
<signal name="clicked" handler="button_clicked_cb"/>
<style>
<class name="image-button"/>
<class name="forward-button"/>
<class name="circular"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">pan-end-symbolic</property>
</object>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -901,7 +901,7 @@ gcal_quick_add_popover_class_init (GcalQuickAddPopoverClass *klass)
GCAL_TYPE_CONTEXT,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/quick-add-popover.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-quick-add-popover.ui");
gtk_widget_class_bind_template_child (widget_class, GcalQuickAddPopover, add_button);
gtk_widget_class_bind_template_child (widget_class, GcalQuickAddPopover, calendars_listbox);
+252
View File
@@ -0,0 +1,252 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.16"/>
<template class="GcalQuickAddPopover" parent="GtkPopover">
<property name="width_request">350</property>
<property name="can_focus">False</property>
<signal name="show" handler="gtk_widget_grab_focus" object="summary_entry" swapped="yes" />
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">12</property>
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">True</property>
<property name="transition_type">slide-left-right</property>
<property name="interpolate_size">True</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="summary_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<signal name="notify::text" handler="summary_entry_text_changed" object="GcalQuickAddPopover" swapped="no" />
<signal name="activate" handler="summary_entry_activated" object="GcalQuickAddPopover" swapped="no" />
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="select_calendar_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<signal name="clicked" handler="select_calendar_button_clicked" object="GcalQuickAddPopover" swapped="yes" />
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="color_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
<style>
<class name="calendar-color-image"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="calendar_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">go-next-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="edit_button">
<property name="label" translatable="yes">Edit Details…</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_top">6</property>
<signal name="clicked" handler="edit_or_create_event" object="GcalQuickAddPopover" swapped="yes" />
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="add_button">
<property name="label" translatable="yes">Add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="sensitive">False</property>
<property name="margin_top">6</property>
<signal name="clicked" handler="edit_or_create_event" object="GcalQuickAddPopover" swapped="yes" />
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
</packing>
</child>
</object>
<packing>
<property name="name">events</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="back_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">none</property>
<signal name="clicked" handler="back_button_clicked" object="GcalQuickAddPopover" swapped="yes" />
<style>
<class name="image-button"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">go-previous-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child type="center">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Calendar</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkListBox" id="calendars_listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<signal name="row-activated" handler="select_row" object="GcalQuickAddPopover" swapped="yes" />
<style>
<class name="calendars-list"/>
</style>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">calendars</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</template>
<object class="GtkSizeGroup">
<widgets>
<widget name="edit_button"/>
<widget name="add_button"/>
</widgets>
</object>
</interface>
+1 -1
View File
@@ -247,7 +247,7 @@ gcal_time_selector_class_init (GcalTimeSelectorClass *klass)
G_TYPE_DATE_TIME,
G_PARAM_READWRITE));
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calendar/time-selector.ui");
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/calendar/ui/gui/gcal-time-selector.ui");
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, time_label);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GcalTimeSelector, hour_adjustment);
+90
View File
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalTimeSelector" parent="GtkMenuButton">
<property name="use_popover">True</property>
<property name="popover">time_selector_popover</property>
<child>
<object class="GtkLabel" id="time_label">
<property name="visible">True</property>
<property name="label" translatable="yes">00:00</property>
</object>
</child>
</template>
<object class="GtkAdjustment" id="hour_adjustment">
<property name="upper">23</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
<signal name="value-changed" handler="update_time" object="GcalTimeSelector" swapped="yes"/>
</object>
<object class="GtkAdjustment" id="minute_adjustment">
<property name="upper">59</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<signal name="value-changed" handler="update_time" object="GcalTimeSelector" swapped="yes"/>
</object>
<object class="GtkPopover" id="time_selector_popover">
<property name="position">bottom</property>
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkSpinButton" id="hour_spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0.5</property>
<property name="input_purpose">number</property>
<property name="orientation">vertical</property>
<property name="adjustment">hour_adjustment</property>
<signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="minute_spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="xalign">0.5</property>
<property name="input_purpose">number</property>
<property name="orientation">vertical</property>
<property name="adjustment">minute_adjustment</property>
<signal name="output" handler="on_output" object="GcalTimeSelector" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">:</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="period_combo">
<property name="valign">center</property>
<property name="active">0</property>
<signal name="changed" handler="update_time" object="GcalTimeSelector" swapped="yes"/>
<items>
<item translatable="yes">AM</item>
<item translatable="yes">PM</item>
</items>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
+1 -1
View File
@@ -1033,7 +1033,7 @@ gcal_window_class_init (GcalWindowClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/window.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/gui/gcal-window.ui");
/* widgets */
gtk_widget_class_bind_template_child (widget_class, GcalWindow, back_button);
+360
View File
@@ -0,0 +1,360 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.14"/>
<template class="GcalWindow" parent="GtkApplicationWindow">
<property name="window_position">center</property>
<property name="default_width">800</property>
<property name="default_height">600</property>
<property name="height_request">600</property>
<property name="show_menubar">False</property>
<signal name="window-state-event" handler="window_state_changed" object="GcalWindow" swapped="no"/>
<style>
<class name="org-gnome-Calendar"/>
</style>
<child>
<object class="GtkOverlay" id="views_overlay">
<property name="visible">True</property>
<child>
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkStack" id="views_stack">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="transition_duration">250</property>
<property name="transition_type">crossfade</property>
<signal name="notify::visible-child" handler="view_changed" object="GcalWindow" swapped="no"/>
<style>
<class name="view"/>
</style>
<child>
<object class="GcalWeekView" id="week_view">
<property name="visible">True</property>
<property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
<packing>
<property name="name">week</property>
<property name="title" translatable="yes">Week</property>
</packing>
</child>
<child>
<object class="GcalMonthView" id="month_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
<signal name="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
<packing>
<property name="position">1</property>
<property name="name">month</property>
<property name="title" translatable="yes">Month</property>
</packing>
</child>
<child>
<object class="GcalYearView" id="year_view">
<property name="visible">True</property>
<property name="active-date" bind-source="GcalWindow" bind-property="active-date" bind-flags="bidirectional"/>
<signal name="create-event" handler="show_new_event_widget" object="GcalWindow" swapped="no"/>
<signal name="create-event-detailed" handler="create_event_detailed_cb" object="GcalWindow" swapped="no"/>
<signal name="event-activated" handler="event_activated" object="GcalWindow" swapped="no"/>
</object>
<packing>
<property name="position">2</property>
<property name="name">year</property>
<property name="title" translatable="yes">Year</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="overlay">
<object class="GtkRevealer" id="notification">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="transition_duration">100</property>
<signal name="notify::child-revealed" handler="remove_event" object="GcalWindow" swapped="no"/>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">2</property>
<property name="margin_bottom">2</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="notification_label">
<property name="visible">True</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="notification_action_button">
<property name="label">button</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="clicked" handler="undo_remove_action" object="GcalWindow" swapped="no"/>
<style>
<class name="text-button"/>
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="notification_close_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<signal name="clicked" handler="hide_notification" object="GcalWindow" swapped="yes"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon_name">window-close-symbolic</property>
<property name="icon_size">2</property>
</object>
</child>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
<style>
<class name="app-notification"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="header_bar">
<property name="visible">True</property>
<property name="show_close_button">True</property>
<property name="title" translatable="yes">Calendar</property>
<child>
<object class="GtkButton" id="new_event_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="action-name">win.new-event</property>
<property name="tooltip_text" translatable="yes" context="tooltip">Add a new event</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon-name">list-add-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="today_button">
<property name="label" translatable="yes">Today</property>
<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"/>
</object>
</child>
<child>
<object class="GtkBox" id="button_box">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="back_button">
<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"/>
<child>
<object class="GtkImage" id="go_back_image">
<property name="visible">True</property>
<property name="icon_name">go-previous-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="forward_button">
<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"/>
<child>
<object class="GtkImage" id="go_next_image">
<property name="visible">True</property>
<property name="icon_name">go-next-symbolic</property>
</object>
</child>
</object>
</child>
<style>
<class name="linked"/>
</style>
</object>
</child>
<child type="title">
<object class="GtkStackSwitcher" id="views_switcher">
<property name="visible">True</property>
<property name="stack">views_stack</property>
</object>
</child>
<child>
<object class="GtkMenuButton" id="menu_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="popover">win_menu</property>
<property name="receives_default">True</property>
<child>
<object class="GtkImage" id="menu_image">
<property name="visible">True</property>
<property name="icon_name">open-menu-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="calendars_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="popover">calendar_popover</property>
<property name="tooltip_text" translatable="yes">Manage your calendars</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GcalSearchButton" id="search_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes" context="tooltip">Search for events</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
</template>
<object class="GcalCalendarPopover" id="calendar_popover" />
<object class="GcalQuickAddPopover" id="quick_add_popover">
<property name="visible">False</property>
<property name="relative_to">views_stack</property>
<signal name="edit-event" handler="edit_event" object="GcalWindow" swapped="no"/>
<signal name="closed" handler="close_new_event_widget" object="GcalWindow" swapped="no"/>
</object>
<object class="GcalCalendarManagementDialog" id="calendar_management_dialog">
<property name="visible">False</property>
<property name="transient_for">GcalWindow</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete" object="GcalWindow" swapped="no" />
</object>
<object class="GcalEditDialog" id="edit_dialog">
<property name="visible">False</property>
<property name="transient_for">GcalWindow</property>
<signal name="response" handler="edit_dialog_closed" object="GcalWindow" swapped="no"/>
<signal name="delete-event" handler="gtk_widget_hide_on_delete" object="GcalWindow" swapped="no"/>
</object>
<object class="GtkPopoverMenu" id="win_menu">
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="margin">12</property>
<property name="orientation">vertical</property>
<!-- About -->
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">win.open-online-accounts</property>
<property name="text" translatable="yes">_Online Accounts…</property>
</object>
</child>
<!-- Weather -->
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="menu-name">weather</property>
<property name="text" translatable="yes">_Weather</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
</object>
</child>
<!-- Shortcuts -->
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">win.show-help-overlay</property>
<property name="text" translatable="yes">_Keyboard Shortcuts</property>
</object>
</child>
<!-- About -->
<child>
<object class="GtkModelButton">
<property name="visible">True</property>
<property name="action-name">app.about</property>
<property name="text" translatable="yes">_About Calendar</property>
</object>
</child>
</object>
</child>
<!-- Weather submenu -->
<child>
<object class="GcalWeatherSettings" id="weather_settings">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="submenu">weather</property>
</packing>
</child>
</object>
</interface>