]> 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 fef01b808ed4512512b22ef1b2d6a9269da8c9fd..a4a90e2c5e962de9efea19f4b20cd208c178a34e 100644 (file)
 #include <libebook/e-book.h>
 #include <libgnomevfs/gnome-vfs.h>
 
+#include <telepathy-glib/util.h>
 #include <libmissioncontrol/mc-account.h>
 #include <libmissioncontrol/mc-account-monitor.h>
 #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>
@@ -157,7 +158,7 @@ create_salut_account (void)
        email = e_contact_get (contact, E_CONTACT_EMAIL_1);
        jid = e_contact_get (contact, E_CONTACT_IM_JABBER_HOME_1);
        
-       if (G_STR_EMPTY (nickname) || !empathy_strdiff (nickname, "nickname")) {
+       if (G_STR_EMPTY (nickname) || !tp_strdiff (nickname, "nickname")) {
                g_free (nickname);
                nickname = g_strdup (g_get_user_name ());
        }
@@ -202,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 ();
 
@@ -220,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;
        }
@@ -246,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);
        }