diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.c | 25 |
2 files changed, 29 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index e5e85fd19d..a75db139a2 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2004-07-28 Larry Ewing <lewing@novell.com> + + * gui/dialogs/calendar-setup.c (dialog_hide_unused_options): hide + dialog items that don't apply when editing properties. + (general_update_dialog): check to make sure we have a source + before checking its state. + 2004-07-27 JP Rosevear <jpr@novell.com> Fixes #62006 diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 213d0ac20f..01b63b9c1d 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -371,7 +371,7 @@ general_update_dialog (SourceDialog *source_dialog) gboolean remote = FALSE; gboolean mutable = source_group_is_mutable (source_dialog->source_group); - if (e_source_get_readonly (source_dialog->source)) + if (source_dialog->source && e_source_get_readonly (source_dialog->source)) gtk_widget_set_sensitive (glade_xml_get_widget (source_dialog->gui_xml, "settings-table"), FALSE); /* These are calendar specific so make sure we have them */ @@ -595,6 +595,23 @@ dialog_to_source (SourceDialog *source_dialog) } static void +dialog_hide_unused_options (SourceDialog *source_dialog) +{ + ESource *source = source_dialog->source; + + if (source && (!source_is_remote (source) || !source_group_is_mutable (source_dialog->source_group))) { + if (source_dialog->uri_hbox) + gtk_widget_hide (source_dialog->uri_hbox); + if (source_dialog->uri_label) + gtk_widget_hide (source_dialog->uri_label); + if (source_dialog->refresh_label) + gtk_widget_hide (source_dialog->refresh_label); + if (source_dialog->refresh_hbox) + gtk_widget_hide (source_dialog->refresh_hbox); + } +} + +static void source_group_changed_sensitive (SourceDialog *source_dialog) { source_dialog->source_group = @@ -733,7 +750,8 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source) g_list_free (icon_list); } - gtk_widget_show_all (source_dialog->window); + dialog_hide_unused_options (source_dialog); + gtk_widget_show (source_dialog->window); return TRUE; } @@ -862,7 +880,8 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source) g_list_free (icon_list); } - gtk_widget_show_all (source_dialog->window); + dialog_hide_unused_options (source_dialog); + gtk_widget_show (source_dialog->window); return TRUE; } |