示例#1
0
        // <summary>
        // Temporary hack to determine whether we have non-empty fields for
        // server, port, username, and password for a GoogleTalk account.
        // </summary>
        static private bool AccountInformationFilled()
        {
            string username;
            string password;

            if (!AccountManagement.GetGoogleTalkCredentialsHack(out username, out password))
            {
                Logger.Debug("Could not get GoogleTalk credentials from GNOME Keyring.");
                return(false);
            }

            if (username == null || username.Trim().Length == 0)
            {
                Logger.Debug("GoogleTalk Username is empty");
                return(false);
            }

            if (password == null || password.Trim().Length == 0)
            {
                Logger.Debug("GoogleTalk Password is empty");
                return(false);
            }

            string server = Preferences.Get(Preferences.GoogleTalkServer) as String;
            string port   = Preferences.Get(Preferences.GoogleTalkPort) as String;

            if (server == null || server.Trim().Length == 0)
            {
                Logger.Debug("GoogleTalk Server Address is empty");
                return(false);
            }

            if (port == null || port.Trim().Length == 0)
            {
                Logger.Debug("GoogleTalk Server Port is empty");
                return(false);
            }

            // Everything appears to have a value
            return(true);
        }
示例#2
0
        void DialogRealized(object sender, EventArgs args)
        {
            // Load the stored preferences
            // Set the username and password if one exists
            string username;
            string password;

            if (AccountManagement.GetGoogleTalkCredentialsHack(out username, out password))
            {
                usernameEntry.Text = username;
                passwordEntry.Text = password;
            }
            else
            {
                usernameEntry.Text = Catalog.GetString("*****@*****.**");
            }

/*			if (AccountManagement.GetSipCredentialsHack (out username, out password)) {
 *                              sipUsernameEntry.Text = username;
 *                              sipPasswordEntry.Text = password;
 *                      } else {
 *                              sipUsernameEntry.Text = Catalog.GetString ("*****@*****.**");
 *                      }
 */     }