private void OnPreferencesDialogResponse(object sender, ResponseArgs args) { PreferencesDialog dialog = sender as PreferencesDialog; string username = dialog.GoogleTalkUsername; string password = dialog.GoogleTalkPassword; // string sipUsername = dialog.SipUsername; // string sipPassword = dialog.SipPassword; ((Gtk.Widget)sender).Destroy(); preferencesDialog = null; // If the username and password fields are not null, store them. if (username != null && password != null) { AccountManagement.SetGoogleTalkCredentialsHack(username, password); } else { Logger.Debug("Cannot save empty credentials. Reverting to old credential state."); } /* if (sipUsername != null && sipPassword != null) { * AccountManagement.SetSipCredentialsHack (sipUsername, sipPassword); * } else { * Logger.Debug ("Cannot save empty SIP credentials. Reverting to old credential state."); * } */ // FIXME: Remove this eventually. It's a hack to retry starting the AccountManager assuming the user entered credentials if (!initialized && AccountManagement.InitializedFinished() == false) { AccountManagement.Initialize(); } }
private bool InitializeIdle() { Logger.Debug("Initialize_Idle - called"); SetupTrayIcon(); OpenSavedGroupWindows(); //GConfPreferencesProvider prefs = new GConfPreferencesProvider (); //Preferences.Init (prefs); //Preferences.SettingChanged += CompDirApplication.SettingChanged; // Startup the message log store // Note! not persisting messages yet so don't start //MessageStore.Start (); // Startup the messaging engine //MessageEngine.Start (); // Launch the configured telepathy providers //TelepathyProviderFactory.Start (); // Start account management and authenticate to any auto-login accounts AccountManagement.IAmUpEvent += OnAccountManagementReadyEvent; AccountManagement.Initialize(); /* * if ((bool) Preferences.Get (Preferences.ENABLE_TRAY_ICON)) * ShowTrayIcon (); * else * ShowCompDirWindow (); */ return(false); }