diff options
author | Larry Ewing <lewing@novell.com> | 2004-07-30 15:37:02 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-07-30 15:37:02 +0800 |
commit | c228009c175669bc3a017ca7a7c7cc53c40841ab (patch) | |
tree | 52b71bd7cafbaf72d6d5fcd0d374d46585086635 /calendar/gui/dialogs | |
parent | 85eab7b3785b928852d6037d9076bebfffe39ca2 (diff) | |
download | gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar.gz gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar.bz2 gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar.lz gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar.xz gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.tar.zst gsoc2013-evolution-c228009c175669bc3a017ca7a7c7cc53c40841ab.zip |
hide dialog items that don't apply when editing properties.
004-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.
svn path=/trunk/; revision=26773
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.c | 25 |
1 files changed, 22 insertions, 3 deletions
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; } |