#if USE_GPGME
# include "rfc2015.h"
#endif
+#if USE_SSL
+# include "ssl.h"
+#endif
gchar *prog_version;
gchar *startup_dir;
gtk_widget_push_colormap(gdk_imlib_get_colormap());
#endif
+#if USE_SSL
+ ssl_init();
+#endif
+
srandom((gint)time(NULL));
/* parse gtkrc files */
MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir());
MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir());
+ if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log")) {
+ if (rename(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log",
+ RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0)
+ FILE_OP_ERROR("sylpheed.log", "rename");
+ }
+ set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log");
+
if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "assortrc") &&
!is_file_exist(RC_DIR G_DIR_SEPARATOR_S "filterrc")) {
if (rename(RC_DIR G_DIR_SEPARATOR_S "assortrc",
prefs_display_header_read_config();
prefs_display_header_write_config();
prefs_filtering_read_config();
+ addressbook_read_file();
gtkut_widget_init();
account_read_config_all();
account_save_config_all();
- if (folder_read_list() < 0) setup(mainwin);
+ if (folder_read_list() < 0) {
+ setup(mainwin);
+ folder_write_list();
+ }
+ if (!account_get_list()) {
+ account_edit_open();
+ account_add();
+ }
+
account_set_missing_folder();
folderview_set(folderview);
/* delete temporary files */
remove_all_files(get_mime_tmp_dir());
+ close_log_file();
+
/* delete unix domain socket */
gdk_input_remove(lock_socket_tag);
fd_close(lock_socket);
filename = get_socket_name();
unlink(filename);
+#if USE_SSL
+ ssl_done();
+#endif
+
gtk_main_quit();
}