]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
fix src/empathy build. empathy-conf was moved to libempathy-gtk. Fixes bug #511679...
[empathy.git] / src / empathy.c
index cbb81931f997a020f08052a8095b133e5d548f13..a4a90e2c5e962de9efea19f4b20cd208c178a34e 100644 (file)
 #include <libmissioncontrol/mission-control.h>
 
 #include <libempathy/empathy-idle.h>
-#include <libempathy/empathy-conf.h>
 #include <libempathy/empathy-utils.h>
 #include <libempathy/empathy-debug.h>
 
+#include <libempathy-gtk/empathy-conf.h>
 #include <libempathy-gtk/empathy-preferences.h>
 #include <libempathy-gtk/empathy-main-window.h>
 #include <libempathy-gtk/empathy-status-icon.h>
@@ -203,15 +203,8 @@ main (int argc, char *argv[])
        MissionControl    *mc;
        McAccountMonitor  *monitor;
        EmpathyIdle       *idle;
-       gboolean           no_connect = FALSE;
+       gboolean           autoconnect = TRUE;
        GError            *error = NULL;
-       GOptionEntry       options[] = {
-               { "no-connect", 'n',
-                 0, G_OPTION_ARG_NONE, &no_connect,
-                 N_("Don't connect on startup"),
-                 NULL },
-               { NULL }
-       };
 
        empathy_debug_set_log_file_from_env ();
 
@@ -221,7 +214,7 @@ main (int argc, char *argv[])
 
        if (!gtk_init_with_args (&argc, &argv,
                                 _("- Empathy Instant Messenger"),
-                                options, GETTEXT_PACKAGE, &error)) {
+                                NULL, GETTEXT_PACKAGE, &error)) {
                empathy_debug (DEBUG_DOMAIN, error->message);
                return EXIT_FAILURE;
        }
@@ -247,7 +240,11 @@ main (int argc, char *argv[])
                          G_CALLBACK (operation_error_cb),
                          NULL);
 
-       if (!no_connect) {
+       empathy_conf_get_bool (empathy_conf_get(),
+                              EMPATHY_PREFS_AUTOCONNECT,
+                              &autoconnect);
+                              
+       if (autoconnect) {
                start_mission_control (idle);
        }