summaryrefslogtreecommitdiffstats
path: root/kate/app/kateapp.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-02-20 21:43:25 +0700
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-02-20 21:43:25 +0700
commit127ac19145207e292e179056ab9a5956f00fac32 (patch)
tree4dfc855697346d75f97817f072fb388c811bd7a8 /kate/app/kateapp.cpp
parent2675b2147b5ccc7782535e5f662847768bb8b442 (diff)
downloadtdebase-127ac19145207e292e179056ab9a5956f00fac32.tar.gz
tdebase-127ac19145207e292e179056ab9a5956f00fac32.zip
Added support for "Delete session" in Kate session panel.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kate/app/kateapp.cpp')
-rw-r--r--kate/app/kateapp.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp
index 8793569fa..167062245 100644
--- a/kate/app/kateapp.cpp
+++ b/kate/app/kateapp.cpp
@@ -162,7 +162,8 @@ bool KateApp::startupKate()
{
if (m_args->isSet("start"))
{
- // the user has specified the session to open
+ // the user has specified the session to open. If the session does not exist,
+ // a new session with the specified name will be created
TQCString sessName = m_args->getOption("start");
int sessId = sessionManager()->getSessionIdFromName(sessName);
if (sessId != KateSessionManager::INVALID_SESSION)
@@ -171,19 +172,7 @@ bool KateApp::startupKate()
}
else
{
- int msgres = KMessageBox::warningYesNo(0, i18n("<p>The session '%1' could not be found."
- "<p>Do you want to start a new session?").arg(sessName),
- i18n("Session not found!"));
- if (msgres == KMessageBox::Yes)
- {
- sessionManager()->newSession(TQString::null, true);
- }
- else
- {
- // Kate will exit now and notify it is done
- TDEStartupInfo::appStarted(startupId());
- return false;
- }
+ sessionManager()->newSession(sessName, true);
}
}
else
@@ -203,7 +192,7 @@ bool KateApp::startupKate()
}
else if (startupOption == "new")
{
- sessionManager()->newSession(TQString::null, true);
+ sessionManager()->newSession();
}
else // startupOption == "manual"
{
@@ -212,14 +201,14 @@ bool KateApp::startupKate()
switch (result)
{
case KateSessionChooser::RESULT_OPEN_NEW:
- sessionManager()->newSession(TQString::null, true);
+ sessionManager()->newSession();
break;
case KateSessionChooser::RESULT_OPEN_EXISTING:
if (!m_sessionManager->activateSession(chooser->getSelectedSessionId()))
{
// Open a new session in case of error
- sessionManager()->newSession(TQString::null, true);
+ sessionManager()->newSession();
}
break;