[gnome-calendar/gnome-3-20] edit-dialog: fix sensitivity of time buttons
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-20] edit-dialog: fix sensitivity of time buttons
- Date: Wed, 14 Sep 2016 15:24:38 +0000 (UTC)
commit e4e0ba2496b5182b3587c6a543f2cc3b1b43ad83
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Sep 14 12:19:44 2016 -0300
edit-dialog: fix sensitivity of time buttons
data/ui/edit-dialog.ui | 2 --
src/gcal-edit-dialog.c | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/data/ui/edit-dialog.ui b/data/ui/edit-dialog.ui
index 501d63d..cd3e61b 100644
--- a/data/ui/edit-dialog.ui
+++ b/data/ui/edit-dialog.ui
@@ -238,7 +238,6 @@
<object class="GcalTimeSelector" id="start_time_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="sensitive" bind-source="GcalEditDialog" bind-property="writable"
bind-flags="default" />
</object>
<packing>
<property name="position">2</property>
@@ -272,7 +271,6 @@
<object class="GcalTimeSelector" id="end_time_selector">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="sensitive" bind-source="GcalEditDialog" bind-property="writable"
bind-flags="default" />
</object>
<packing>
<property name="position">2</property>
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index c350722..c26ac97 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -631,6 +631,8 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
fill_sources_menu (dialog);
/* Load new event data */
+ gcal_edit_dialog_set_writable (dialog, gcal_manager_is_client_writable (dialog->manager, source));
+
/* summary */
summary = gcal_event_get_summary (event);
@@ -667,9 +669,9 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
gcal_time_selector_set_time (GCAL_TIME_SELECTOR (dialog->end_time_selector), date_end);
/* all_day */
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->all_day_check), all_day);
gtk_widget_set_sensitive (dialog->start_time_selector, dialog->writable && !all_day);
gtk_widget_set_sensitive (dialog->end_time_selector, dialog->writable && !all_day);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->all_day_check), all_day);
/* location */
gtk_entry_set_text (GTK_ENTRY (dialog->location_entry), gcal_event_get_location (event));
@@ -679,8 +681,6 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
gcal_event_get_description (event),
-1);
- gcal_edit_dialog_set_writable (dialog, gcal_manager_is_client_writable (dialog->manager, source));
-
g_clear_pointer (&date_start, g_date_time_unref);
g_clear_pointer (&date_end, g_date_time_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]