talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit aecd382fde51be4e9bb3c68de70bf800a38590f0
parent 8f395db32aa90e2b831f8ae1709e80d09f6e4cdc
Author: Oliver Lowe <o@olowe.co>
Date:   Fri,  5 Sep 2025 12:48:33 +1000

start dumping global constants called once or never

Diffstat:
Msrc/common/defs.h | 17-----------------
Msrc/common/utils.c | 10----------
Msrc/common/utils.h | 1-
Msrc/main.c | 2--
Msrc/prefs_common.c | 26--------------------------
Msrc/prefs_common.h | 6------
Msrc/prefs_themes.c | 2++
7 files changed, 2 insertions(+), 62 deletions(-)

diff --git a/src/common/defs.h b/src/common/defs.h @@ -26,16 +26,10 @@ #define TRASH_DIR "trash" #define TAGS_DIR "tagsdb" #define RC_DIR ".claws-mail" -#define OLD_GTK2_RC_DIR ".sylpheed-claws" -#define OLDER_GTK2_RC_DIR ".sylpheed-gtk2" -#define OLD_GTK1_RC_DIR ".sylpheed" -#define SYLPHEED_RC_DIR ".sylpheed-2.0" -#define NEWS_CACHE_DIR "newscache" #define IMAP_CACHE_DIR "imapcache" #define HEADER_CACHE_DIR "headercache" #define MIME_TMP_DIR "mimetmp" #define COMMON_RC "clawsrc" -#define OLD_COMMON_RC "sylpheedrc" #define ACCOUNT_RC "accountrc" #define OAUTH2_RC "oauth2rc" #define CUSTOM_HEADER_RC "customheaderrc" @@ -46,18 +40,11 @@ #define MENU_RC "menurc" #define TAGS_RC "tagsrc" #define PASSWORD_STORE_RC "passwordstorerc" -#define QUICKSEARCH_HISTORY "quicksearch_history" -#define SUMMARY_SEARCH_FROM_HISTORY "summarysearch_from_history" -#define SUMMARY_SEARCH_TO_HISTORY "summarysearch_to_history" -#define SUMMARY_SEARCH_SUBJECT_HISTORY "summarysearch_subject_history" -#define SUMMARY_SEARCH_BODY_HISTORY "summary_searchbody_history" -#define SUMMARY_SEARCH_ADV_CONDITION_HISTORY "summarysearch_adv_history" #define MESSAGE_SEARCH_HISTORY "messagesearch_history" #define COMPOSE_SAVE_TO_HISTORY "compose_save_to_history" #define ADDRESSBOOK_CUSTOM_ATTRIBUTES "attributesrc" #define TEMPLATE_DIR "templates" #define TMP_DIR "tmp" -#define UIDL_DIR "uidl" #define ADDRESS_BOOK "addressbook.xml" #define ADDRBOOK_DIR "addrbook" #define MANUAL_HTML_INDEX "claws-mail-manual.html" @@ -74,11 +61,8 @@ #define DONATE_URI "https://www.claws-mail.org/donations.php" #define CONFIG_VERSIONS_URI "https://www.claws-mail.org/cvc.php" #define RELEASE_NOTES_FILE "RELEASE_NOTES" -#define THEMEINFO_FILE ".claws_themeinfo" #define FOLDER_LIST "folderlist.xml" -#define OLD_CACHE_FILE ".sylpheed_claws_cache" #define CACHE_FILE ".claws_cache" -#define OLD_MARK_FILE ".sylpheed_mark" #define MARK_FILE ".claws_mark" #define TAGS_FILE ".claws_tags" #define CACHE_VERSION 24 @@ -123,7 +107,6 @@ #define MAX_MENU_LABEL_LENGTH 5453 #define DEFAULT_PIXMAP_THEME "INTERNAL_DEFAULT" -#define PIXMAP_THEME_DIR "themes" #define AVATAR_NONE 0 #define AVATAR_XFACE 1 diff --git a/src/common/utils.c b/src/common/utils.c @@ -1446,16 +1446,6 @@ const gchar *get_mail_base_dir(void) return get_home_dir(); } -const gchar *get_news_cache_dir(void) -{ - static gchar *news_cache_dir = NULL; - if (!news_cache_dir) - news_cache_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, - NEWS_CACHE_DIR, NULL); - - return news_cache_dir; -} - const gchar *get_imap_cache_dir(void) { static gchar *imap_cache_dir = NULL; diff --git a/src/common/utils.h b/src/common/utils.h @@ -345,7 +345,6 @@ const gchar *get_rc_dir (void); void set_rc_dir (const gchar *dir); gboolean rc_dir_is_alt (void); const gchar *get_mail_base_dir (void); -const gchar *get_news_cache_dir (void); const gchar *get_imap_cache_dir (void); const gchar *get_mime_tmp_dir (void); const gchar *get_template_dir (void); diff --git a/src/main.c b/src/main.c @@ -430,10 +430,8 @@ int main(int argc, char *argv[]) MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir()); MAKE_DIR_IF_NOT_EXIST(get_imap_cache_dir()); - MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir()); MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir()); MAKE_DIR_IF_NOT_EXIST(get_tmp_dir()); - MAKE_DIR_IF_NOT_EXIST(UIDL_DIR); remove_all_files(get_tmp_dir()); remove_all_files(get_mime_tmp_dir()); diff --git a/src/prefs_common.c b/src/prefs_common.c @@ -977,18 +977,6 @@ void prefs_common_read_config(void) prefs_common.mime_open_cmd_history = prefs_common_read_history(COMMAND_HISTORY); - prefs_common.summary_quicksearch_history = - prefs_common_read_history(QUICKSEARCH_HISTORY); - prefs_common.summary_search_from_history = - prefs_common_read_history(SUMMARY_SEARCH_FROM_HISTORY); - prefs_common.summary_search_to_history = - prefs_common_read_history(SUMMARY_SEARCH_TO_HISTORY); - prefs_common.summary_search_subject_history = - prefs_common_read_history(SUMMARY_SEARCH_SUBJECT_HISTORY); - prefs_common.summary_search_body_history = - prefs_common_read_history(SUMMARY_SEARCH_BODY_HISTORY); - prefs_common.summary_search_adv_condition_history = - prefs_common_read_history(SUMMARY_SEARCH_ADV_CONDITION_HISTORY); prefs_common.message_search_history = prefs_common_read_history(MESSAGE_SEARCH_HISTORY); prefs_common.compose_save_to_history = @@ -1070,20 +1058,6 @@ void prefs_common_write_config(void) prefs_common_save_history(COMMAND_HISTORY, prefs_common.mime_open_cmd_history); - prefs_common_save_history(QUICKSEARCH_HISTORY, - prefs_common.summary_quicksearch_history); - prefs_common_save_history(SUMMARY_SEARCH_FROM_HISTORY, - prefs_common.summary_search_from_history); - prefs_common_save_history(SUMMARY_SEARCH_TO_HISTORY, - prefs_common.summary_search_to_history); - prefs_common_save_history(SUMMARY_SEARCH_SUBJECT_HISTORY, - prefs_common.summary_search_subject_history); - prefs_common_save_history(SUMMARY_SEARCH_BODY_HISTORY, - prefs_common.summary_search_body_history); - prefs_common_save_history(SUMMARY_SEARCH_ADV_CONDITION_HISTORY, - prefs_common.summary_search_adv_condition_history); - prefs_common_save_history(MESSAGE_SEARCH_HISTORY, - prefs_common.message_search_history); prefs_common_save_history(COMPOSE_SAVE_TO_HISTORY, prefs_common.compose_save_to_history); diff --git a/src/prefs_common.h b/src/prefs_common.h @@ -402,12 +402,6 @@ struct _PrefsCommon gint summary_quicksearch_dynamic; gint summary_quicksearch_autorun; - GList *summary_quicksearch_history; - GList *summary_search_from_history; - GList *summary_search_to_history; - GList *summary_search_subject_history; - GList *summary_search_body_history; - GList *summary_search_adv_condition_history; GList *message_search_history; GList *compose_save_to_history; diff --git a/src/prefs_themes.c b/src/prefs_themes.c @@ -49,6 +49,8 @@ #define IS_SYSTEM_THEME(path) (prefs_themes_is_system_theme(path)) #define PREVIEW_ICONS 7 +#define THEMEINFO_FILE ".claws_themeinfo" +#define PIXMAP_THEME_DIR "themes" typedef struct _ThemesPage {