#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>
EBook *book;
EContact *contact;
gchar *nickname = NULL;
- gchar *published_name = NULL;
gchar *first_name = NULL;
gchar *last_name = NULL;
gchar *email = NULL;
mc_account_set_display_name (account, _("People nearby"));
nickname = e_contact_get (contact, E_CONTACT_NICKNAME);
- published_name = e_contact_get (contact, E_CONTACT_FULL_NAME);
first_name = e_contact_get (contact, E_CONTACT_GIVEN_NAME);
last_name = e_contact_get (contact, E_CONTACT_FAMILY_NAME);
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) || !tp_strdiff (nickname, "nickname")) {
+ if (!tp_strdiff (nickname, "nickname")) {
g_free (nickname);
- nickname = g_strdup (g_get_user_name ());
- }
- if (G_STR_EMPTY (published_name)) {
- g_free (published_name);
- published_name = g_strdup (g_get_real_name ());
+ nickname = NULL;
}
empathy_debug (DEBUG_DOMAIN, "Salut account created:\n"
" nickname=%s\n"
- " published-name=%s\n"
" first-name=%s\n"
" last-name=%s\n"
" email=%s\n"
" jid=%s\n",
- nickname, published_name, first_name, last_name, email, jid);
+ nickname, first_name, last_name, email, jid);
mc_account_set_param_string (account, "nickname", nickname ? nickname : "");
- mc_account_set_param_string (account, "published-name", published_name ? published_name : "");
mc_account_set_param_string (account, "first-name", first_name ? first_name : "");
mc_account_set_param_string (account, "last-name", last_name ? last_name : "");
mc_account_set_param_string (account, "email", email ? email : "");
mc_account_set_param_string (account, "jid", jid ? jid : "");
g_free (nickname);
- g_free (published_name);
g_free (first_name);
g_free (last_name);
g_free (email);
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 ();
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;
}
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);
}