Import release 2.0rc1
This commit is contained in:
+20
-2
@@ -169,7 +169,12 @@ void InitialView::addAccount(Account *account)
|
||||
handleCombobox_->completionObject()->addItem( handle );
|
||||
|
||||
// Select the account in the combobox if it's the default account.
|
||||
if( handle == lastUsedHandle_ )
|
||||
// Don't update the view if we're currently connecting; when connecting
|
||||
// to an account for the first time and it is not set as a guest account,
|
||||
// the account is added bringing code flow here, and updateView() will
|
||||
// clear the password field because no password is saved yet. We don't
|
||||
// want that.
|
||||
if( !isConnectingUI_ && handle == lastUsedHandle_ )
|
||||
{
|
||||
handleCombobox_->setCurrentItem( lastUsedHandle_ );
|
||||
updateView();
|
||||
@@ -221,8 +226,9 @@ void InitialView::changedAccount( QString oldName, QString newName )
|
||||
* This method starts reconnecting to an account
|
||||
*
|
||||
* @param handle The email address of the account to reconnect
|
||||
* @param waitWhenUnknown Wait before (re)connecting when network status is Unknown
|
||||
*/
|
||||
void InitialView::reconnect( QString handle )
|
||||
void InitialView::reconnect( QString handle, bool waitWhenUnknown )
|
||||
{
|
||||
#ifdef KMESSDEBUG_INITIALVIEW
|
||||
kDebug() << "Reconnecting account" << handle;
|
||||
@@ -284,7 +290,9 @@ void InitialView::reconnect( QString handle )
|
||||
|
||||
// The connection is being brought down, wait for it
|
||||
case Solid::Networking::Disconnecting:
|
||||
#ifdef KMESSDEBUG_INITIALVIEW
|
||||
kDebug() << "Network status: disconnecting. Waiting a moment for reconnection.";
|
||||
#endif
|
||||
reconnectionRemainingSeconds_ = 30;
|
||||
return;
|
||||
|
||||
@@ -296,6 +304,14 @@ void InitialView::reconnect( QString handle )
|
||||
kDebug() << "Network status: Unknown. Scheduling reconnection.";
|
||||
#endif
|
||||
reconnectionRemainingSeconds_ = 30;
|
||||
|
||||
// When the user starts kmess and the connection status is unknown, connect immediately.
|
||||
if( ! waitWhenUnknown )
|
||||
{
|
||||
// FIXME? wait 5 seconds here, like when Connected?
|
||||
reconnectionRemainingSeconds_ = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -342,6 +358,8 @@ void InitialView::slotConnectionStatusChanged( Solid::Networking::Status newStat
|
||||
#ifdef KMESSDEBUG_INITIALVIEW
|
||||
kDebug() << "no connection attempt active, do nothing.";
|
||||
#endif
|
||||
statusMessage();
|
||||
setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user