[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kdm
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2010-02-28 20:40:05
Message-ID: 1267389605.227985.32118.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1097271 by ossi:
always show confirmation dialog before switching to console mode
the dialog also contains instructions on getting back to text mode.
BUG: 223576
M +0 -1 TODO
M +0 -2 backend/dm.c
M +21 -5 kfrontend/kdmshutdown.cpp
M +10 -12 kfrontend/kgdialog.cpp
--- trunk/KDE/kdebase/workspace/kdm/TODO #1097270:1097271
@@ -11,7 +11,6 @@
- do something about GreetString, i18n & theming. need some magic for the default.
-- message after switching to text mode
- report critical startup errors to the console
- set LANGUAGE in the backend for i18n-capable PAM libs
--- trunk/KDE/kdebase/workspace/kdm/backend/dm.c #1097270:1097271
@@ -546,8 +546,6 @@
if ((vt = TTYtoVT( *consoleTTYs )))
activateVT( vt );
#endif
-
- /* XXX output something useful here */
}
#ifdef HAVE_VTS
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/kdmshutdown.cpp #1097270:1097271
@@ -582,6 +582,11 @@
doShutdown( type, os );
}
+#define SHUT_CONSOLE_HELP I18N_NOOP( \
+ "<br/>Switching to console mode will terminate all local X servers and" \
+ " leave you with console logins only. Graphical mode is automatically" \
+ " resumed 10 seconds after the last console session ends or after" \
+ " 40 seconds if no-one logs in in the first place.<br/>")
KDMConfShutdown::KDMConfShutdown( int _uid, const QList<DpySpec> &sessions, int type,
const QString &os, QWidget *_parent )
@@ -591,9 +596,13 @@
if (type == SHUT_CONSOLE)
willShut = false;
#endif
- box->addWidget( new QLabel( QString( "<qt><center><b><nobr>"
- "%1%2"
- "</nobr></b></center></qt>" )
+ QLabel *lbl = new QLabel( QString( "<qt><center><b><nobr>"
+ "%1%2"
+ "</nobr></b></center>"
+#ifdef HAVE_VTS
+ "%3"
+#endif
+ "</qt>" )
.arg( (type == SHUT_HALT) ?
i18n("Turn Off Computer") :
#ifdef HAVE_VTS
@@ -603,8 +612,15 @@
i18n("Restart Computer") )
.arg( !os.isEmpty() ?
i18n("<br/>(Next boot: %1)", os ) :
- QString() ),
- this ) );
+ QString() )
+#ifdef HAVE_VTS
+ .arg( (type == SHUT_CONSOLE) ?
+ i18n(SHUT_CONSOLE_HELP) :
+ QString() )
+#endif
+ );
+ lbl->setWordWrap( true );
+ box->addWidget( lbl );
if (!sessions.isEmpty()) {
if (willShut && _scheduledSd != SHUT_NEVER)
--- trunk/KDE/kdebase/workspace/kdm/kfrontend/kgdialog.cpp #1097270:1097271
@@ -167,21 +167,19 @@
void
KGDialog::slotConsole()
{
+ QList<DpySpec> sess;
#ifdef HAVE_VTS
- QList<DpySpec> sess = fetchSessions( 0 );
- if (!sess.isEmpty()) {
- if (verify)
- verify->suspend();
- int ret = KDMConfShutdown( -1, sess, SHUT_CONSOLE, 0 ).exec();
- if (verify)
- verify->resume();
- if (!ret)
- return;
- }
-#else
+ sess = fetchSessions( 0 );
+#endif
if (verify)
+ verify->suspend();
+ int ret = KDMConfShutdown( -1, sess, SHUT_CONSOLE, 0 ).exec();
+ if (verify)
+ verify->resume();
+ if (!ret)
+ return;
+ if (verify)
verify->abort();
-#endif
gSet( 1 );
gSendInt( G_Console );
gSet( 0 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic