aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorjacob berkman <jacob@ximian.com>2001-06-26 05:12:10 +0800
committerJacob Berkman <jberkman@src.gnome.org>2001-06-26 05:12:10 +0800
commit57db15334b2ea42d619024a48bda764af46d0e2a (patch)
treebcedce63814055decf0206e29deb9fec968148b6 /mail/mail-config.c
parent4d5ccfcb23509552645597c073fd0fa311701ded (diff)
downloadgsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.tar.gz
gsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.tar.zst
gsoc2013-evolution-57db15334b2ea42d619024a48bda764af46d0e2a.zip
sync folders after we've gotten mail
2001-06-25 jacob berkman <jacob@ximian.com> * mail-send-recv.c (free_send_data): sync folders after we've gotten mail * folder-browser-factory.c (control_activate): set the ui component on the folder browser (control_activate): update the view preview item (control_deactivate): don't sync the folder here (control_deactivate): unset the ui component of the folder browser * mail-callbacks.c (toggle_flags): stuff from jleach to add an importance keybinding (mark_as_important): ditto (toggle_as_important): again * mail-config.c (mail_config_get_show_preview): (mail_config_set_show_preview): basically a copy of get_thread_list() but for the preview pane * folder-browser.c (folder_browser_destroy): unref the our ui component (folder_browser_set_ui_component): new function for setting the ui component (save_cursor_pos): (set_cursor_pos): try to show the selected row when the preview pane is shown (folder_browser_set_message_preview): implement (folder_browser_toggle_preview): toggle the preview (duh) (on_key_press): add keybindings for marking as important (!), and hiding the preview pane (q) (etree_key): clean up a little bit, and make enter either show the preview pane or open the message (fb_resize_cb): only save the paned size if the preview is alread shown (folder_browser_gui_init): pass ourselves to fb_resize_cb (on_message_selected): only add the timeout if the preview is shown svn path=/trunk/; revision=10491
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index dadf4e3123..1bf052fa5b 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -51,6 +51,7 @@
#include "Mail.h"
typedef struct {
+ gboolean show_preview;
gboolean thread_list;
gboolean hide_deleted;
gint paned_size;
@@ -72,6 +73,7 @@ typedef struct {
char *default_charset;
GHashTable *threaded_hash;
+ GHashTable *preview_hash;
} MailConfig;
static const char GCONFPATH[] = "/apps/Evolution/Mail";
@@ -793,6 +795,52 @@ mail_config_is_configured (void)
}
gboolean
+mail_config_get_show_preview (const char *uri)
+{
+ if (uri) {
+ gboolean value = FALSE;
+
+ if (!config->preview_hash)
+ config->preview_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ else
+ value = GPOINTER_TO_INT (g_hash_table_lookup (config->preview_hash, uri));
+
+ if (!value) {
+ /* just in case we got a NULL because it just wasn't in the hash table yet */
+ gboolean def;
+ char *str;
+
+ str = g_strdup_printf ("=%s/config/Mail=/Preview/%s", evolution_dir, uri);
+ value = gnome_config_get_bool_with_default (str, &def);
+ g_free (str);
+
+ if (!def) {
+ g_hash_table_insert (config->preview_hash, g_strdup (uri),
+ GINT_TO_POINTER (value));
+ return value;
+ }
+ } else
+ return value;
+ }
+
+ /* return the default value */
+
+ return config->show_preview;
+}
+
+void
+mail_config_set_show_preview (const char *uri, gboolean value)
+{
+ if (uri) {
+ if (!config->preview_hash)
+ config->preview_hash = g_hash_table_new (g_str_hash, g_str_equal);
+
+ g_hash_table_insert (config->preview_hash, g_strdup (uri), GINT_TO_POINTER (value));
+ } else
+ config->show_preview = value;
+}
+
+gboolean
mail_config_get_thread_list (const char *uri)
{
if (uri) {