From 192b7af94830ff981760570254cce1a27a81d341 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 10 Aug 2015 16:45:54 +0900 Subject: Added Kate session panel. This commit contains the GUI elements. The logic will be added in a separate commit. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 0bcf08883..a867cb418 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -31,6 +31,7 @@ #include "kateapp.h" #include "katefileselector.h" #include "katefilelist.h" +#include "katesessionpanel.h" #include "kategrepdialog.h" #include "katemailfilesdialog.h" #include "katemainwindowiface.h" @@ -217,6 +218,9 @@ void KateMainWindow::setupMainWindow () fileselector = new KateFileSelector( this, m_viewManager, t, "operator"); connect(fileselector->dirOperator(),TQT_SIGNAL(fileSelected(const KFileItem*)),this,TQT_SLOT(fileSelected(const KFileItem*))); + KateMDI::ToolView *st = createToolView("kate_sessionpanel", KMultiTabBar::Left, SmallIcon("view_choose"), i18n("Sessions")); + sessionpanel = new KateSessionPanel( this, m_viewManager, st, "sessionpanel"); + // ONLY ALLOW SHELL ACCESS IF ALLOWED ;) if (KateApp::self()->authorize("shell_access")) { @@ -302,7 +306,7 @@ void KateMainWindow::setupActions() slotWindowActivated (); // session actions - new TDEAction(i18n("Menu entry Session->New", "&New"), "document-new", 0, TQT_TQOBJECT(KateSessionManager::self()), TQT_SLOT(sessionNew()), actionCollection(), "sessions_new"); + 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"); @@ -434,7 +438,7 @@ void KateMainWindow::saveOptions () config->writeEntry("Show Full Path in Title", m_viewManager->getShowFullPath()); config->writeEntry("Sync Konsole", syncKonsole); config->writeEntry("UseInstance", useInstance); - + fileOpenRecent->saveEntries(config, "Recent Files"); fileselector->writeConfig(config, "fileselector"); filelist->writeConfig(config, "Filelist"); @@ -482,7 +486,7 @@ void KateMainWindow::documentMenuAboutToShow() TQListViewItem * item = filelist->firstChild(); while( item ) { // would it be saner to use the screen width as a limit that some random number?? - TQString name = KStringHandler::rsqueeze( ((KateFileListItem *)item)->document()->docName(), 150 ); + TQString name = KStringHandler::rsqueeze( ((KateFileListItem *)item)->document()->docName(), 150 ); Kate::Document* doc = ((KateFileListItem *)item)->document(); documentMenu->insertItem ( doc->isModified() ? i18n("'document name [*]', [*] means modified", "%1 [*]").arg(name) : name, -- cgit v1.2.1 From 2eb61917990c77f0b67ef60a6d60a7fcab3b6ddc Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 14 Aug 2015 18:26:07 +0900 Subject: 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 --- kate/app/katemainwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kate/app/katemainwindow.cpp') 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 () -- cgit v1.2.1 From de91a161b1555bca58c4c30c6367dcc38750ca17 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 23 Oct 2015 17:59:00 +0700 Subject: Populated session panel. Now able to switch session within the new panel. *** NOTE *** In this commit both the old and new session managers are active, therefore funny things occasionally happen. Then won't be the case from the next commit since the old session manager will be disabled. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 794e1a777..1546c575b 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -370,7 +370,7 @@ bool KateMainWindow::queryClose() // and save docs if we really close down ! if ( queryClose_internal () ) { - KateApp::self()->sessionManager()->saveActiveSession(true, true); + KateApp::self()->oldSessionManager()->saveActiveSession(true, true); // detach the dcopClient KateApp::self()->dcopClient()->detach(); @@ -824,7 +824,7 @@ void KateMainWindow::updateCaption (Kate::Document *doc) c = m_viewManager->activeView()->getDoc()->url().prettyURL(); } - TQString sessName = KateApp::self()->sessionManager()->activeSession()->sessionName(); + TQString sessName = KateApp::self()->oldSessionManager()->activeSession()->sessionName(); if ( !sessName.isEmpty() ) sessName = TQString("%1: ").arg( sessName ); @@ -858,7 +858,7 @@ void KateMainWindow::saveGlobalProperties( TDEConfig* sessionConfig ) KateDocManager::self()->saveDocumentList (sessionConfig); sessionConfig->setGroup("General"); - sessionConfig->writeEntry ("Last Session", KateApp::self()->sessionManager()->activeSession()->sessionFileRelative()); + sessionConfig->writeEntry ("Last Session", KateApp::self()->oldSessionManager()->activeSession()->sessionFileRelative()); } // kate: space-indent on; indent-width 2; replace-tabs on; -- cgit v1.2.1 From 099c8a8821e896884180f57dda94af5fdbd87aaa Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 8 Feb 2016 16:39:21 +0700 Subject: Disabled the old session manager and switched permanently to the new one. Lot of functionality still missing. It is possible to switch sessions from the session panel (either by the activate pushbutton or by executing a listview item). Kate's session settings are currently not yet supported (last session is saved and restored by default). Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 1546c575b..527dbdc9c 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -305,8 +305,9 @@ void KateMainWindow::setupActions() slotWindowActivated (); +// MIKE to fix and enable again // session actions - new TDEAction(i18n("Menu entry Session->New", "&New"), "list-add", 0, TQT_TQOBJECT(OldKateSessionManager::self()), TQT_SLOT(sessionNew()), actionCollection(), "sessions_new"); +/* 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"); @@ -314,6 +315,7 @@ void KateMainWindow::setupActions() // quick open menu ;) new OldKateSessionsAction (i18n("&Quick Open"), actionCollection(), "sessions_list"); +*/ } KateTabWidget *KateMainWindow::tabWidget () @@ -370,7 +372,7 @@ bool KateMainWindow::queryClose() // and save docs if we really close down ! if ( queryClose_internal () ) { - KateApp::self()->oldSessionManager()->saveActiveSession(true, true); + KateApp::self()->sessionManager()->saveActiveSession(); // detach the dcopClient KateApp::self()->dcopClient()->detach(); @@ -824,7 +826,7 @@ void KateMainWindow::updateCaption (Kate::Document *doc) c = m_viewManager->activeView()->getDoc()->url().prettyURL(); } - TQString sessName = KateApp::self()->oldSessionManager()->activeSession()->sessionName(); + TQString sessName = KateApp::self()->sessionManager()->getActiveSessionName(); if ( !sessName.isEmpty() ) sessName = TQString("%1: ").arg( sessName ); @@ -855,10 +857,8 @@ void KateMainWindow::readProperties(TDEConfig *config) void KateMainWindow::saveGlobalProperties( TDEConfig* sessionConfig ) { - KateDocManager::self()->saveDocumentList (sessionConfig); - - sessionConfig->setGroup("General"); - sessionConfig->writeEntry ("Last Session", KateApp::self()->oldSessionManager()->activeSession()->sessionFileRelative()); +// MIKE do we still need this code here? +// KateDocManager::self()->saveDocumentList (sessionConfig); } // kate: space-indent on; indent-width 2; replace-tabs on; -- cgit v1.2.1 From 2675b2147b5ccc7782535e5f662847768bb8b442 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 19 Feb 2016 22:04:40 +0700 Subject: Added support for Kate startup options and for "New session" functionality. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 527dbdc9c..19a76ee27 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -305,7 +305,7 @@ void KateMainWindow::setupActions() slotWindowActivated (); -// MIKE to fix and enable again +// FIXME to fix and enable again // session actions /* 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"); @@ -857,7 +857,7 @@ void KateMainWindow::readProperties(TDEConfig *config) void KateMainWindow::saveGlobalProperties( TDEConfig* sessionConfig ) { -// MIKE do we still need this code here? +// FIXME do we still need this code here? // KateDocManager::self()->saveDocumentList (sessionConfig); } -- cgit v1.2.1 From 8644afed0d8e383cf3576c598b2ca76833a74e33 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 23 May 2016 16:17:18 +1000 Subject: Kate session panel: added support for switch/shutdown session options and fixed up logic where required. Fixed Kate quit process to support correct shutdown. Improved handling of configuration option changes. Some code rework. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 19a76ee27..4493eae12 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -329,9 +329,9 @@ void KateMainWindow::slotDocumentCloseAll() { } bool KateMainWindow::queryClose_internal() { - uint documentCount=KateDocManager::self()->documents(); + uint documentCount=KateDocManager::self()->documents(); - if ( ! showModOnDiskPrompt() ) + if ( !showModOnDiskPrompt() ) return false; TQPtrList modifiedDocuments=KateDocManager::self()->modifiedDocumentList(); @@ -360,23 +360,22 @@ bool KateMainWindow::queryClose() // just test, not close them actually if (KateApp::self()->sessionSaving()) { - return queryClose_internal (); + return queryClose_internal(); } // normal closing of window // allow to close all windows until the last without restrictions - if ( KateApp::self()->mainWindows () > 1 ) + if (KateApp::self()->mainWindows() > 1) + { return true; + } - // last one: check if we can close all documents, try run + // last one: check if we can close all documents and sessions, try run // and save docs if we really close down ! - if ( queryClose_internal () ) + if (queryClose_internal() && KateApp::self()->query_session_close()) { - KateApp::self()->sessionManager()->saveActiveSession(); - // detach the dcopClient KateApp::self()->dcopClient()->detach(); - return true; } @@ -403,7 +402,7 @@ void KateMainWindow::slotNewToolbarConfig() void KateMainWindow::slotFileQuit() { - KateApp::self()->shutdownKate (this); + KateApp::self()->shutdownKate(this); } void KateMainWindow::readOptions () @@ -574,6 +573,9 @@ void KateMainWindow::slotConfigure() dlg->exec(); delete dlg; + + // Inform Kate that options may have been changed + KateApp::self()->reparse_config(); } KURL KateMainWindow::activeDocumentUrl() -- cgit v1.2.1 From 6131095c14221ddbd16805059a9f3b3fc6c58225 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 8 Oct 2016 23:57:24 +0900 Subject: Kate session panel: added "Sessions" menu support. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.cpp | 99 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 14 deletions(-) (limited to 'kate/app/katemainwindow.cpp') diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 4493eae12..1a021beb9 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -219,7 +219,7 @@ void KateMainWindow::setupMainWindow () connect(fileselector->dirOperator(),TQT_SIGNAL(fileSelected(const KFileItem*)),this,TQT_SLOT(fileSelected(const KFileItem*))); KateMDI::ToolView *st = createToolView("kate_sessionpanel", KMultiTabBar::Left, SmallIcon("view_choose"), i18n("Sessions")); - sessionpanel = new KateSessionPanel( this, m_viewManager, st, "sessionpanel"); + m_sessionpanel = new KateSessionPanel( this, m_viewManager, st, "sessionpanel"); // ONLY ALLOW SHELL ACCESS IF ALLOWED ;) if (KateApp::self()->authorize("shell_access")) @@ -305,17 +305,30 @@ void KateMainWindow::setupActions() slotWindowActivated (); -// FIXME to fix and enable again // session actions -/* 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 OldKateSessionsAction (i18n("&Quick Open"), actionCollection(), "sessions_list"); -*/ + new TDEAction(i18n("&New"), "list-add", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotNewSession()), actionCollection(), "session_new"); + new TDEAction(i18n("&Save"), "document-save", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSaveSession()), actionCollection(), "session_save"); + new TDEAction(i18n("Save &As..."), "document-save-as", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSaveSessionAs()), actionCollection(), "session_save_as"); + new TDEAction(i18n("&Rename"), "edit_user", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotRenameSession()), actionCollection(), "session_rename"); + new TDEAction(i18n("&Delete"), "edit-delete", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotDeleteSession()), actionCollection(), "session_delete"); + new TDEAction(i18n("Re&load"), "reload", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotReloadSession()), actionCollection(), "session_reload"); + new TDEAction(i18n("Acti&vate"), "forward", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotActivateSession()), actionCollection(), "session_activate"); + new TDEToggleAction(i18n("Toggle read &only"), "encrypted", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionToggleReadOnly()), actionCollection(), "session_toggle_read_only"); + new TDEAction(i18n("Move &Up"), "go-up", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionMoveUp()), actionCollection(), "session_move_up"); + new TDEAction(i18n("Move Do&wn"), "go-down", 0, + TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionMoveDown()), actionCollection(), "session_move_down"); + new KateSessionListActionMenu(this, i18n("Sele&ct session"), actionCollection(), "session_list"); + + connect(m_sessionpanel, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); } KateTabWidget *KateMainWindow::tabWidget () @@ -857,10 +870,68 @@ void KateMainWindow::readProperties(TDEConfig *config) config->setGroup(grp); } -void KateMainWindow::saveGlobalProperties( TDEConfig* sessionConfig ) +//------------------------------------------- +void KateMainWindow::slotSelectionChanged() +{ + TDEActionCollection *mwac = actionCollection(); // Main Window Action Collection + TDEActionPtrList actionList = m_sessionpanel->m_actionCollection->actions(); + TDEActionPtrList::ConstIterator spa_it; + for (spa_it = actionList.begin(); spa_it != actionList.end(); ++spa_it) + { + TDEAction *a = mwac->action((*spa_it)->name()); + TDEToggleAction *ta = dynamic_cast(a); + if (ta) + { + ta->setChecked((dynamic_cast(*spa_it))->isChecked()); + } + if (a) + { + a->setEnabled((*spa_it)->isEnabled()); + } + } +} + +//------------------------------------------- +void KateMainWindow::activateSession(int sessionId) +{ + if (sessionId < 0 || sessionId == KateApp::self()->sessionManager()->getActiveSessionId()) + { + return; + } + + // Select the required session in the session panel's listview + TQListViewItem *item = m_sessionpanel->m_listview->firstChild(); + int idx = 0; + while (item && idx < sessionId) + { + item = item->nextSibling(); + ++idx; + } + if (idx == sessionId && item) + { + // Required session item found, switch session with consistent behavior + m_sessionpanel->m_listview->setSelected(item, true); + m_sessionpanel->slotActivateSession(); + } +} + +//------------------------------------------- +KateSessionListActionMenu::KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent, const char *name) + : TDEActionMenu(text, parent, name), m_mainWindow(mw) { -// FIXME do we still need this code here? -// KateDocManager::self()->saveDocumentList (sessionConfig); + connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow())); +} + +//------------------------------------------- +void KateSessionListActionMenu::slotAboutToShow() +{ + popupMenu()->clear(); + + TQPtrList &sessions = KateApp::self()->sessionManager()->getSessionsList(); + for (int idx = 0; idx < (int)sessions.count(); ++idx) + { + popupMenu()->insertItem(sessions[idx]->getSessionName(), m_mainWindow, TQT_SLOT(activateSession(int)), 0, idx); + } } // kate: space-indent on; indent-width 2; replace-tabs on; -- cgit v1.2.1