#include "main.h"
#include "mainwindow.h"
#include "folderview.h"
+#include "image_viewer.h"
#include "summaryview.h"
#include "prefs_common.h"
#include "prefs_account.h"
#include "prefs_actions.h"
#include "prefs_ext_prog.h"
#include "prefs_fonts.h"
+#include "prefs_image_viewer.h"
+#include "prefs_message.h"
+#include "prefs_receive.h"
#include "prefs_msg_colors.h"
+#include "prefs_quote.h"
#include "prefs_spelling.h"
+#include "prefs_summaries.h"
#include "prefs_themes.h"
+#include "prefs_other.h"
+#include "prefs_send.h"
#include "prefs_wrapping.h"
+#include "prefs_compose_writing.h"
#include "prefs_display_header.h"
#include "account.h"
#include "procmsg.h"
#include "imap_gtk.h"
#include "news_gtk.h"
#include "matcher.h"
+#ifdef HAVE_LIBETPAN
+#include "imap-thread.h"
+#endif
+#include "stock_pixmap.h"
#if USE_OPENSSL
# include "ssl.h"
static void install_basic_sighandlers (void);
static void exit_sylpheed (MainWindow *mainwin);
-#if 0
-/* for gettext */
-_("File `%s' already exists.\n"
- "Can't create folder.")
-#endif
-
#define MAKE_DIR_IF_NOT_EXIST(dir) \
{ \
if (!is_dir_exist(dir)) { \
* We have to display a window, so let it be very little */
hack = gtk_window_new(GTK_WINDOW_POPUP);
gtk_widget_set_uposition(hack, 0, 0);
- gtk_widget_set_usize(hack, 1, 1);
+ gtk_widget_set_size_request(hack, 1, 1);
gtk_widget_show(hack);
}
gchar *userrc;
MainWindow *mainwin;
FolderView *folderview;
+ GdkPixbuf *icon;
if (!sylpheed_init(&argc, &argv)) {
return 0;
return 0;
}
+ g_thread_init(NULL);
+ /* gdk_threads_init(); */
+
gtk_set_locale();
gtk_init(&argc, &argv);
gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
gtk_widget_set_default_visual(gdk_rgb_get_visual());
-#if USE_THREADS || USE_LDAP
- g_thread_init(NULL);
if (!g_thread_supported())
g_error(_("g_thread is not supported by glib.\n"));
-#endif
/* parse gtkrc files */
userrc = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".gtkrc-2.0",
set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log");
folder_system_init();
- prefs_common_init();
prefs_common_read_config();
prefs_themes_init();
prefs_fonts_init();
prefs_ext_prog_init();
prefs_wrapping_init();
+ prefs_compose_writing_init();
prefs_msg_colors_init();
+ image_viewer_init();
+ prefs_image_viewer_init();
+ prefs_quote_init();
+ prefs_summaries_init();
+ prefs_message_init();
+ prefs_other_init();
+ prefs_receive_init();
+ prefs_send_init();
#ifdef USE_ASPELL
gtkaspell_checkers_init();
prefs_spelling_init();
#endif
sock_set_io_timeout(prefs_common.io_timeout_secs);
-
+#ifdef HAVE_LIBETPAN
+ imap_main_set_timeout(prefs_common.io_timeout_secs);
+#endif
prefs_actions_read_config();
prefs_display_header_read_config();
/* prefs_filtering_read_config(); */
renderer_read_config();
gtkut_widget_init();
+ stock_pixbuf_gdk(NULL, STOCK_PIXMAP_SYLPHEED_ICON, &icon);
+ gtk_window_set_default_icon(icon);
folderview_initialize();
mh_gtk_init();
exit_sylpheed(mainwin);
}
+#ifdef HAVE_LIBETPAN
+ imap_main_init();
+#endif
account_set_missing_folder();
folder_set_missing_folders();
folderview_set(folderview);
gchar *filename;
debug_print("shutting down\n");
-
+#ifdef HAVE_LIBETPAN
+ imap_main_done();
+#endif
inc_autocheck_timer_remove();
if (prefs_common.clean_on_exit)
g_free(filename);
/* delete temporary files */
+ remove_all_files(get_tmp_dir());
remove_all_files(get_mime_tmp_dir());
close_log_file();
prefs_fonts_done();
prefs_ext_prog_done();
prefs_wrapping_done();
+ prefs_compose_writing_done();
prefs_msg_colors_done();
+ prefs_image_viewer_done();
+ image_viewer_done();
+ prefs_quote_done();
+ prefs_summaries_done();
+ prefs_message_done();
+ prefs_other_done();
+ prefs_receive_done();
+ prefs_send_done();
#ifdef USE_ASPELL
prefs_spelling_done();
gtkaspell_checkers_quit();
gchar *base = g_path_get_basename(argv[0]);
g_print(_("Usage: %s [OPTION]...\n"), base);
- g_print(_(" --compose [address] open composition window"));
- g_print(_(" --attach file1 [file2]...\n"
+ g_print("%s\n", _(" --compose [address] open composition window"));
+ g_print("%s\n", _(" --attach file1 [file2]...\n"
" open composition window with specified files\n"
" attached"));
- g_print(_(" --receive receive new messages"));
- g_print(_(" --receive-all receive new messages of all accounts"));
- g_print(_(" --send send all queued messages"));
- g_print(_(" --status [folder]... show the total number of messages"));
- g_print(_(" --status-full [folder]...\n"
+ g_print("%s\n", _(" --receive receive new messages"));
+ g_print("%s\n", _(" --receive-all receive new messages of all accounts"));
+ g_print("%s\n", _(" --send send all queued messages"));
+ g_print("%s\n", _(" --status [folder]... show the total number of messages"));
+ g_print("%s\n", _(" --status-full [folder]...\n"
" show the status of each folder"));
- g_print(_(" --online switch to online mode"));
- g_print(_(" --offline switch to offline mode"));
- g_print(_(" --debug debug mode"));
- g_print(_(" --help display this help and exit"));
- g_print(_(" --version output version information and exit"));
- g_print(_(" --config-dir output configuration directory"));
+ g_print("%s\n", _(" --online switch to online mode"));
+ g_print("%s\n", _(" --offline switch to offline mode"));
+ g_print("%s\n", _(" --debug debug mode"));
+ g_print("%s\n", _(" --help display this help and exit"));
+ g_print("%s\n", _(" --version output version information and exit"));
+ g_print("%s\n", _(" --config-dir output configuration directory"));
g_free(base);
exit(1);
static void draft_all_messages(void)
{
- GList *compose_list = compose_get_compose_list();
- GList *elem = NULL;
+ GList *compose_list = NULL;
- if (compose_list) {
- for (elem = compose_list; elem != NULL && elem->data != NULL;
- elem = elem->next) {
- Compose *c = (Compose*)elem->data;
- compose_draft(c);
- }
+ while ((compose_list = compose_get_compose_list()) != NULL) {
+ Compose *c = (Compose*)compose_list->data;
+ compose_draft(c);
}
}