aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
commitf49077cfb57ade9013674487a1f371da7c038709 (patch)
tree58ebabbe624409eed22ed13578eab3ed2d4d0206 /modules
parentd3c7420fb977fe5c337f2c917839a6e982a47902 (diff)
parent9fb0290d914e63512f6e3fc719b6b0249d787656 (diff)
downloadgsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.gz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.bz2
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.lz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.xz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.zst
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.zip
Merge branch 'gnome-2-30' into express2
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/e-book-shell-backend.c1
-rw-r--r--modules/calendar/e-cal-shell-backend.c7
-rw-r--r--modules/mail/e-mail-shell-content.c53
-rw-r--r--modules/mail/e-mail-shell-settings.c4
4 files changed, 43 insertions, 22 deletions
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index 1166cd61c3..74dbbfcf7f 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -169,6 +169,7 @@ book_shell_backend_ensure_sources (EShellBackend *shell_backend)
source_group = e_source_group_new (name, base_uri);
e_source_list_add_group (priv->source_list, source_group, -1);
+ on_this_computer = source_group;
g_object_unref (source_group);
}
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 5560d018cc..86750f0a32 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -166,6 +166,13 @@ cal_shell_backend_ensure_sources (EShellBackend *shell_backend)
* Open ... because of invalid URI" error. */
save_list = TRUE;
}
+ } else {
+ ESourceGroup *source_group;
+
+ source_group = e_source_group_new (name, base_uri);
+ e_source_list_add_group (priv->source_list, source_group, -1);
+ on_this_computer = source_group;
+ g_object_unref (source_group);
}
name = _("Personal");
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 79f001afc8..aa2718dcec 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -70,10 +70,9 @@ struct _EMailShellContentPrivate {
/* Signal handler IDs */
guint message_list_built_id;
- guint group_by_threads : 1;
- guint preview_visible : 1;
- guint suppress_message_selection : 1;
- guint show_deleted : 1;
+ guint group_by_threads : 1;
+ guint preview_visible : 1;
+ guint show_deleted : 1;
};
enum {
@@ -121,8 +120,9 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content,
MessageList *message_list)
{
EMailShellContentPrivate *priv = mail_shell_content->priv;
- EShellContent *shell_content;
EShellView *shell_view;
+ EShellWindow *shell_window;
+ EShellContent *shell_content;
GKeyFile *key_file;
gchar *uid;
@@ -132,6 +132,8 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content,
shell_content = E_SHELL_CONTENT (mail_shell_content);
shell_view = e_shell_content_get_shell_view (shell_content);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
key_file = e_shell_view_get_state_key_file (shell_view);
if (message_list->cursor_uid != NULL)
@@ -140,10 +142,11 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content,
else if (message_list->folder_uri == NULL)
uid = NULL;
- else if (mail_shell_content->priv->suppress_message_selection)
+ else if (e_shell_window_get_safe_mode (shell_window)) {
+ e_shell_window_set_safe_mode (shell_window, FALSE);
uid = NULL;
- else {
+ } else {
const gchar *folder_uri;
const gchar *key;
gchar *group_name;
@@ -566,29 +569,33 @@ mail_shell_content_set_folder (EMailReader *reader,
CamelFolder *folder,
const gchar *folder_uri)
{
+ EShell *shell;
EShellView *shell_view;
+ EShellWindow *shell_window;
EShellContent *shell_content;
+ EShellSettings *shell_settings;
EMailShellContentPrivate *priv;
EMailReaderIface *default_iface;
GtkWidget *message_list;
- CamelFolder *old_folder;
GKeyFile *key_file;
gchar *group_name;
const gchar *key;
- gboolean different_folder;
gboolean value;
GError *error = NULL;
priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader);
- old_folder = e_mail_reader_get_folder (reader);
+ shell_content = E_SHELL_CONTENT (reader);
+ shell_view = e_shell_content_get_shell_view (shell_content);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ shell = e_shell_window_get_shell (shell_window);
+ shell_settings = e_shell_get_shell_settings (shell);
+
message_list = e_mail_reader_get_message_list (reader);
message_list_freeze (MESSAGE_LIST (message_list));
- different_folder =
- (old_folder != NULL && folder != old_folder);
-
/* Chain up to interface's default set_folder() method. */
default_iface = g_type_default_interface_peek (E_TYPE_MAIL_READER);
default_iface->set_folder (reader, folder, folder_uri);
@@ -598,12 +605,6 @@ mail_shell_content_set_folder (EMailReader *reader,
mail_refresh_folder (folder, NULL, NULL);
- /* This function gets triggered several times at startup,
- * so we don't want to reset the message suppression state
- * unless we're actually switching to a different folder. */
- if (different_folder)
- priv->suppress_message_selection = FALSE;
-
/* This is a one-time-only callback. */
if (MESSAGE_LIST (message_list)->cursor_uid == NULL &&
priv->message_list_built_id == 0)
@@ -614,9 +615,6 @@ mail_shell_content_set_folder (EMailReader *reader,
/* Restore the folder's preview and threaded state. */
- shell_content = E_SHELL_CONTENT (reader);
- shell_view = e_shell_content_get_shell_view (shell_content);
-
key_file = e_shell_view_get_state_key_file (shell_view);
group_name = g_strdup_printf ("Folder %s", folder_uri);
@@ -637,6 +635,17 @@ mail_shell_content_set_folder (EMailReader *reader,
g_clear_error (&error);
}
+ /* XXX This is a little confusing and needs rethought. The
+ * EShellWindow:safe-mode property blocks automatic message
+ * selection, but the "mail-safe-list" shell setting blocks
+ * both the preview pane and automatic message selection. */
+ if (e_shell_settings_get_boolean (shell_settings, "mail-safe-list")) {
+ e_shell_settings_set_boolean (
+ shell_settings, "mail-safe-list", FALSE);
+ e_shell_window_set_safe_mode (shell_window, TRUE);
+ value = FALSE;
+ }
+
e_mail_shell_content_set_preview_visible (
E_MAIL_SHELL_CONTENT (shell_content), value);
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 1434951b81..48fd042d58 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -166,6 +166,10 @@ e_mail_shell_settings_init (EShell *shell)
"/apps/evolution/mail/format/reply_style");
e_shell_settings_install_property_for_key (
+ "mail-safe-list",
+ "/apps/evolution/mail/display/safe_list");
+
+ e_shell_settings_install_property_for_key (
"mail-show-animated-images",
"/apps/evolution/mail/display/animated_images");