From 291dece245f84640199fd098123a28ca021404ea Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 18 Sep 2011 01:04:48 +0000 Subject: Reset kdesktop lock login dialog on GUI VT switch git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254119 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/lock/lockdlg.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'kdesktop/lock/lockdlg.cc') diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index fee47dfdb..a13a80297 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -728,7 +728,7 @@ void PasswordDlg::slotSwitchUser() lv = new TQListView( winFrame ); connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(slotSessionActivated()) ); - connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(reject()) ); + connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(accept()) ); lv->setAllColumnsShowFocus( true ); lv->addColumn( i18n("Session") ); lv->addColumn( i18n("Location") ); @@ -759,7 +759,7 @@ void PasswordDlg::slotSwitchUser() btn = new KPushButton( KGuiItem(i18n("session", "&Activate"), "fork"), winFrame ); connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotSessionActivated()) ); - connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); + connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(accept()) ); vbox2->addWidget( btn ); vbox2->addStretch( 2 ); } @@ -768,7 +768,7 @@ void PasswordDlg::slotSwitchUser() { btn = new KPushButton( KGuiItem(i18n("Start &New Session"), "fork"), winFrame ); connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartNewSession()) ); - connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); + connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(accept()) ); if (!p) btn->setEnabled( false ); vbox2->addWidget( btn ); @@ -779,7 +779,10 @@ void PasswordDlg::slotSwitchUser() connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); vbox2->addWidget( btn ); - static_cast< LockProcess* >(parent())->execDialog( &dialog ); + int ret = static_cast< LockProcess* >(parent())->execDialog( &dialog ); + if (ret != TQDialog::Rejected) { + TQDialog::reject(); + } } void PasswordDlg::slotSessionActivated() -- cgit v1.2.1