diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 10 | ||||
-rw-r--r-- | mail/evolution-mail.schemas.in | 15 | ||||
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/main.c | 12 |
5 files changed, 49 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index ae9e32289d..72e7d5fcce 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2007-08-08 Srinivasa Ragavan <sragavan@novell.com> + + * em-folder-browser.c: (emfb_set_folder): Use the gconf key to + unselect mail and preview. + * evolution-mail.schemas.in: Add a new gconf key to have a safe view + if the selected mail crashes. + 2007-08-07 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #464312 diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 7af149fba5..3778a5f5f4 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -1894,8 +1894,18 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) if (folder) { char *sstate; int state; + gboolean safe; GConfClient *gconf = mail_config_get_gconf_client(); + safe = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/safe_list", NULL); + if (safe) { + if (camel_object_meta_set(emfv->folder, "evolution:show_preview", "0") && + camel_object_meta_set(emfv->folder, "evolution:selected_uid", NULL)) { + camel_object_state_write(emfv->folder); + } + gconf_client_set_bool (gconf, "/apps/evolution/mail/display/safe_list", FALSE, NULL); + } + mail_refresh_folder(folder, NULL, NULL); emfb->priv->folder_changed_id = camel_object_hook_event(folder, "folder_changed", diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in index cf8fd538fe..df906cd5cd 100644 --- a/mail/evolution-mail.schemas.in +++ b/mail/evolution-mail.schemas.in @@ -401,6 +401,21 @@ </schema> <schema> + <key>/schemas/apps/evolution/mail/display/safe_list</key> + <applyto>/apps/evolution/mail/display/safe_list</applyto> + <owner>evolution-mail</owner> + <type>bool</type> + <default>false</default> + <locale name="C"> + <short>Hides the per-folder preview and removes the selection</short> + <long> + This should be a once-readable option and resetted to false after read. This unselects the + mail in the list and removes the preview for that folder. + </long> + </locale> + </schema> + + <schema> <key>/schemas/apps/evolution/mail/display/paned_size</key> <applyto>/apps/evolution/mail/display/paned_size</applyto> <owner>evolution-mail</owner> diff --git a/shell/ChangeLog b/shell/ChangeLog index 2e6ed926f6..d1410e0a10 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2007-08-08 Srinivasa Ragavan <sragavan@novell.com> + + ** Add a new command line option to disable crash-on-select mails, + tasks, contacts. + + * main.c: (main): Added a new command line option. + 2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net> * e-shell-window-command.c: (view_statusbar_item_toggled_handler), diff --git a/shell/main.c b/shell/main.c index 76490cf1e6..c84fb39f2e 100644 --- a/shell/main.c +++ b/shell/main.c @@ -103,7 +103,7 @@ static gboolean killev = FALSE; static gboolean force_migrate = FALSE; #endif static gboolean disable_eplugin = FALSE; - +static gboolean disable_preview = FALSE; static gboolean idle_cb (gchar **uris); static char *default_component_id = NULL; @@ -470,6 +470,8 @@ static const GOptionEntry options[] = { N_("Send the debugging output of all components to a file."), NULL }, { "disable-eplugin", '\0', 0, G_OPTION_ARG_NONE, &disable_eplugin, N_("Disable loading of any plugins."), NULL }, + { "disable-preview", '\0', 0, G_OPTION_ARG_NONE, &disable_preview, + N_("Disable preview pane of Mail, Contacts and Tasks."), NULL }, { "setup-only", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &setup_only, NULL, NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &remaining_args, NULL, NULL }, @@ -536,7 +538,13 @@ main (int argc, char **argv) destroy_config (client); } #endif - + if (disable_preview) { + gconf_client_set_bool (client, "/apps/evolution/mail/display/show_preview", FALSE, NULL); + gconf_client_set_bool (client, "/apps/evolution/mail/display/safe_list", TRUE, NULL); + gconf_client_set_bool (client, "/apps/evolution/addressbook/display/show_preview", FALSE, NULL); + gconf_client_set_bool (client, "/apps/evolution/calendar/display/show_task_preview", FALSE, NULL); + } + setup_segv_redirect (); if (evolution_debug_log) { |