add option to disable the 'Subject is empty' warning dialogue
[claws.git] / src / prefs_common.c
index 4b5d46b15515c941c2ba514ac4df860c60234808..c42bbb8296f57fd98489a861943ae24f4cca04ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
+#include "claws-features.h"
 #endif
 
 #include "defs.h"
@@ -59,7 +60,9 @@
 #include "stock_pixmap.h"
 #include "prefswindow.h"
 #include "colorlabel.h"
-#include "addrcustomattr.h"
+#ifndef USE_NEW_ADDRBOOK
+       #include "addrcustomattr.h"
+#endif
 
 enum {
        DATEFMT_FMT,
@@ -138,10 +141,6 @@ static PrefParam param_os_specific[] = {
  */
 
 static PrefParam param[] = {
-#ifdef MAEMO
-       {"data_root", "", &prefs_common.data_root, P_STRING,
-        NULL, NULL, NULL},
-#endif
        /* Receive */
        {"use_ext_inc", "FALSE", &prefs_common.use_extinc, P_BOOL,
         NULL, NULL, NULL},
@@ -164,14 +163,6 @@ static PrefParam param[] = {
        P_BOOL, NULL, NULL, NULL},
        {"newmail_notify_cmd", "", &SPECIFIC_PREFS.newmail_notify_cmd, P_STRING,
         NULL, NULL, NULL},
-#ifdef MAEMO
-       {"maemo_show_led", "TRUE", &prefs_common.maemo_show_led, P_BOOL,
-        NULL, NULL, NULL},
-       {"maemo_play_sound", "FALSE", &prefs_common.maemo_play_sound, P_BOOL,
-        NULL, NULL, NULL},
-       {"maemo_show_banner", "FALSE", &prefs_common.maemo_show_banner, P_BOOL,
-        NULL, NULL, NULL},
-#endif
        {"receive_dialog_mode", "2", &prefs_common.recv_dialog_mode, P_ENUM,
         NULL, NULL, NULL},
        {"receivewin_width", "460", &prefs_common.receivewin_width, P_INT,
@@ -206,6 +197,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"outgoing_fallback_to_ascii", "TRUE", &prefs_common.outgoing_fallback_to_ascii, P_BOOL,
         NULL, NULL, NULL},
+        {"warn_empty_subj", "TRUE", &prefs_common.warn_empty_subj,
+        P_BOOL, NULL, NULL, NULL},
 
        {"allow_jisx0201_kana", "FALSE", &prefs_common.allow_jisx0201_kana,
         P_BOOL, NULL, NULL, NULL},
@@ -744,6 +737,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"respect_flowed_format", "FALSE", &prefs_common.respect_flowed_format, P_BOOL,
         NULL, NULL, NULL},
+       {"show_all_headers", "FALSE", &prefs_common.show_all_headers, P_BOOL,
+        NULL, NULL, NULL},
 
        {"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
         NULL, NULL, NULL},
@@ -834,6 +829,9 @@ static PrefParam param[] = {
 #ifndef G_OS_WIN32
        {"uri_open_command", DEFAULT_BROWSER_CMD,
         &SPECIFIC_PREFS.uri_cmd, P_STRING, NULL, NULL, NULL},
+#else
+       {"gtk_theme", DEFAULT_W32_GTK_THEME,
+        &SPECIFIC_PREFS.gtk_theme, P_STRING, NULL, NULL, NULL},
 #endif
        {"ext_editor_command", DEFAULT_EDITOR_CMD,
         &SPECIFIC_PREFS.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
@@ -1163,6 +1161,16 @@ static PrefParam param[] = {
        {"flush_metadata", "TRUE", &prefs_common.flush_metadata, P_BOOL,
         NULL, NULL, NULL},
 
+       {"nav_history_length", "50", &prefs_common.nav_history_length, P_INT,
+        NULL, NULL, NULL},
+
+       {"diff_added_color", "#008b8b", &prefs_common.diff_added_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"diff_deleted_color", "#6a5acd", &prefs_common.diff_deleted_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"diff_hunk_color", "#a52a2a", &prefs_common.diff_hunk_color, P_COLOR,
+        NULL, NULL, NULL},
+
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
@@ -1256,9 +1264,9 @@ void prefs_common_read_config(void)
                prefs_common_read_history(MESSAGE_SEARCH_HISTORY);
        prefs_common.compose_save_to_history =
                prefs_common_read_history(COMPOSE_SAVE_TO_HISTORY);
-
+#ifndef USE_NEW_ADDRBOOK
        prefs_common.addressbook_custom_attributes = addressbook_update_custom_attr_from_prefs();
-
+#endif
        colorlabel_update_colortable_from_prefs();
 }
 
@@ -1355,9 +1363,11 @@ void prefs_common_write_config(void)
        prefs_common_save_history(COMPOSE_SAVE_TO_HISTORY, 
                prefs_common.compose_save_to_history);
 
-       prefs_common_save_history_to_dir(ADDRBOOK_DIR,
+#ifndef USE_NEW_ADDRBOOK
+               prefs_common_save_history_to_dir(ADDRBOOK_DIR,
                ADDRESSBOOK_CUSTOM_ATTRIBUTES, 
                prefs_common.addressbook_custom_attributes);
+#endif
 }
 
 /* make a copy of string 'in' into buffer 'out'. un-escape \ sequences.
@@ -1537,15 +1547,6 @@ gboolean prefs_common_enable_log_status(void)
        return prefs_common.enable_log_status;
 }
 
-#ifdef MAEMO
-const gchar *prefs_common_get_data_root(void)
-{
-       if (prefs_common.data_root && *prefs_common.data_root)
-               return prefs_common.data_root;
-       else
-               return NULL;
-}
-#endif
 /**
    return the translated name of a header, if the translate_header option is
    set, otherwise return the untranslated header name (header_name itself).