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
+43
View File
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/calendar/ui">
<file compressed="true">gui/alarm-row.ui</file>
<file compressed="true">gui/gcal-calendar-popover.ui</file>
<file compressed="true">gui/gcal-date-chooser.ui</file>
<file compressed="true">gui/gcal-date-selector.ui</file>
<file compressed="true">gui/gcal-edit-dialog.ui</file>
<file compressed="true">gui/gcal-event-widget.ui</file>
<file compressed="true">gui/gcal-quick-add-popover.ui</file>
<file compressed="true">gui/gcal-multi-choice.ui</file>
<file compressed="true">gui/gcal-time-selector.ui</file>
<file compressed="true">gui/gcal-window.ui</file>
<!-- Calendar Management dialog -->
<file compressed="true">gui/calendar-management/calendar-row.ui</file>
<file compressed="true">gui/calendar-management/gcal-calendar-management-dialog.ui</file>
<file compressed="true">gui/calendar-management/gcal-calendars-page.ui</file>
<file compressed="true">gui/calendar-management/gcal-edit-calendar-page.ui</file>
<file compressed="true">gui/calendar-management/gcal-new-calendar-page.ui</file>
<!-- Views -->
<file compressed="true">views/gcal-month-cell.ui</file>
<file compressed="true">views/gcal-month-popover.ui</file>
<file compressed="true">views/gcal-month-view.ui</file>
<file compressed="true">views/gcal-week-header.ui</file>
<file compressed="true">views/gcal-week-view.ui</file>
<file compressed="true">views/gcal-year-view.ui</file>
<!-- Weather -->
<file compressed="true">weather/gcal-weather-settings.ui</file>
</gresource>
<!-- Theme -->
<gresource prefix="/org/gnome/calendar">
<file>theme/Adwaita.css</file>
</gresource>
<!-- GTK -->
<gresource prefix="/org/gnome/calendar/gtk">
<file compressed="true">help-overlay.ui</file>
</gresource>
</gresources>
+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>
+122
View File
@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">True</property>
<property name="section-name">shortcuts</property>
<property name="max-height">17</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">New event</property>
<property name="accelerator">&lt;Primary&gt;N</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Close window</property>
<property name="accelerator">&lt;Primary&gt;Q</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Search</property>
<property name="accelerator">&lt;Primary&gt;F</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Show help</property>
<property name="accelerator">F1</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Shortcuts</property>
<property name="accelerator">&lt;Primary&gt;question &lt;Primary&gt;F1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Navigation</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go back</property>
<property name="accelerator">&lt;alt&gt;Left Page_Up</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Go forward</property>
<property name="accelerator">&lt;alt&gt;Right Page_Down</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Show today</property>
<property name="accelerator">&lt;alt&gt;Down &lt;Primary&gt;T Home</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Next view</property>
<property name="accelerator">&lt;Primary&gt;Page_Down</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Previous view</property>
<property name="accelerator">&lt;Primary&gt;Page_Up</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">View</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Week view</property>
<property name="accelerator">&lt;Primary&gt;1</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Month view</property>
<property name="accelerator">&lt;Primary&gt;2</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">True</property>
<property name="title" translatable="yes" context="shortcut window">Year view</property>
<property name="accelerator">&lt;Primary&gt;3</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+1 -2
View File
@@ -28,12 +28,11 @@ built_sources = gnome.mkenums(
h_template: enum_types + '.h.template'
)
gresource = files('calendar.gresource.xml')
built_sources += gnome.compile_resources(
'gcal-resources',
gresource,
source_dir: data_dir,
c_name: 'calendar',
dependencies: resource_data,
export: true
)
+481
View File
@@ -0,0 +1,481 @@
@define-color event_shadow_color alpha(black, 0.2);
/* Header labels */
label.primary-label {
font-size: 16pt;
font-weight: bold;
color: @theme_selected_bg_color;
padding: 12px;
}
label.secondary-label {
font-size: 16pt;
font-weight: bold;
padding: 12px;
color: alpha(@theme_fg_color, 0.55);
}
calendar-view {
padding: 6px;
font-size: 10pt;
}
calendar-view.header,
label.header {
font-size: 10pt;
font-weight: bold;
color: alpha(@theme_fg_color, 0.55);
}
calendar-view.current,
weekgrid.current {
background-color: alpha(@theme_selected_bg_color, 0.3);
}
calendar-view:selected {
color: @theme_selected_bg_color;
font-weight: bold;
}
/* Year View CSS */
.year-view {
padding: 0px;
}
/* Header the padding if for sizing, on drawing the spacing between cells,
* and the padding will be automatically calculated
* Because of year-view widget internals, the color property should be the same
* of .start-header selector */
.year-navigator {
padding: 12px;
color: @theme_selected_bg_color;
}
.year-navigator.header {
color: @theme_selected_bg_color;
font-weight: bold;
}
.year-navigator.lines {
color: alpha(@theme_fg_color, 0.4);
}
.year-navigator.days {
padding: 5px;
color: @theme_fg_color;
font-size: 9pt;
}
.year-navigator.non-workday {
color: alpha(@theme_fg_color, 0.5);
}
.year-navigator.week-numbers {
font-size: 70%;
font-weight: bold;
border-radius: 2px;
background-color: alpha(@theme_fg_color, 0.05);
color: alpha(@theme_fg_color, 0.4);
}
/* these two are supposed be changed in sync with .calendar-view */
.year-navigator.current {
background-color: black;
border-radius: 2px;
color: white;
font-weight: bold;
}
.year-navigator:selected {
color: @theme_selected_bg_color;
font-weight: bold;
}
.year-navigator:hover {
background-color: alpha(@theme_fg_color, 0.1);
border-radius: 2px;
}
.year-navigator.dnd {
border: solid 1px #4e9a06;
box-shadow: inset 0 0 0 1px #4e9a06;
}
.year-navigator.with-events {
background-color: @theme_fg_color;
border-radius: 3px;
}
.year-navigator.with-events-selected {
background-color: @theme_selected_bg_color;
}
.year-navigator.with-events-non-workday {
background-color: alpha(@theme_fg_color, 0.5);
}
.sidebar-header {
font-weight: bold;
font-size: 11pt;
}
.italic-label {
font-style: italic;
}
.year-view .sidebar {
padding: 4px;
border: 1px none @borders;
}
.year-view .sidebar:backdrop {
border-color: @unfocused_borders;
}
.year-view .sidebar:dir(ltr) {
border-left-style: solid;
}
.year-view .sidebar:dir(rtl) {
border-right-style: solid;
}
/* no events label */
.year-view box.sidebar label:nth-child(2) {
margin-top: 4px;
}
.year-view button {
border-radius: 0;
border-bottom-style: none;
}
.year-view button:dir(ltr) {
border-right-style: none;
}
.year-view button:dir(rtl) {
border-left-style: none;
}
.year-view scrolledwindow {
border-top-width: 0;
border-bottom-width: 0;
}
popover.events {
background-color: @theme_bg_color;
padding: 0;
}
popover.events box {
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
popover.events list {
background-color: @theme_bg_color;
border-radius: 6px;
}
popover.events scrolledwindow {
border-width: 0;
}
popover.events button {
border-radius: 6px;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-style: solid none none;
box-shadow: none;
}
/*
* Event widget
*/
event {
border-radius: 2px;
margin: 0 1px 1px 2px;
font-size: 0.9rem;
}
event.color-dark.horizontal.timed,
event.color-light.horizontal.timed {
margin-bottom: 0;
border-radius: 0;
color: @theme_fg_color;
}
event.color-dark {
color: white;
outline-color: rgba(0, 0, 0, 0.3);
}
event.color-dark:backdrop {
color: rgba(255, 255, 255, 0.3);
}
event.color-light {
color: @theme_fg_color;
outline-color: rgba(255, 255, 255, 0.5);
}
event.color-light:backdrop {
color: rgba(0, 0, 0, 0.3);
}
.search-viewport {
background-color: @theme_base_color;
}
/* calendar popover */
.calendar-list {
background-color: transparent;
}
.calendar-list > list {
border-radius: 4px;
}
/* Edit dialog's header button */
.sources-button {
margin-top: 0;
margin-bottom: 0;
border-radius: 0;
border-top-style: none;
border-bottom-style: none;
}
.sources-button:hover:not(:backdrop) {
background-image: none;
text-shadow: none;
}
/* defeats the ugly hover effect of the calendar color dot on buttons */
.calendar-color-image {
-gtk-icon-effect: none;
}
/* adds a subtle shadow to the calendar color dot when it makes sense */
image.calendar-color-image,
button:active:not(:backdrop) .calendar-color-image,
button:checked:not(:backdrop) .calendar-color-image,
.calendars-list .calendar-color-image:not(:backdrop):not(:disabled),
.calendar-list .calendar-color-image:not(:backdrop):not(:disabled),
.sources-button:not(:backdrop):not(:disabled) .calendar-color-image {
-gtk-icon-shadow: 0 1px alpha(black, 0.1);
}
/* Date chooser */
/* month/year controls */
datechooser navigator { /* add some space between the two controls */
margin-right: 6px;
margin-left: 6px;
margin-bottom: 6px;
}
datechooser navigator label {
font-weight: bold;
}
datechooser navigator button {
padding: 0;
}
/* day names and week numbers*/
datechooser .weeknum,
datechooser .weekday {
color: @insensitive_fg_color;
font-size: smaller;
}
datechooser .weeknum:backdrop,
datechooser .weekday:backdrop {
color: @unfocused_insensitive_color;
}
/* days */
datechooser day {
transition-property: background-color;
transition-duration: 200ms;
}
datechooser day label {
transition-property: color;
transition-duration: 200ms;
}
datechooser day {
min-height: 32px;
min-width: 32px;
border-radius: 50%;
}
datechooser day.other-month:not(:hover),
datechooser day.other-month:backdrop {
color: alpha(currentColor, 0.1);
}
/* avoid the theme interfering with label colors */
datechooser day:selected label,
datechooser day.other-month label:hover,
datechooser day.other-month label:backdrop {
color: currentColor;
}
/* hovered days style */
datechooser day:hover:not(:backdrop) {
background-color: alpha(currentColor, 0.1);
}
datechooser day.other-month:hover:not(:backdrop) {
color: @insensitive_fg_color;
}
datechooser day:selected,
datechooser day:selected:hover {
color: @theme_selected_fg_color;
background-color: @theme_selected_bg_color;
font-weight: bold;
}
label.month-name {
font-size: 16pt;
font-weight: bold;
color: alpha(@theme_selected_bg_color, 0.75);
padding: 12px;
}
/* Week View CSS */
.week-header {
padding: 0px;
border-bottom: solid @borders 1px;
}
.week-header .week-number {
font-size: 16pt;
font-weight: bold;
padding: 12px 12px 18px 12px;
color: alpha(@theme_fg_color, 0.25);
}
.week-header.week-names, .week-header.week-temperature {
font-size: 10pt;
font-weight: bold;
color: alpha(@theme_fg_color, 0.55);
}
.week-header.week-dates {
font-size: 16pt;
font-weight: bold;
color: alpha(@theme_fg_color, 0.70);
}
.week-header.lines {
color: alpha(@theme_fg_color, 0.4);
}
.week-header .margin {
color: alpha(@theme_fg_color, 0.6);
}
.week-header .today {
color: @theme_selected_bg_color;
}
.week-view {
padding: 0px;
}
.week-view .hours {
font-size: 10pt;
color: alpha(@theme_fg_color, 0.8);
padding: 8px 12px;
}
.week-view .lines {
color: alpha(@theme_fg_color, 0.30);
}
weekgrid.now-strip {
background-color: alpha(@theme_selected_bg_color, 0.8);
margin: 0 0 0 1px;
min-height: 2px;
}
weekgrid:selected,
.week-header:selected {
background-color: alpha(@theme_selected_bg_color, 0.25);
}
.week-header:selected {
border: solid 1px alpha(@theme_selected_bg_color, 0.8);
}
/*
* Month cell
*/
monthcell {
border: solid 1px alpha(@borders, 0.3);
border-width: 1px 0 0 1px;
background: transparent;
padding: 1px 3px 0 3px;
transition: background-color 200ms;
}
monthcell:selected { background-color: alpha(@theme_selected_bg_color, 0.1); }
monthcell:selected label.day-label { font-weight: bold; }
monthcell:nth-child(7n + 1) { border-left-width: 0; }
monthcell.today { background-color: alpha(@theme_selected_bg_color, 0.25); }
monthcell:selected.today { background-color: alpha(@theme_selected_bg_color, 0.33); }
monthcell.out-of-month {
background-color: alpha(@theme_bg_color, 0.4);
}
monthcell label {
color: @theme_fg_color;
font-size: 0.9rem;
}
monthcell label.day-label {
font-size: 1rem;
}
monthcell.out-of-month label {
color: alpha(@theme_fg_color, 0.66);
}
monthcell:hover:not(.out-of-month) {
background-color: @theme_bg_color;
transition: background-color 200ms;
}
monthcell button {
padding: 0 4px;
border-radius: 0;
border-bottom: none;
border-right: none;
}
/*
* Month popover
*/
monthpopover { background: transparent; }
monthpopover > box {
margin: 4px;
border: 1px solid @borders;
box-shadow: 0px 0px 2px @wm_shadow;
padding: 12px;
background: @theme_bg_color;
}
+1 -1
View File
@@ -427,7 +427,7 @@ gcal_month_cell_class_init (GcalMonthCellClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/month-cell.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-month-cell.ui");
gtk_widget_class_bind_template_child (widget_class, GcalMonthCell, day_label);
gtk_widget_class_bind_template_child (widget_class, GcalMonthCell, header_box);
+99
View File
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalMonthCell" parent="GtkEventBox">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="expand">True</property>
<signal name="enter-notify-event" handler="enter_notify_event_cb" object="GcalMonthCell" swapped="no" />
<signal name="leave-notify-event" handler="leave_notify_event_cb" object="GcalMonthCell" swapped="no" />
<child>
<object class="GtkOverlay" id="overlay">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child type="overlay">
<object class="GtkBox" id="header_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="spacing">6</property>
<property name="margin">6</property>
<property name="margin-bottom">0</property>
<child>
<object class="GtkLabel" id="day_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<style>
<class name="day-label" />
</style>
</object>
</child>
<!-- Weather forecast -->
<child>
<object class="GtkImage" id="weather_icon">
<property name="can-focus">False</property>
<property name="visible">True</property>
<property name="pixel_size">16</property>
<property name="margin-start">12</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="temp_label">
<property name="visible">True</property>
<property name="can-focus">True</property>
<style>
<class name="dim-label" />
<class name="temp-label" />
</style>
</object>
</child>
</object>
</child>
<!-- HACK: in Gtk3, insensitive widgets receive no events. We "fix" this
limitation by adding an always-sensitive GtkEventBox above the event,
and when the event is insensitive, the event box's event window is
above it -->
<child type="overlay">
<object class="GtkEventBox" id="button_event_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="above-child" bind-source="overflow_button" bind-property="sensitive" bind-flags="default|invert-boolean|sync-create" />
<signal name="enter-notify-event" handler="enter_notify_event_cb" object="GcalMonthCell" swapped="no" />
<signal name="leave-notify-event" handler="leave_notify_event_cb" object="GcalMonthCell" swapped="no" />
<child>
<object class="GtkButton" id="overflow_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">end</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="overflow_button_clicked_cb" object="GcalMonthCell" swapped="no" />
<style>
<class name="flat" />
</style>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="overflow_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="ellipsize">end</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -721,7 +721,7 @@ gcal_month_popover_class_init (GcalMonthPopoverClass *klass)
1,
GCAL_TYPE_EVENT_WIDGET);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/month-popover.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-month-popover.ui");
gtk_widget_class_bind_template_callback (widget_class, close_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, new_event_button_clicked_cb);
+99
View File
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalMonthPopover" parent="GtkWindow">
<property name="modal">false</property>
<property name="opacity">0.0</property>
<property name="destroy-with-parent">true</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<!-- Day label & close button-->
<child>
<object class="GtkBox">
<property name="visible">true</property>
<child>
<object class="GtkLabel" id="day_label">
<property name="visible">true</property>
<property name="label">12</property>
<property name="xalign">0.0</property>
<property name="hexpand">true</property>
<attributes>
<attribute name="scale" value="2.25" />
</attributes>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">true</property>
<property name="halign">end</property>
<property name="valign">start</property>
<property name="relief">none</property>
<signal name="clicked" handler="close_button_clicked_cb" object="GcalMonthPopover" swapped="yes" />
<child>
<object class="GtkImage">
<property name="visible">true</property>
<property name="icon-name">window-close-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- Event list revealer -->
<child>
<object class="GtkRevealer" id="revealer">
<property name="reveal-child">false</property>
<property name="transition-duration">200</property>
<property name="transition-type">slide-down</property>
<property name="visible">true</property>
<child>
<object class="GtkBox" id="top_box">
<property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
<object class="DzlElasticBin" id="elastic">
<property name="visible">true</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-height">true</property>
<property name="visible">true</property>
<child>
<object class="GtkListBox" id="listbox">
<property name="visible">true</property>
<property name="selection-mode">none</property>
<style>
<class name="background" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- New Event button -->
<child>
<object class="GtkButton" id="new_event_button">
<property name="visible">true</property>
<property name="relief">none</property>
<property name="label" translatable="yes">New Event…</property>
<signal name="clicked" handler="new_event_button_clicked_cb" object="GcalMonthPopover" swapped="no" />
</object>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -2288,7 +2288,7 @@ gcal_month_view_class_init (GcalMonthViewClass *klass)
g_object_class_override_property (object_class, PROP_DATE, "active-date");
g_object_class_override_property (object_class, PROP_CONTEXT, "context");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/month-view.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-month-view.ui");
gtk_widget_class_bind_template_child (widget_class, GcalMonthView, label_0);
gtk_widget_class_bind_template_child (widget_class, GcalMonthView, label_1);
+145
View File
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalMonthView" parent="GtkContainer">
<!-- Header -->
<child type="header">
<object class="GtkBox">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<child>
<object class="GtkLabel" id="month_label">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="month-name" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="year_label">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">1.0</property>
<style>
<class name="secondary-label" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">true</property>
<property name="spacing">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkLabel" id="label_0">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_1">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_2">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_3">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_4">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_5">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_6">
<property name="visible">true</property>
<property name="can_focus">false</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- Grid -->
<child type="grid">
<object class="GtkGrid" id="grid">
<property name="visible">true</property>
<property name="can-focus">false</property>
<property name="row-homogeneous">true</property>
<property name="column-homogeneous">true</property>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -1651,7 +1651,7 @@ gcal_week_header_class_init (GcalWeekHeaderClass *kclass)
1,
GCAL_TYPE_EVENT_WIDGET);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/week-header.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-week-header.ui");
gtk_widget_class_bind_template_child (widget_class, GcalWeekHeader, expand_button);
gtk_widget_class_bind_template_child (widget_class, GcalWeekHeader, expand_button_box);
+208
View File
@@ -0,0 +1,208 @@
<?xml version="1.0"?>
<interface>
<template class="GcalWeekHeader" parent="GtkGrid">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">False</property>
<style>
<class name="week-header" />
</style>
<child>
<object class="GtkBox" id="header_labels_box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkLabel" id="month_label">
<property name="visible">True</property>
<property name="label">Month</property>
<property name="yalign">0</property>
<style>
<class name="primary-label" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="week_label">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label">Week</property>
<style>
<class name="secondary-label" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="year_label">
<property name="visible">True</property>
<property name="label">Year</property>
<property name="yalign">0</property>
<style>
<class name="secondary-label" />
</style>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkBox" id="expand_button_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
<child>
<object class="GtkButton" id="expand_button">
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
<property name="valign">end</property>
<property name="margin-bottom">6</property>
<signal name="clicked" handler="on_expand_action_activated" object="GcalWeekHeader" swapped="yes"/>
<style>
<class name="flat" />
<class name="circular" />
</style>
<child>
<object class="GtkImage" id="expand_button_image">
<property name="visible">True</property>
<property name="icon_name">go-down-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<signal name="button-press-event" handler="on_button_pressed" object="GcalWeekHeader" swapped="yes" />
<signal name="motion-notify-event" handler="on_motion_notify" object="GcalWeekHeader" swapped="yes" />
<signal name="button-release-event" handler="on_button_released" object="GcalWeekHeader" swapped="yes" />
<child>
<object class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">never</property>
<property name="propagate-natural-height">True</property>
<property name="margin-bottom">2</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
<property name="column-homogeneous">True</property>
<property name="hexpand">True</property>
<property name="column-spacing">6</property>
<property name="row-spacing">2</property>
<property name="margin-start">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
</object>
<packing>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</template>
<object class="GtkSizeGroup" id="sizegroup">
<property name="mode">horizontal</property>
<widgets>
<widget name="expand_button_box"/>
</widgets>
</object>
</interface>
+1 -1
View File
@@ -632,7 +632,7 @@ gcal_week_view_class_init (GcalWeekViewClass *klass)
g_object_class_override_property (object_class, PROP_DATE, "active-date");
g_object_class_override_property (object_class, PROP_CONTEXT, "context");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/week-view.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-week-view.ui");
gtk_widget_class_bind_template_child (widget_class, GcalWeekView, header);
gtk_widget_class_bind_template_child (widget_class, GcalWeekView, hours_bar);
+49
View File
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<interface>
<template class="GcalWeekView" parent="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<style>
<class name="week-view" />
</style>
<child>
<object class="GcalWeekHeader" id="header">
<property name="visible">True</property>
<signal name="event-activated" handler="on_event_activated" object="GcalWeekView" swapped="yes" />
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkDrawingArea" id="hours_bar">
<property name="visible">True</property>
<property name="height-request">2568</property>
<signal name="draw" handler="gcal_week_view_draw_hours" object="GcalWeekView" swapped="yes" />
</object>
</child>
<child>
<object class="GcalWeekGrid" id="week_grid">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<signal name="event-activated" handler="on_event_activated" object="GcalWeekView" swapped="yes" />
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>
+1 -1
View File
@@ -2063,7 +2063,7 @@ gcal_year_view_class_init (GcalYearViewClass *klass)
FALSE,
G_PARAM_READWRITE));
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/year-view.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/views/gcal-year-view.ui");
gtk_widget_class_bind_template_child (widget_class, GcalYearView, navigator);
gtk_widget_class_bind_template_child (widget_class, GcalYearView, sidebar);
+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 3.10 -->
<template class="GcalYearView" parent="GtkBox">
<style>
<class name="year-view"/>
</style>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<property name="vexpand">True</property>
<signal name="edge-overshot" handler="navigator_edge_overshot_cb" object="GcalYearView" swapped="yes"/>
<signal name="scroll-event" handler="navigator_scroll_event_cb" object="GcalYearView" swapped="yes"/>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<property name="vexpand">True</property>
<child>
<object class="GtkDrawingArea" id="navigator">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="events">GDK_POINTER_MOTION_MASK|GDK_BUTTON_MOTION_MASK|GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK|GDK_STRUCTURE_MASK</property>
<signal name="draw" handler="draw_navigator" object="GcalYearView" swapped="yes"/>
<signal name="button-press-event" handler="navigator_button_press_cb" object="GcalYearView" swapped="yes"/>
<signal name="button-release-event" handler="navigator_button_release_cb" object="GcalYearView" swapped="yes"/>
<signal name="motion-notify-event" handler="navigator_motion_notify_cb" object="GcalYearView" swapped="yes"/>
<signal name="drag-motion" handler="navigator_drag_motion_cb" object="GcalYearView" swapped="yes"/>
<signal name="drag-drop" handler="navigator_drag_drop_cb" object="GcalYearView" swapped="yes"/>
<signal name="drag-leave" handler="navigator_drag_leave_cb" object="GcalYearView" swapped="yes"/>
<style>
<class name="year-navigator"/>
</style>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">0</property>
<property name="pack_type">start</property>
</packing>
</child>
<child>
<object class="GtkBox" id="sidebar">
<property name="visible">True</property>
<property name="width_request">200</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkStack" id="navigator_stack">
<property name="visible">True</property>
<child>
<object class="GtkScrolledWindow" id="navigator_sidebar">
<property name="visible">True</property>
<property name="shadow_type">none</property>
<property name="vexpand">True</property>
<child>
<object class="GtkListBox" id="events_sidebar">
<property name="visible">True</property>
<property name="selection-mode">none</property>
<style>
<class name="sidebar"/>
</style>
</object>
</child>
</object>
<packing>
<property name="name">events-list</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<style>
<class name="sidebar"/>
</style>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="no_events_title">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Today</property>
<style>
<class name="sidebar-header"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="temp_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">temp</property>
<property name="label">foo</property>
<style>
<class name="temp-label" />
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkImage" id="weather_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="label" translatable="yes">No events</property>
<style>
<class name="dim-label"/>
<class name="italic-label"/>
</style>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
<property name="name">no-events</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="valign">end</property>
<property name="label" translatable="yes">Add Event…</property>
<signal name="clicked" handler="add_event_clicked_cb" object="GcalYearView" swapped="yes"/>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</template>
<object class="GtkPopover" id="popover">
<property name="relative_to">navigator</property>
<style>
<class name="events"/>
</style>
<signal name="closed" handler="popover_closed_cb" object="GcalYearView" swapped="yes"/>
</object>
</interface>
+1 -1
View File
@@ -344,7 +344,7 @@ gcal_weather_settings_class_init (GcalWeatherSettingsClass *klass)
g_object_class_install_properties (object_class, N_PROPS, properties);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/weather-settings.ui");
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/weather/gcal-weather-settings.ui");
gtk_widget_class_bind_template_child (widget_class, GcalWeatherSettings, show_weather_switch);
gtk_widget_class_bind_template_child (widget_class, GcalWeatherSettings, weather_auto_location_switch);
+77
View File
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.14"/>
<template class="GcalWeatherSettings" parent="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="margin">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkModelButton">
<property name="text" translatable="yes">_Weather</property>
<property name="menu-name">main</property>
<property name="inverted">True</property>
<property name="centered">True</property>
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">18</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">Show Weather</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="show_weather_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::active" handler="on_show_weather_changed_cb" object="GcalWeatherSettings" swapped="no" />
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="weather_auto_location_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">18</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">Automatic Location</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="weather_auto_location_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::active" handler="on_weather_auto_location_changed_cb" object="GcalWeatherSettings" swapped="no" />
</object>
</child>
</object>
</child>
<child>
<object class="GWeatherLocationEntry" id="weather_location_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="primary_icon_name">edit-find-symbolic</property>
<property name="primary_icon_activatable">False</property>
<property name="primary_icon_sensitive">False</property>
<signal name="changed" handler="on_weather_location_searchbox_changed_cb" object="GcalWeatherSettings" swapped="no" />
<signal name="activate" handler="on_weather_location_searchbox_changed_cb" object="GcalWeatherSettings" swapped="no" />
</object>
</child>
</template>
</interface>