edit-dialog : correct time row visibility
The revealer widget in edit dialog's event time interval row uses to hide the time selector widgets when the event is checked as all-day and also reveal the widgets when not checked as all-day. Sometimes edit dialog may turn on the visibility of the time selector widgets when the revealer's animation already starts, causing a flickering of the widgets. We remove the revealer widget and leave edit dialog to toggle the visibility of time selector widgets when needed. https://bugzilla.gnome.org/show_bug.cgi?id=771572
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
d9a775e2fe
commit
e56bbc78a8
+27
-45
@@ -287,23 +287,13 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkRevealer">
|
<object class="GtkLabel" id="times_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin-top">12</property>
|
<property name="xalign">1.0</property>
|
||||||
<property name="reveal_child" bind-source="all_day_check" bind-property="active" bind-flags="default|invert-boolean|sync-create" />
|
<property name="label" translatable="yes">Time</property>
|
||||||
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
|
<style>
|
||||||
<signal name="notify::child-revealed" handler="update_revealer_visibility_cb" swapped="no" />
|
<class name="dim-label"/>
|
||||||
<signal name="notify::reveal-child" handler="update_revealer_visibility_cb" swapped="no" />
|
</style>
|
||||||
<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>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
@@ -311,41 +301,33 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkRevealer">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin-top">12</property>
|
|
||||||
<property name="reveal_child" bind-source="all_day_check" bind-property="active" bind-flags="default|invert-boolean|sync-create" />
|
|
||||||
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
|
|
||||||
<signal name="notify::child-revealed" handler="update_revealer_visibility_cb" swapped="no" />
|
|
||||||
<signal name="notify::reveal-child" handler="update_revealer_visibility_cb" swapped="no" />
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GcalTimeSelector" id="start_time_selector">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="spacing">6</property>
|
<property name="can_focus">True</property>
|
||||||
<child>
|
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
|
||||||
<object class="GcalTimeSelector" id="start_time_selector">
|
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||||
<property name="visible">True</property>
|
</object>
|
||||||
<property name="can_focus">True</property>
|
</child>
|
||||||
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
<child>
|
||||||
</object>
|
<object class="GtkLabel">
|
||||||
</child>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="can_focus">False</property>
|
||||||
<object class="GtkLabel">
|
<property name="label">-</property>
|
||||||
<property name="visible">True</property>
|
</object>
|
||||||
<property name="can_focus">False</property>
|
</child>
|
||||||
<property name="label">-</property>
|
<child>
|
||||||
</object>
|
<object class="GcalTimeSelector" id="end_time_selector">
|
||||||
</child>
|
<property name="visible">True</property>
|
||||||
<child>
|
<property name="can_focus">True</property>
|
||||||
<object class="GcalTimeSelector" id="end_time_selector">
|
<property name="sensitive" bind-source="GcalEditDialog" bind-property="writable" bind-flags="default" />
|
||||||
<property name="visible">True</property>
|
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<signal name="notify::time" handler="sync_datetimes" object="GcalEditDialog" swapped="yes" />
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -356,15 +356,6 @@ fix_reminders_label_height_cb (GtkWidget *summary_label,
|
|||||||
gtk_widget_set_size_request (reminders_label, -1, allocation->height);
|
gtk_widget_set_size_request (reminders_label, -1, allocation->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
update_revealer_visibility_cb (GtkRevealer *revealer)
|
|
||||||
{
|
|
||||||
if (gtk_revealer_get_reveal_child (revealer))
|
|
||||||
gtk_widget_set_visible (GTK_WIDGET (revealer), TRUE);
|
|
||||||
else if (!gtk_revealer_get_child_revealed (revealer))
|
|
||||||
gtk_widget_set_visible (GTK_WIDGET (revealer), FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sync_datetimes (GcalEditDialog *self,
|
sync_datetimes (GcalEditDialog *self,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
@@ -626,7 +617,6 @@ gcal_edit_dialog_class_init (GcalEditDialogClass *klass)
|
|||||||
gtk_widget_class_bind_template_callback (widget_class, sync_datetimes);
|
gtk_widget_class_bind_template_callback (widget_class, sync_datetimes);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, update_summary);
|
gtk_widget_class_bind_template_callback (widget_class, update_summary);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, update_location);
|
gtk_widget_class_bind_template_callback (widget_class, update_location);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, update_revealer_visibility_cb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user