#include <glib.h>
#include <glib/gi18n.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkrc.h>
+#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <hildon-widgets/hildon-banner.h>
#include <hildon-widgets/hildon-program.h>
#endif
-#include <gtk/gtkmain.h>
#include <libosso.h>
#include <libgnomevfs/gnome-vfs-volume.h>
#include <libgnomevfs/gnome-vfs-volume-monitor.h>
if (rename_force("claws-win32.log", "claws-win32.log.bak") < 0)
FILE_OP_ERROR("claws-win32.log", "rename");
}
- win32_debug_fp = fopen("claws-win32.log", "w");
+ win32_debug_fp = g_fopen("claws-win32.log", "w");
if (win32_debug_fp)
{
g_set_print_handler(win32_print_stdout);
return;
if (show_debug_only)
- debug_print("GTK+ %d.%d.%d / GLib %d.%d.%d\n",
+ debug_print("runtime GTK+ %d.%d.%d / GLib %d.%d.%d\n",
gtk_major_version, gtk_minor_version, gtk_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
else
- g_print("GTK+ %d.%d.%d / GLib %d.%d.%d\n",
+ g_print("runtime GTK+ %d.%d.%d / GLib %d.%d.%d\n",
gtk_major_version, gtk_minor_version, gtk_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
+ if (show_debug_only)
+ debug_print("buildtime GTK+ %d.%d.%d / GLib %d.%d.%d\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION,
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ else
+ g_print("buildtime GTK+ %d.%d.%d / GLib %d.%d.%d\n",
+ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION,
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+
if (show_debug_only)
debug_print("Compiled-in features:\n");
else
else
g_print(" compface\n");
#endif
-#if USE_ASPELL
+#if USE_ENCHANT
if (show_debug_only)
debug_print(" aspell\n");
else
"claws-mail", G_TYPE_INVALID, G_TYPE_INVALID);
}
if (error) {
- debug_print(error->message);
+ debug_print("%s", error->message);
g_error_free(error);
}
}
gboolean asked_for_migration = FALSE;
gboolean start_done = TRUE;
GtkUIManager *gui_manager = NULL;
-
+ GSList *plug_list = NULL;
+ gboolean never_ran = TRUE;
+
START_TIMING("startup");
sc_starting = TRUE;
gtk_set_locale();
gtk_init(&argc, &argv);
+#ifdef G_OS_WIN32
+ gtk_settings_set_string_property(gtk_settings_get_default(),
+ "gtk-theme-name",
+ "MS-Windows",
+ "XProperty");
+#endif
+
#ifdef HAVE_NETWORKMANAGER_SUPPORT
went_offline_nm = FALSE;
nm_proxy = NULL;
prefs_receive_init();
prefs_send_init();
tags_read_tags();
-#ifdef USE_ASPELL
+#ifdef USE_ENCHANT
gtkaspell_checkers_init();
prefs_spelling_init();
#endif
}
main_window_reflect_prefs_all_now();
folder_write_list();
+ never_ran = TRUE;
}
if (!account_get_list()) {
#endif
exit(1);
}
+ never_ran = TRUE;
}
prefs_matcher_read_config();
}
- if (plugin_get_unloaded_list() != NULL) {
+ if ((plug_list = plugin_get_unloaded_list()) != NULL) {
+ GSList *cur;
+ gchar *list = NULL;
+ gint num_plugins = 0;
+ for (cur = plug_list; cur; cur = cur->next) {
+ Plugin *plugin = (Plugin *)cur->data;
+ gchar *tmp = g_strdup_printf("%s\n%s",
+ list? list:"",
+ plugin_get_name(plugin));
+ g_free(list);
+ list = tmp;
+ num_plugins++;
+ }
main_window_cursor_normal(mainwin);
- alertpanel_warning(_("Some plugin(s) failed to load. "
+ alertpanel_warning(ngettext(
+ "The following plugin failed to load. "
+ "Check the Plugins configuration "
+ "for more information:\n%s",
+ "The following plugins failed to load. "
"Check the Plugins configuration "
- "for more information."));
+ "for more information:\n%s",
+ num_plugins),
+ list);
main_window_cursor_wait(mainwin);
+ g_free(list);
+ g_slist_free(plug_list);
}
- plugin_load_standard_plugins ();
+ if (never_ran)
+ plugin_load_standard_plugins ();
/* if not crashed, show window now */
if (!claws_crashed()) {
prefs_logging_done();
prefs_send_done();
tags_write_tags();
-#ifdef USE_ASPELL
+#ifdef USE_ENCHANT
prefs_spelling_done();
gtkaspell_checkers_quit();
#endif