edit-dialog: wrap in a scrolled window
As we're adding more and more widgets in the Edit dialog, it is now growing too tall to fit normal screens. Thus, wrap it in a scrolled window, and let the content height cover 75% of the main window at most.
This commit is contained in:
+372
-362
@@ -122,194 +122,153 @@
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<property name="visible">true</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="border_width">0</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="main_grid">
|
||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="border_width">18</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</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="GtkLabel" id="summary_label">
|
||||
<object class="GtkGrid" id="main_grid">
|
||||
<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="update_summary" 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" />
|
||||
<property name="border_width">18</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GcalDateSelector" id="start_date_selector">
|
||||
<object class="GtkLabel" id="summary_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="notify::date" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
<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="can_focus">False</property>
|
||||
<property name="label">-</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="GcalDateSelector" id="end_date_selector">
|
||||
<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>
|
||||
<signal name="notify::date" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
<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="update_summary" 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>
|
||||
</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="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="GcalTimeSelector" id="start_time_selector">
|
||||
<object class="GcalDateSelector" id="start_date_selector">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
<signal name="notify::date" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -320,249 +279,300 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GcalTimeSelector" id="end_time_selector">
|
||||
<object class="GcalDateSelector" id="end_date_selector">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
<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>
|
||||
</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="all_day_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>
|
||||
<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="background" />
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="alarms_button">
|
||||
<object class="GtkBox">
|
||||
<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>
|
||||
<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="hexpand">True</property>
|
||||
<property name="xalign">0.0</property>
|
||||
<property name="label" translatable="yes">Add reminder…</property>
|
||||
<property name="label">-</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<object class="GcalTimeSelector" id="end_time_selector">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">pan-down-symbolic</property>
|
||||
<property name="can_focus">True</property>
|
||||
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||
</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="repeat_type_changed" 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="repeat_duration_changed" 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>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">4</property>
|
||||
</packing>
|
||||
</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>
|
||||
</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="update_location" 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" id="scrolled_window">
|
||||
<property name="height_request">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">
|
||||
<object class="GtkCheckButton" id="all_day_check">
|
||||
<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>
|
||||
<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="all_day_changed_cb" object="GcalEditDialog" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</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="action_button_clicked" object="GcalEditDialog" swapped="no"/>
|
||||
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
|
||||
<child>
|
||||
<object class="GtkLabel" id="delete_label">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Delete Event</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="repeat_type_changed" 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="repeat_duration_changed" 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>
|
||||
</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="update_location" 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="action_button_clicked" 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>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -56,6 +56,8 @@ struct _GcalEditDialog
|
||||
GtkWidget *title_label;
|
||||
GtkWidget *subtitle_label;
|
||||
|
||||
GtkWidget *scrolled_window;
|
||||
|
||||
GtkWidget *lock;
|
||||
GtkWidget *source_image;
|
||||
GtkWidget *source_label;
|
||||
@@ -300,6 +302,19 @@ remove_recurrence_properties (GcalEvent *event)
|
||||
e_cal_component_rescan (comp);
|
||||
}
|
||||
|
||||
static void
|
||||
transient_size_allocate_cb (GcalEditDialog *self)
|
||||
{
|
||||
GtkAllocation alloc;
|
||||
GtkWindow *transient;
|
||||
|
||||
transient = gtk_window_get_transient_for (GTK_WINDOW (self));
|
||||
gtk_widget_get_allocation (GTK_WIDGET (transient), &alloc);
|
||||
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (self->scrolled_window),
|
||||
MAX (400, (gint) (0.75 * alloc.height)));
|
||||
}
|
||||
|
||||
static void
|
||||
update_location (GtkEntry *entry,
|
||||
GParamSpec *pspec,
|
||||
@@ -659,6 +674,12 @@ gcal_edit_dialog_constructed (GObject* object)
|
||||
gtk_widget_insert_action_group (GTK_WIDGET (self),
|
||||
"edit",
|
||||
G_ACTION_GROUP (self->action_group));
|
||||
|
||||
/* Watch the main window and adapt the maximum size */
|
||||
g_signal_connect_swapped (gtk_window_get_transient_for (GTK_WINDOW (self)),
|
||||
"size-allocate",
|
||||
G_CALLBACK (transient_size_allocate_cb),
|
||||
self);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -801,6 +822,7 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, repeat_duration_combo);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, repeat_duration_stack);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, repeat_limits_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, scrolled_window);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, source_image);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, sources_popover);
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalEditDialog, until_date_selector);
|
||||
|
||||
Reference in New Issue
Block a user