From 82f2740249a309e51d19a7e5d539f41b74fa6a36 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 25 Sep 2002 21:40:17 +0000 Subject: If one of the allowed types is "type/*", allow anything starting with * e-shell-folder-selection-dialog.c (check_folder_type_valid): If one of the allowed types is "type/*", allow anything starting with "type/". (impl_clicked): If the first allowed type is "type/*", pass "type" to e_shell_show_folder_creation_dialog. * evolution-folder-selector-button.c (evolution_folder_selector_button_set_uri): Handle "type/*" as an allowed type. * e-shell-settings-dialog.c (e_shell_settings_dialog_show_type): If there are no pages for the current folder type, try the parent type (eg, "mail" for "mail/public"). * e-shell-config-autocompletion.c (e_shell_config_autocompletion_create_widget): Use "contacts/*" as the allowed folder type. svn path=/trunk/; revision=18220 --- shell/e-shell-settings-dialog.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'shell/e-shell-settings-dialog.c') diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index f0f5101d65..a00f55bfc6 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -341,7 +341,7 @@ void e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *type) { EShellSettingsDialogPrivate *priv; - gpointer value; + gpointer key, value; int page; g_return_if_fail (dialog != NULL); @@ -350,7 +350,17 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ priv = dialog->priv; - value = g_hash_table_lookup (priv->types, type); + if (!g_hash_table_lookup_extended (priv->types, type, &key, &value)) { + char *slash, *supertype; + + slash = strchr (type, '/'); + if (slash) { + supertype = g_strndup (type, slash - type); + value = g_hash_table_lookup (priv->types, type); + g_free (supertype); + } else + value = NULL; + } page = GPOINTER_TO_INT (value); e_multi_config_dialog_show_page (E_MULTI_CONFIG_DIALOG (dialog), page); -- cgit v1.2.3