+ gui_initialized = gtk_init_with_args (&argc, &argv, "files+", entries, NULL, &error);
+ if (!gui_initialized)
+ {
+ /* check if we have an error message */
+ if (error == NULL)
+ {
+ /* no error message, the GUI initialization failed */
+ const gchar *display_name = gdk_get_display_arg_name ();
+ g_fprintf (stderr, "Failed to open display: %s\n", (display_name != NULL) ? display_name : " ");
+ }
+ else
+ {
+ /* yep, there's an error, so print it */
+ g_fprintf (stderr, "Parsing command line options failed: %s\n", error->message);
+ g_error_free (error);
+ g_fprintf (stderr, "Run \"%s --help\" to see the list of recognized options.\n",argv[0]);
+ }
+ return EXIT_FAILURE;
+ }
+
+ if (version)
+ {
+ g_printf ("%s %s, Copyright (c) 2003-2007 Evan Battaglia\n", PACKAGE_NAME, PACKAGE_VERSION);
+ return EXIT_SUCCESS;
+ }
+
+ curl_download_init();
+
+ /* Init modules/plugins */
+ modules_init();