[gnome-calendar] edit-dialog: properly set time selector's sensivity
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] edit-dialog: properly set time selector's sensivity
- Date: Thu, 18 Dec 2014 14:59:35 +0000 (UTC)
commit fa7bc69192d061a9b279c73660b80979738942d5
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]