From 0014b8c62e298231da5180a298360a0a24fb2095 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Wed, 8 Aug 2007 06:47:01 +0000 Subject: Added a command line option to disable preview/selection for crash on select. svn path=/trunk/; revision=33967 --- mail/ChangeLog | 7 +++++++ mail/em-folder-browser.c | 10 ++++++++++ mail/evolution-mail.schemas.in | 15 +++++++++++++++ shell/ChangeLog | 7 +++++++ 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 + + * 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 ** 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 @@ -400,6 +400,21 @@ + + /schemas/apps/evolution/mail/display/safe_list + /apps/evolution/mail/display/safe_list + evolution-mail + bool + false + + Hides the per-folder preview and removes the selection + + 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. + + + + /schemas/apps/evolution/mail/display/paned_size /apps/evolution/mail/display/paned_size 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 + + ** 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 * 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) { -- cgit v1.2.3