[gnome-calendar/time-selector] edit-dialog: properly set time selector's sensivity
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/time-selector] edit-dialog: properly set time selector's sensivity
- Date: Thu, 18 Dec 2014 13:21:52 +0000 (UTC)
commit 471b75dffe9c63c4cfd4a7b8211bd8701f599d3b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Dec 18 11:21:40 2014 -0200
edit-dialog: properly set time selector's sensivity
Instead of simply not settings them at all, it is now set according to the writable and all day values.
src/gcal-edit-dialog.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index f7b9f74..443d890 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -703,6 +703,17 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
gtk_widget_set_sensitive (priv->all_day_check, writable);
+ if (!writable || (writable && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->all_day_check))))
+ {
+ gtk_widget_set_sensitive (priv->start_time_selector, FALSE);
+ gtk_widget_set_sensitive (priv->end_time_selector, FALSE);
+ }
+ else
+ {
+ gtk_widget_set_sensitive (priv->start_time_selector, TRUE);
+ gtk_widget_set_sensitive (priv->end_time_selector, TRUE);
+ }
+
gtk_button_set_label (GTK_BUTTON (priv->done_button),
writable ? _("Save") : _("Done"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]