summaryrefslogtreecommitdiffstats
path: root/kate
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-08-14 18:26:07 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-08-14 18:26:07 +0900
commit2eb61917990c77f0b67ef60a6d60a7fcab3b6ddc (patch)
treec95a51c4920544d24444bee6bfffb4a7874e373d /kate
parent192b7af94830ff981760570254cce1a27a81d341 (diff)
downloadtdebase-2eb61917990c77f0b67ef60a6d60a7fcab3b6ddc.tar.gz
tdebase-2eb61917990c77f0b67ef60a6d60a7fcab3b6ddc.zip
Renamed KateSession* --> OldKateSession* (except KateSessionPanel). This is to ease the development and testing of the new KateSession/KateSessionManager code while at the same time preserve session functionality. The OldKateSession* code will be removed once the new code has been fully developed and tested.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kate')
-rw-r--r--kate/app/kateapp.cpp6
-rw-r--r--kate/app/kateapp.h6
-rw-r--r--kate/app/katemainwindow.cpp12
-rw-r--r--kate/app/katesession.cpp168
-rw-r--r--kate/app/katesession.h66
-rw-r--r--kate/app/katesessionpanel.cpp2
-rw-r--r--kate/app/katesessionpanel.h4
-rw-r--r--kate/app/kateviewspace.cpp2
8 files changed, 133 insertions, 133 deletions
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp
index 9cba61cc6..2f54a8e23 100644
--- a/kate/app/kateapp.cpp
+++ b/kate/app/kateapp.cpp
@@ -75,7 +75,7 @@ KateApp::KateApp (TDECmdLineArgs *args)
m_pluginManager = new KatePluginManager (TQT_TQOBJECT(this));
// session manager up
- m_sessionManager = new KateSessionManager (TQT_TQOBJECT(this));
+ m_sessionManager = new OldKateSessionManager (TQT_TQOBJECT(this));
// application dcop interface
m_obj = new KateAppDCOPIface (this);
@@ -147,7 +147,7 @@ void KateApp::restoreKate ()
// activate again correct session!!!
sessionConfig()->setGroup("General");
TQString lastSession (sessionConfig()->readEntry ("Last Session", "default.katesession"));
- sessionManager()->activateSession (new KateSession (sessionManager(), lastSession, ""), false, false, false);
+ sessionManager()->activateSession (new OldKateSession (sessionManager(), lastSession, ""), false, false, false);
m_docManager->restoreDocumentList (sessionConfig());
@@ -294,7 +294,7 @@ KateDocManager *KateApp::documentManager ()
return m_docManager;
}
-KateSessionManager *KateApp::sessionManager ()
+OldKateSessionManager *KateApp::sessionManager ()
{
return m_sessionManager;
}
diff --git a/kate/app/kateapp.h b/kate/app/kateapp.h
index 05d09a7fe..2b6c1e2cd 100644
--- a/kate/app/kateapp.h
+++ b/kate/app/kateapp.h
@@ -26,7 +26,7 @@
#include <tqvaluelist.h>
-class KateSessionManager;
+class OldKateSessionManager;
class KateAppDCOPIface;
namespace Kate {
@@ -128,7 +128,7 @@ class KDE_EXPORT KateApp : public TDEApplication
* accessor to session manager
* @return session manager instance
*/
- KateSessionManager *sessionManager ();
+ OldKateSessionManager *sessionManager ();
/**
* window management
@@ -222,7 +222,7 @@ class KDE_EXPORT KateApp : public TDEApplication
/**
* session manager
*/
- KateSessionManager *m_sessionManager;
+ OldKateSessionManager *m_sessionManager;
/**
* known main windows
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index a867cb418..794e1a777 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -306,14 +306,14 @@ void KateMainWindow::setupActions()
slotWindowActivated ();
// session actions
- new TDEAction(i18n("Menu entry Session->New", "&New"), "list-add", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionNew()), actionCollection(), "sessions_new");
- new TDEAction(i18n("&Open..."), "document-open", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionOpen()), actionCollection(), "sessions_open");
- new TDEAction(i18n("&Save"), "document-save", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionSave()), actionCollection(), "sessions_save");
- new TDEAction(i18n("Save &As..."), "document-save-as", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionSaveAs()), actionCollection(), "sessions_save_as");
- new TDEAction(i18n("&Manage..."), "view_choose", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionManage()), actionCollection(), "sessions_manage");
+ new TDEAction(i18n("Menu entry Session->New", "&New"), "list-add", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionNew()), actionCollection(), "sessions_new");
+ new TDEAction(i18n("&Open..."), "document-open", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionOpen()), actionCollection(), "sessions_open");
+ new TDEAction(i18n("&Save"), "document-save", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionSave()), actionCollection(), "sessions_save");
+ new TDEAction(i18n("Save &As..."), "document-save-as", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionSaveAs()), actionCollection(), "sessions_save_as");
+ new TDEAction(i18n("&Manage..."), "view_choose", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionManage()), actionCollection(), "sessions_manage");
// quick open menu ;)
- new KateSessionsAction (i18n("&Quick Open"), actionCollection(), "sessions_list");
+ new OldKateSessionsAction (i18n("&Quick Open"), actionCollection(), "sessions_list");
}
KateTabWidget *KateMainWindow::tabWidget ()
diff --git a/kate/app/katesession.cpp b/kate/app/katesession.cpp
index 2c0057bf8..e71d383f1 100644
--- a/kate/app/katesession.cpp
+++ b/kate/app/katesession.cpp
@@ -48,12 +48,12 @@
#include <unistd.h>
#include <time.h>
-bool operator<( const KateSession::Ptr& a, const KateSession::Ptr& b )
+bool operator<( const OldKateSession::Ptr& a, const OldKateSession::Ptr& b )
{
return a->sessionName().lower() < b->sessionName().lower();
}
-KateSession::KateSession (KateSessionManager *manager, const TQString &fileName, const TQString &name)
+OldKateSession::OldKateSession (OldKateSessionManager *manager, const TQString &fileName, const TQString &name)
: m_sessionFileRel (fileName)
, m_sessionName (name)
, m_documents (0)
@@ -64,7 +64,7 @@ KateSession::KateSession (KateSessionManager *manager, const TQString &fileName,
init ();
}
-void KateSession::init ()
+void OldKateSession::init ()
{
// given file exists, use it to load some stuff ;)
if (!m_sessionFileRel.isEmpty() && TDEGlobal::dirs()->exists(sessionFile ()))
@@ -113,18 +113,18 @@ void KateSession::init ()
}
}
-KateSession::~KateSession ()
+OldKateSession::~OldKateSession ()
{
delete m_readConfig;
delete m_writeConfig;
}
-TQString KateSession::sessionFile () const
+TQString OldKateSession::sessionFile () const
{
return m_manager->sessionsDir() + "/" + m_sessionFileRel;
}
-bool KateSession::create (const TQString &name, bool force)
+bool OldKateSession::create (const TQString &name, bool force)
{
if (!force && (name.isEmpty() || !m_sessionFileRel.isEmpty()))
return false;
@@ -162,7 +162,7 @@ bool KateSession::create (const TQString &name, bool force)
return true;
}
-bool KateSession::rename (const TQString &name)
+bool OldKateSession::rename (const TQString &name)
{
if (name.isEmpty () || m_sessionFileRel.isEmpty() || m_sessionFileRel == "default.katesession")
return false;
@@ -177,7 +177,7 @@ bool KateSession::rename (const TQString &name)
return true;
}
-TDEConfig *KateSession::configRead ()
+TDEConfig *OldKateSession::configRead ()
{
if (m_sessionFileRel.isEmpty())
return 0;
@@ -188,7 +188,7 @@ TDEConfig *KateSession::configRead ()
return m_readConfig = new KSimpleConfig (sessionFile (), true);
}
-TDEConfig *KateSession::configWrite ()
+TDEConfig *OldKateSession::configWrite ()
{
if (m_sessionFileRel.isEmpty())
return 0;
@@ -203,10 +203,10 @@ TDEConfig *KateSession::configWrite ()
return m_writeConfig;
}
-KateSessionManager::KateSessionManager (TQObject *parent)
+OldKateSessionManager::OldKateSessionManager (TQObject *parent)
: TQObject (parent)
, m_sessionsDir (locateLocal( "data", "kate/sessions"))
- , m_activeSession (new KateSession (this, "", ""))
+ , m_activeSession (new OldKateSession (this, "", ""))
{
kdDebug() << "LOCAL SESSION DIR: " << m_sessionsDir << endl;
@@ -214,21 +214,21 @@ KateSessionManager::KateSessionManager (TQObject *parent)
TDEGlobal::dirs()->makeDir (m_sessionsDir);
}
-KateSessionManager::~KateSessionManager()
+OldKateSessionManager::~OldKateSessionManager()
{
}
-KateSessionManager *KateSessionManager::self()
+OldKateSessionManager *OldKateSessionManager::self()
{
return KateApp::self()->sessionManager ();
}
-void KateSessionManager::dirty (const TQString &)
+void OldKateSessionManager::dirty (const TQString &)
{
updateSessionList ();
}
-void KateSessionManager::updateSessionList ()
+void OldKateSessionManager::updateSessionList ()
{
m_sessionList.clear ();
@@ -238,7 +238,7 @@ void KateSessionManager::updateSessionList ()
bool foundDefault = false;
for (unsigned int i=0; i < dir.count(); ++i)
{
- KateSession *session = new KateSession (this, dir[i], "");
+ OldKateSession *session = new OldKateSession (this, dir[i], "");
m_sessionList.append (session);
kdDebug () << "FOUND SESSION: " << session->sessionName() << " FILE: " << session->sessionFile() << endl;
@@ -249,12 +249,12 @@ void KateSessionManager::updateSessionList ()
// add default session, if not there
if (!foundDefault)
- m_sessionList.append (new KateSession (this, "default.katesession", i18n("Default Session")));
+ m_sessionList.append (new OldKateSession (this, "default.katesession", i18n("Default Session")));
qHeapSort(m_sessionList);
}
-void KateSessionManager::activateSession (KateSession::Ptr session, bool closeLast, bool saveLast, bool loadNew)
+void OldKateSessionManager::activateSession (OldKateSession::Ptr session, bool closeLast, bool saveLast, bool loadNew)
{
// don't reload.
// ### comparing the pointers directly is b0rk3d :(
@@ -342,18 +342,18 @@ void KateSessionManager::activateSession (KateSession::Ptr session, bool closeLa
}
}
-KateSession::Ptr KateSessionManager::createSession (const TQString &name)
+OldKateSession::Ptr OldKateSessionManager::createSession (const TQString &name)
{
- KateSession::Ptr s = new KateSession (this, "", "");
+ OldKateSession::Ptr s = new OldKateSession (this, "", "");
s->create (name);
return s;
}
-KateSession::Ptr KateSessionManager::giveSession (const TQString &name)
+OldKateSession::Ptr OldKateSessionManager::giveSession (const TQString &name)
{
if (name.isEmpty())
- return new KateSession (this, "", "");
+ return new OldKateSession (this, "", "");
updateSessionList();
@@ -366,7 +366,7 @@ KateSession::Ptr KateSessionManager::giveSession (const TQString &name)
return createSession (name);
}
-bool KateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast)
+bool OldKateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast)
{
if (tryAsk)
{
@@ -437,7 +437,7 @@ bool KateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast)
return true;
}
-bool KateSessionManager::chooseSession ()
+bool OldKateSessionManager::chooseSession ()
{
bool success = true;
@@ -452,18 +452,18 @@ bool KateSessionManager::chooseSession ()
// uhh, just open last used session, show no chooser
if (sesStart == "last")
{
- activateSession (new KateSession (this, lastSession, ""), false, false);
+ activateSession (new OldKateSession (this, lastSession, ""), false, false);
return success;
}
// start with empty new session
if (sesStart == "new")
{
- activateSession (new KateSession (this, "", ""), false, false);
+ activateSession (new OldKateSession (this, "", ""), false, false);
return success;
}
- KateSessionChooser *chooser = new KateSessionChooser (0, lastSession);
+ OldKateSessionChooser *chooser = new OldKateSessionChooser (0, lastSession);
bool retry = true;
int res = 0;
@@ -473,9 +473,9 @@ bool KateSessionManager::chooseSession ()
switch (res)
{
- case KateSessionChooser::resultOpen:
+ case OldKateSessionChooser::resultOpen:
{
- KateSession::Ptr s = chooser->selectedSession ();
+ OldKateSession::Ptr s = chooser->selectedSession ();
if (!s)
{
@@ -489,13 +489,13 @@ bool KateSessionManager::chooseSession ()
}
// exit the app lateron
- case KateSessionChooser::resultQuit:
+ case OldKateSessionChooser::resultQuit:
success = false;
retry = false;
break;
default:
- activateSession (new KateSession (this, "", ""), false, false);
+ activateSession (new OldKateSession (this, "", ""), false, false);
retry = false;
break;
}
@@ -506,9 +506,9 @@ bool KateSessionManager::chooseSession ()
{
c->setGroup("General");
- if (res == KateSessionChooser::resultOpen)
+ if (res == OldKateSessionChooser::resultOpen)
c->writeEntry ("Startup Session", "last");
- else if (res == KateSessionChooser::resultNew)
+ else if (res == OldKateSessionChooser::resultNew)
c->writeEntry ("Startup Session", "new");
c->sync ();
@@ -519,24 +519,24 @@ bool KateSessionManager::chooseSession ()
return success;
}
-void KateSessionManager::sessionNew ()
+void OldKateSessionManager::sessionNew ()
{
- activateSession (new KateSession (this, "", ""));
+ activateSession (new OldKateSession (this, "", ""));
}
-void KateSessionManager::sessionOpen ()
+void OldKateSessionManager::sessionOpen ()
{
- KateSessionOpenDialog *chooser = new KateSessionOpenDialog (0);
+ OldKateSessionOpenDialog *chooser = new OldKateSessionOpenDialog (0);
int res = chooser->exec ();
- if (res == KateSessionOpenDialog::resultCancel)
+ if (res == OldKateSessionOpenDialog::resultCancel)
{
delete chooser;
return;
}
- KateSession::Ptr s = chooser->selectedSession ();
+ OldKateSession::Ptr s = chooser->selectedSession ();
if (s)
activateSession (s);
@@ -544,7 +544,7 @@ void KateSessionManager::sessionOpen ()
delete chooser;
}
-void KateSessionManager::sessionSave ()
+void OldKateSessionManager::sessionSave ()
{
// if the active session is valid, just save it :)
if (saveActiveSession ())
@@ -566,7 +566,7 @@ void KateSessionManager::sessionSave ()
saveActiveSession ();
}
-void KateSessionManager::sessionSaveAs ()
+void OldKateSessionManager::sessionSaveAs ()
{
bool ok = false;
TQString name = KInputDialog::getText (i18n("Specify New Name for Current Session"), i18n("Session name:"), "", &ok);
@@ -585,9 +585,9 @@ void KateSessionManager::sessionSaveAs ()
}
-void KateSessionManager::sessionManage ()
+void OldKateSessionManager::sessionManage ()
{
- KateSessionManageDialog *dlg = new KateSessionManageDialog (0);
+ OldKateSessionManageDialog *dlg = new OldKateSessionManageDialog (0);
dlg->exec ();
@@ -596,10 +596,10 @@ void KateSessionManager::sessionManage ()
//BEGIN CHOOSER DIALOG
-class KateSessionChooserItem : public TQListViewItem
+class OldKateSessionChooserItem : public TQListViewItem
{
public:
- KateSessionChooserItem (TDEListView *lv, KateSession::Ptr s)
+ OldKateSessionChooserItem (TDEListView *lv, OldKateSession::Ptr s)
: TQListViewItem (lv, s->sessionName())
, session (s)
{
@@ -608,10 +608,10 @@ class KateSessionChooserItem : public TQListViewItem
setText (1, docs);
}
- KateSession::Ptr session;
+ OldKateSession::Ptr session;
};
-KateSessionChooser::KateSessionChooser (TQWidget *parent, const TQString &lastSession)
+OldKateSessionChooser::OldKateSessionChooser (TQWidget *parent, const TQString &lastSession)
: KDialogBase ( parent
, ""
, true
@@ -648,10 +648,10 @@ KateSessionChooser::KateSessionChooser (TQWidget *parent, const TQString &lastSe
connect (m_sessions, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
connect (m_sessions, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotUser2()));
- KateSessionList &slist (KateSessionManager::self()->sessionList());
+ OldKateSessionList &slist (OldKateSessionManager::self()->sessionList());
for (unsigned int i=0; i < slist.count(); ++i)
{
- KateSessionChooserItem *item = new KateSessionChooserItem (m_sessions, slist[i]);
+ OldKateSessionChooserItem *item = new OldKateSessionChooserItem (m_sessions, slist[i]);
if (slist[i]->sessionFileRelative() == lastSession)
m_sessions->setSelected (item, true);
@@ -665,13 +665,13 @@ KateSessionChooser::KateSessionChooser (TQWidget *parent, const TQString &lastSe
selectionChanged ();
}
-KateSessionChooser::~KateSessionChooser ()
+OldKateSessionChooser::~OldKateSessionChooser ()
{
}
-KateSession::Ptr KateSessionChooser::selectedSession ()
+OldKateSession::Ptr OldKateSessionChooser::selectedSession ()
{
- KateSessionChooserItem *item = (KateSessionChooserItem *) m_sessions->selectedItem ();
+ OldKateSessionChooserItem *item = (OldKateSessionChooserItem *) m_sessions->selectedItem ();
if (!item)
return 0;
@@ -679,27 +679,27 @@ KateSession::Ptr KateSessionChooser::selectedSession ()
return item->session;
}
-bool KateSessionChooser::reopenLastSession ()
+bool OldKateSessionChooser::reopenLastSession ()
{
return m_useLast->isChecked ();
}
-void KateSessionChooser::slotUser2 ()
+void OldKateSessionChooser::slotUser2 ()
{
done (resultOpen);
}
-void KateSessionChooser::slotUser3 ()
+void OldKateSessionChooser::slotUser3 ()
{
done (resultNew);
}
-void KateSessionChooser::slotUser1 ()
+void OldKateSessionChooser::slotUser1 ()
{
done (resultQuit);
}
-void KateSessionChooser::selectionChanged ()
+void OldKateSessionChooser::selectionChanged ()
{
enableButton (KDialogBase::User2, m_sessions->selectedItem ());
}
@@ -708,7 +708,7 @@ void KateSessionChooser::selectionChanged ()
//BEGIN OPEN DIALOG
-KateSessionOpenDialog::KateSessionOpenDialog (TQWidget *parent)
+OldKateSessionOpenDialog::OldKateSessionOpenDialog (TQWidget *parent)
: KDialogBase ( parent
, ""
, true
@@ -737,22 +737,22 @@ KateSessionOpenDialog::KateSessionOpenDialog (TQWidget *parent)
connect (m_sessions, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotUser2()));
- KateSessionList &slist (KateSessionManager::self()->sessionList());
+ OldKateSessionList &slist (OldKateSessionManager::self()->sessionList());
for (unsigned int i=0; i < slist.count(); ++i)
{
- new KateSessionChooserItem (m_sessions, slist[i]);
+ new OldKateSessionChooserItem (m_sessions, slist[i]);
}
setResult (resultCancel);
}
-KateSessionOpenDialog::~KateSessionOpenDialog ()
+OldKateSessionOpenDialog::~OldKateSessionOpenDialog ()
{
}
-KateSession::Ptr KateSessionOpenDialog::selectedSession ()
+OldKateSession::Ptr OldKateSessionOpenDialog::selectedSession ()
{
- KateSessionChooserItem *item = (KateSessionChooserItem *) m_sessions->selectedItem ();
+ OldKateSessionChooserItem *item = (OldKateSessionChooserItem *) m_sessions->selectedItem ();
if (!item)
return 0;
@@ -760,12 +760,12 @@ KateSession::Ptr KateSessionOpenDialog::selectedSession ()
return item->session;
}
-void KateSessionOpenDialog::slotUser1 ()
+void OldKateSessionOpenDialog::slotUser1 ()
{
done (resultCancel);
}
-void KateSessionOpenDialog::slotUser2 ()
+void OldKateSessionOpenDialog::slotUser2 ()
{
done (resultOk);
}
@@ -774,7 +774,7 @@ void KateSessionOpenDialog::slotUser2 ()
//BEGIN MANAGE DIALOG
-KateSessionManageDialog::KateSessionManageDialog (TQWidget *parent)
+OldKateSessionManageDialog::OldKateSessionManageDialog (TQWidget *parent)
: KDialogBase ( parent
, ""
, true
@@ -821,27 +821,27 @@ KateSessionManageDialog::KateSessionManageDialog (TQWidget *parent)
selectionChanged ();
}
-KateSessionManageDialog::~KateSessionManageDialog ()
+OldKateSessionManageDialog::~OldKateSessionManageDialog ()
{
}
-void KateSessionManageDialog::slotUser1 ()
+void OldKateSessionManageDialog::slotUser1 ()
{
done (0);
}
-void KateSessionManageDialog::selectionChanged ()
+void OldKateSessionManageDialog::selectionChanged ()
{
- KateSessionChooserItem *item = (KateSessionChooserItem *) m_sessions->selectedItem ();
+ OldKateSessionChooserItem *item = (OldKateSessionChooserItem *) m_sessions->selectedItem ();
m_rename->setEnabled (item && item->session->sessionFileRelative() != "default.katesession");
m_del->setEnabled (item && item->session->sessionFileRelative() != "default.katesession");
}
-void KateSessionManageDialog::rename ()
+void OldKateSessionManageDialog::rename ()
{
- KateSessionChooserItem *item = (KateSessionChooserItem *) m_sessions->selectedItem ();
+ OldKateSessionChooserItem *item = (OldKateSessionChooserItem *) m_sessions->selectedItem ();
if (!item || item->session->sessionFileRelative() == "default.katesession")
return;
@@ -862,43 +862,43 @@ void KateSessionManageDialog::rename ()
updateSessionList ();
}
-void KateSessionManageDialog::del ()
+void OldKateSessionManageDialog::del ()
{
- KateSessionChooserItem *item = (KateSessionChooserItem *) m_sessions->selectedItem ();
+ OldKateSessionChooserItem *item = (OldKateSessionChooserItem *) m_sessions->selectedItem ();
if (!item || item->session->sessionFileRelative() == "default.katesession")
return;
TQFile::remove (item->session->sessionFile());
- KateSessionManager::self()->updateSessionList ();
+ OldKateSessionManager::self()->updateSessionList ();
updateSessionList ();
}
-void KateSessionManageDialog::updateSessionList ()
+void OldKateSessionManageDialog::updateSessionList ()
{
m_sessions->clear ();
- KateSessionList &slist (KateSessionManager::self()->sessionList());
+ OldKateSessionList &slist (OldKateSessionManager::self()->sessionList());
for (unsigned int i=0; i < slist.count(); ++i)
{
- new KateSessionChooserItem (m_sessions, slist[i]);
+ new OldKateSessionChooserItem (m_sessions, slist[i]);
}
}
//END MANAGE DIALOG
-KateSessionsAction::KateSessionsAction(const TQString& text, TQObject* parent, const char* name )
+OldKateSessionsAction::OldKateSessionsAction(const TQString& text, TQObject* parent, const char* name )
: TDEActionMenu(text, parent, name)
{
connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow()));
}
-void KateSessionsAction::slotAboutToShow()
+void OldKateSessionsAction::slotAboutToShow()
{
popupMenu()->clear ();
- KateSessionList &slist (KateSessionManager::self()->sessionList());
+ OldKateSessionList &slist (OldKateSessionManager::self()->sessionList());
for (unsigned int i=0; i < slist.count(); ++i)
{
popupMenu()->insertItem (
@@ -908,13 +908,13 @@ void KateSessionsAction::slotAboutToShow()
}
}
-void KateSessionsAction::openSession (int i)
+void OldKateSessionsAction::openSession (int i)
{
- KateSessionList &slist (KateSessionManager::self()->sessionList());
+ OldKateSessionList &slist (OldKateSessionManager::self()->sessionList());
if ((uint)i >= slist.count())
return;
- KateSessionManager::self()->activateSession(slist[(uint)i]);
+ OldKateSessionManager::self()->activateSession(slist[(uint)i]);
}
// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
diff --git a/kate/app/katesession.h b/kate/app/katesession.h
index b62e72a48..e8038d66e 100644
--- a/kate/app/katesession.h
+++ b/kate/app/katesession.h
@@ -29,7 +29,7 @@
#include <tqobject.h>
#include <tqvaluelist.h>
-class KateSessionManager;
+class OldKateSessionManager;
class KDirWatch;
class TDEListView;
@@ -37,13 +37,13 @@ class KPushButton;
class TQCheckBox;
-class KateSession : public TDEShared
+class OldKateSession : public TDEShared
{
public:
/**
* Define a Shared-Pointer type
*/
- typedef TDESharedPtr<KateSession> Ptr;
+ typedef TDESharedPtr<OldKateSession> Ptr;
public:
/**
@@ -52,7 +52,7 @@ class KateSession : public TDEShared
* @param name session name
* @param manager pointer to the manager
*/
- KateSession (KateSessionManager *manager, const TQString &fileName, const TQString &name);
+ OldKateSession (OldKateSessionManager *manager, const TQString &fileName, const TQString &name);
/**
* init the session object, after construction or create
@@ -62,7 +62,7 @@ class KateSession : public TDEShared
/**
* destruct me
*/
- ~KateSession ();
+ ~OldKateSession ();
/**
* session filename, absolute, calculated out of relative filename + session dir
@@ -143,9 +143,9 @@ class KateSession : public TDEShared
unsigned int m_documents;
/**
- * KateSessionMananger
+ * OldKateSessionMananger
*/
- KateSessionManager *m_manager;
+ OldKateSessionManager *m_manager;
/**
* simpleconfig to read from
@@ -158,27 +158,27 @@ class KateSession : public TDEShared
KSimpleConfig *m_writeConfig;
};
-typedef TQValueList<KateSession::Ptr> KateSessionList;
+typedef TQValueList<OldKateSession::Ptr> OldKateSessionList;
-class KateSessionManager : public TQObject
+class OldKateSessionManager : public TQObject
{
Q_OBJECT
public:
- KateSessionManager(TQObject *parent);
- ~KateSessionManager();
+ OldKateSessionManager(TQObject *parent);
+ ~OldKateSessionManager();
/**
* allow access to this :)
* @return instance of the session manager
*/
- static KateSessionManager *self();
+ static OldKateSessionManager *self();
/**
* allow access to the session list
* kept up to date by watching the dir
*/
- inline KateSessionList & sessionList () { updateSessionList (); return m_sessionList; }
+ inline OldKateSessionList & sessionList () { updateSessionList (); return m_sessionList; }
/**
* activate a session
@@ -189,20 +189,20 @@ class KateSessionManager : public TQObject
* @param saveLast try to save last session or not?
* @param loadNew load new session stuff?
*/
- void activateSession (KateSession::Ptr session, bool closeLast = true, bool saveLast = true, bool loadNew = true);
+ void activateSession (OldKateSession::Ptr session, bool closeLast = true, bool saveLast = true, bool loadNew = true);
/**
* create a new session
* @param name session name
*/
- KateSession::Ptr createSession (const TQString &name);
+ OldKateSession::Ptr createSession (const TQString &name);
/**
* return session with given name
* if no existing session matches, create new one with this name
* @param name session name
*/
- KateSession::Ptr giveSession (const TQString &name);
+ OldKateSession::Ptr giveSession (const TQString &name);
/**
* save current session
@@ -218,7 +218,7 @@ class KateSessionManager : public TQObject
* sessionFile == empty means we have no session around for this instance of kate
* @return session active atm
*/
- inline KateSession::Ptr activeSession () { return m_activeSession; }
+ inline OldKateSession::Ptr activeSession () { return m_activeSession; }
/**
* session dir
@@ -277,23 +277,23 @@ class KateSessionManager : public TQObject
/**
* list of current available sessions
*/
- KateSessionList m_sessionList;
+ OldKateSessionList m_sessionList;
/**
* current active session
*/
- KateSession::Ptr m_activeSession;
+ OldKateSession::Ptr m_activeSession;
};
-class KateSessionChooser : public KDialogBase
+class OldKateSessionChooser : public KDialogBase
{
Q_OBJECT
public:
- KateSessionChooser (TQWidget *parent, const TQString &lastSession);
- ~KateSessionChooser ();
+ OldKateSessionChooser (TQWidget *parent, const TQString &lastSession);
+ ~OldKateSessionChooser ();
- KateSession::Ptr selectedSession ();
+ OldKateSession::Ptr selectedSession ();
bool reopenLastSession ();
@@ -330,15 +330,15 @@ class KateSessionChooser : public KDialogBase
TQCheckBox *m_useLast;
};
-class KateSessionOpenDialog : public KDialogBase
+class OldKateSessionOpenDialog : public KDialogBase
{
Q_OBJECT
public:
- KateSessionOpenDialog (TQWidget *parent);
- ~KateSessionOpenDialog ();
+ OldKateSessionOpenDialog (TQWidget *parent);
+ ~OldKateSessionOpenDialog ();
- KateSession::Ptr selectedSession ();
+ OldKateSession::Ptr selectedSession ();
enum {
resultOk,
@@ -360,13 +360,13 @@ class KateSessionOpenDialog : public KDialogBase
TDEListView *m_sessions;
};
-class KateSessionManageDialog : public KDialogBase
+class OldKateSessionManageDialog : public KDialogBase
{
Q_OBJECT
public:
- KateSessionManageDialog (TQWidget *parent);
- ~KateSessionManageDialog ();
+ OldKateSessionManageDialog (TQWidget *parent);
+ ~OldKateSessionManageDialog ();
protected slots:
/**
@@ -401,13 +401,13 @@ class KateSessionManageDialog : public KDialogBase
KPushButton *m_del;
};
-class KateSessionsAction : public TDEActionMenu
+class OldKateSessionsAction : public TDEActionMenu
{
Q_OBJECT
public:
- KateSessionsAction(const TQString& text, TQObject* parent = 0, const char* name = 0);
- ~KateSessionsAction (){;};
+ OldKateSessionsAction(const TQString& text, TQObject* parent = 0, const char* name = 0);
+ ~OldKateSessionsAction (){;};
public slots:
void slotAboutToShow();
diff --git a/kate/app/katesessionpanel.cpp b/kate/app/katesessionpanel.cpp
index da595b15e..e852a9eee 100644
--- a/kate/app/katesessionpanel.cpp
+++ b/kate/app/katesessionpanel.cpp
@@ -46,7 +46,7 @@ void KateSessionPanelToolBarParent::resizeEvent (TQResizeEvent*)
KateSessionPanel::KateSessionPanel(KateMainWindow *mainWindow, KateViewManager *viewManager,
TQWidget *parent, const char *name)
: TQVBox(parent, name), m_mainWin(mainWindow), m_viewManager(viewManager),
- m_sessionManager(KateSessionManager::self()), m_actionCollection(new TDEActionCollection(this))
+ m_sessionManager(OldKateSessionManager::self()), m_actionCollection(new TDEActionCollection(this))
{
// Toolbar
setup_toolbar();
diff --git a/kate/app/katesessionpanel.h b/kate/app/katesessionpanel.h
index f110fd32b..bbbba6f14 100644
--- a/kate/app/katesessionpanel.h
+++ b/kate/app/katesessionpanel.h
@@ -33,7 +33,7 @@
class KateMainWindow;
class KateViewManager;
-class KateSessionManager;
+class OldKateSessionManager;
class TDEActionCollection;
@@ -80,7 +80,7 @@ class KateSessionPanel : public TQVBox
KateMainWindow *m_mainWin;
KateViewManager *m_viewManager;
- KateSessionManager *m_sessionManager;
+ OldKateSessionManager *m_sessionManager;
TDEActionCollection *m_actionCollection;
TDEToolBar *m_toolbar;
diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp
index ebc7a3b97..f53ec7468 100644
--- a/kate/app/kateviewspace.cpp
+++ b/kate/app/kateviewspace.cpp
@@ -114,7 +114,7 @@ void KateViewSpace::addView(Kate::View* v, bool show)
{
TQString vgroup = TQString("%1 %2").arg(m_group).arg(fn);
- KateSession::Ptr as = KateSessionManager::self()->activeSession ();
+ OldKateSession::Ptr as = OldKateSessionManager::self()->activeSession ();
if ( as->configRead() && as->configRead()->hasGroup( vgroup ) )
{
as->configRead()->setGroup( vgroup );