diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-08 09:39:21 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-08 09:39:21 +0800 |
commit | fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817 (patch) | |
tree | 032f32319f3465855cce2e52944838c9b63a471b /mail/message-list.c | |
parent | 235dc4e759f1781b34a985233c6b707613db41ad (diff) | |
download | gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar.gz gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar.bz2 gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar.lz gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar.xz gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.tar.zst gsoc2013-evolution-fb6caf533c7629ff9a7ffbdfa1eafd9afd5e7817.zip |
Use gconf to get the paned size. (folder_browser_set_message_preview):
2003-01-07 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser.c (save_cursor_pos): Use gconf to get the paned
size.
(folder_browser_set_message_preview): Same.
(folder_browser_toggle_hide_deleted): Use gconf to set the
hide-deleted state.
(folder_browser_set_message_display_style): Same but for the
message_display_style.
(fb_resize_cb): Save the paned_size via gconf.
(paned_size_changed): Callback for when the paned_size gets
changed. Change the folder-browser's paned size to the new
setting.
(folder_browser_gui_init): Listen to changes to the paned_size and
also get the initial size from gconf.
* message-list.c (message_list_set_folder): Use gconf.
(regen_list_regen): Use gconf.
* message-browser.c (transfer_msg_done): Use gconf to get the
hide_deleted setting.
* mail-account-gui.c (sig_add_new_signature): Use gconf.
* folder-browser-ui.c (folder_browser_ui_add_list): Use gconf.
* folder-browser.c (save_cursor_pos): Use gconf.
(folder_browser_set_message_preview): Same.
(folder_browser_toggle_hide_deleted): Here too.
(folder_browser_set_message_display_style): And here.
(folder_browser_gui_init): Here too.
(done_message_selected): And here.
* mail-config.c (mail_config_get_thread_subject): Removed.
(mail_config_set_thread_subject): Removed.
(mail_config_get_empty_trash_on_exit): Removed.
(mail_config_set_empty_trash_on_exit): Removed.
(mail_config_get_last_filesel_dir): Removed.
(mail_config_set_last_filesel_dir): Removed.
(mail_config_get_hide_deleted): Removed.
(mail_config_set_hide_deleted): Removed.
(mail_config_get_paned_size): Removed.
(mail_config_set_paned_size): Removed.
(mail_config_get_send_html): Removed.
(mail_config_set_send_html): Removed.
(mail_config_get_confirm_unwanted_html): Removed.
(mail_config_set_confirm_unwanted_html): Removed.
(mail_config_get_citation_highlight): Removed.
(mail_config_set_citation_highlight): Removed.
(mail_config_get_citation_color): Removed.
(mail_config_set_citation_color): Removed.
(mail_config_get_do_seen_timeout): Removed.
(mail_config_set_do_seen_timeout): Removed.
(mail_config_get_mark_as_seen_timeout): Removed.
(mail_config_set_mark_as_seen_timeout): Removed.
(mail_config_get_prompt_empty_subject): Removed.
(mail_config_set_prompt_empty_subject): Removed.
(mail_config_get_prompt_only_bcc): Removed.
(mail_config_set_prompt_only_bcc): Removed.
(mail_config_get_confirm_expunge): Removed.
(mail_config_set_confirm_expunge): Removed.
(mail_config_get_confirm_goto_next_folder): Removed.
(mail_config_set_confirm_goto_next_folder): Removed.
(mail_config_get_goto_next_folder): Removed.
(mail_config_set_goto_next_folder): Removed.
(mail_config_get_http_mode): Removed.
(mail_config_set_http_mode): Removed.
(mail_config_get_default_forward_style): Removed.
(mail_config_set_default_forward_style): Removed.
(mail_config_get_default_reply_style): Removed.
(mail_config_set_default_reply_style): Removed.
(mail_config_get_message_display_style): Removed.
(mail_config_set_message_display_style): Removed.
(mail_config_get_default_charset): Removed.
(mail_config_set_default_charset): Removed.
(mail_config_get_x_mailer_display_style): Removed.
(mail_config_set_x_mailer_display_style): Removed.
* subscribe-dialog.c (populate_store_list): Use the list of
accounts. We can't get the list of sources anymore.
(populate_store_foreach): Updated.
* mail-callbacks.c (guess_me_from_accounts): Use account->enabled.
(mail_generate_reply): Same.
(empty_trash): Here too.
* mail-accounts.c (account_delete_clicked): Use account->enabled
rather than source->enabled.
(account_able_clicked): Same.
(account_cursor_change): Here too.
(mail_accounts_load): And here.
* component-factory.c (owner_unset_cb): Use gconf empty-on-exit
settings.
(mail_load_storages): Use account->enabled rather than
account->source->enabled. The struct changed.
* mail-composer-prefs.c (sig_add): Get the send_html pref from gconf.
* message-tag-followup.c (target_date_new): Use gconf.
* mail-config.c (mail_config_get_week_start_day): Removed.
* mail-tools.c (mail_tool_quote_message): Use gconf here too, but
we don't need to parse the colour - just use it as a raw string.
(mail_tool_forward_message): Use gconf.
* mail-format.c (mail_format_data_wrapper_write_to_stream): Use gconf.
(write_headers): Use gconf.
(handle_text_plain): Same.
* mail-display.c (mail_text_write): Updated to use gconf and parse
GdkColour strings.
(on_url_requested): Updated to use gconf.
* mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Use gconf
rather than the old mail-config APIs which will be removed.
(ask_confirm_for_empty_subject): Same.
(ask_confirm_for_only_bcc): Here too.
(composer_get_message): And here.
(create_msg_composer): Same.
(transfer_msg_done): Again here.
(delete_msg): Here too.
(confirm_expunge): And finally here.
* mail-config.c (mail_config_write): Use gconf.
(mail_config_get_sources): Removed.
* mail-account-gui.c (mail_account_gui_save): No need to save
enabled-state anymore for a source.
* mail-config-druid.c (wizard_finish_cb): Instead of setting
account->source->enabled to TRUE, just set account->enabled to
TRUE. The structures changed a bit.
* mail-send-recv.c (mail_send_receive): Get the list of accounts
instead of sources, and pass them along to build_dialogue. I'm
trying to get rid of the mail_config_get_sources() api.
(mail_autoreceive_setup): Here too.
* mail-config.c (mail_config_get_filter_log): Removed.
(mail_config_set_filter_log): Removed.
(mail_config_get_filter_log_path): Removed.
(mail_config_set_filter_log_path): Removed.
(mail_config_get_new_mail_notify): Removed.
(mail_config_set_new_mail_notify): Removed.
(mail_config_get_new_mail_notify_sound_file): Removed.
(mail_config_set_new_mail_notify_sound_file): Removed.
* mail-session.c (main_get_filter_driver): Updated to use the
gconf settings.
svn path=/trunk/; revision=19271
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index e9f8856000..522a9a11c9 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -32,6 +32,9 @@ #include <glib/gunicode.h> +#include <gconf/gconf.h> +#include <gconf/gconf-client.h> + #include <gal/util/e-util.h> #include <gal/widgets/e-gui-utils.h> #include <gal/e-table/e-cell-text.h> @@ -2101,20 +2104,22 @@ message_changed (CamelObject *o, gpointer event_data, gpointer user_data) void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, gboolean outgoing) { + gboolean hide_deleted; + GConfClient *gconf; CamelException ex; - + g_return_if_fail (message_list != NULL); g_return_if_fail (IS_MESSAGE_LIST (message_list)); - + if (message_list->folder == camel_folder) return; - + camel_exception_init (&ex); - + /* cancel any outstanding regeneration requests */ if (message_list->regen) { GList *l = message_list->regen; - + while (l) { struct _mail_msg *mm = l->data; @@ -2123,8 +2128,8 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, g l = l->next; } } - - clear_tree(message_list); + + clear_tree (message_list); if (message_list->folder) { hide_save_state(message_list); @@ -2134,41 +2139,41 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, g message_changed, message_list); camel_object_unref (message_list->folder); } - + if (message_list->thread_tree) { camel_folder_thread_messages_unref(message_list->thread_tree); message_list->thread_tree = NULL; } - + message_list->folder = camel_folder; - + if (message_list->cursor_uid) { g_free(message_list->cursor_uid); message_list->cursor_uid = NULL; g_signal_emit(message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL); } - + if (camel_folder) { /* Setup the strikeout effect for non-trash folders */ if (!(camel_folder->folder_flags & CAMEL_FOLDER_IS_TRASH)) { ECell *cell; - + cell = e_table_extras_get_cell (message_list->extras, "render_date"); g_object_set (cell, "strikeout_column", COL_DELETED, NULL); - + cell = e_table_extras_get_cell (message_list->extras, "render_text"); g_object_set (cell, "strikeout_column", COL_DELETED, NULL); - + cell = e_table_extras_get_cell (message_list->extras, "render_size"); g_object_set (cell, "strikeout_column", COL_DELETED, NULL); } - + /* Build the etree suitable for this folder */ message_list_setup_etree (message_list, outgoing); @@ -2179,8 +2184,10 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, g camel_object_ref (camel_folder); - message_list->hidedeleted = mail_config_get_hide_deleted () - && !(camel_folder->folder_flags & CAMEL_FOLDER_IS_TRASH); + /* FIXME: probably listen for updates to show_deleted? */ + gconf = gconf_client_get_default (); + hide_deleted = !gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_deleted", NULL); + message_list->hidedeleted = hide_deleted && !(camel_folder->folder_flags & CAMEL_FOLDER_IS_TRASH); hide_load_state (message_list); mail_regen_list (message_list, message_list->search, NULL, NULL); @@ -2194,7 +2201,7 @@ on_cursor_activated_idle (gpointer data) { MessageList *message_list = data; ESelectionModel *esm = e_tree_get_selection_model (message_list->tree); - gint selected = e_selection_model_selected_count (esm); + int selected = e_selection_model_selected_count (esm); if (selected == 1 && message_list->cursor_uid) { d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid)); @@ -2594,7 +2601,9 @@ regen_list_regen (struct _mail_msg *mm) { struct _regen_list_msg *m = (struct _regen_list_msg *)mm; GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL; + gboolean thread_subject; CamelMessageInfo *info; + GConfClient *gconf; int i; /* if we have hidedeleted on, use a search to find it out, merge with existing search if set */ @@ -2696,15 +2705,17 @@ regen_list_regen (struct _mail_msg *mm) } MESSAGE_LIST_UNLOCK(m->ml, hide_lock); - + + gconf = gconf_client_get_default (); + thread_subject = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/thread_subject", NULL); + if (!camel_operation_cancel_check(mm->cancel)) { /* update/build a new tree */ if (m->dotree) { if (m->tree) - camel_folder_thread_messages_apply(m->tree, showuids); + camel_folder_thread_messages_apply (m->tree, showuids); else - m->tree = camel_folder_thread_messages_new (m->folder, showuids, - mail_config_get_thread_subject ()); + m->tree = camel_folder_thread_messages_new (m->folder, showuids, thread_subject); } else { m->summary = g_ptr_array_new (); for (i = 0; i < showuids->len; i++) { |