summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp2
-rw-r--r--noncore/apps/tinykate/mainwindow/tinykate.cpp6
2 files changed, 2 insertions, 6 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 9fa4452..d8f5aa7 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -48,27 +48,25 @@ void SyntaxDocument::setIdentifier(const QString& identifier)
}
SyntaxDocument::~SyntaxDocument()
{
}
void SyntaxDocument::setupModeList(bool force)
{
if (myModeList.count() > 0) return;
KateConfig *config=KGlobal::config();
- KStandardDirs *dirs = KGlobal::dirs();
-// QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true);
QString path=QPEApplication::qpeDir() +"share/tinykate/syntax/";
QDir dir(path);
QStringList list=dir.entryList("*.xml");
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
QString Group="Highlighting_Cache"+path+*it;
if ((config->hasGroup(Group)) && (!force))
{
config->setGroup(Group);
syntaxModeListItem *mli=new syntaxModeListItem;
diff --git a/noncore/apps/tinykate/mainwindow/tinykate.cpp b/noncore/apps/tinykate/mainwindow/tinykate.cpp
index e87464e..e920d5b 100644
--- a/noncore/apps/tinykate/mainwindow/tinykate.cpp
+++ b/noncore/apps/tinykate/mainwindow/tinykate.cpp
@@ -194,48 +194,47 @@ void TinyKate::slotOpen( )
{
QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
QString::null);
if (!filename.isEmpty())
{
open(filename);
}
}
void TinyKate::open(const QString & filename)
{
KateDocument *kd= new KateDocument(false, false, this,0,this);
- KTextEditor::View *kv;
QString realFileName;
//check if filename is a .desktop file
if ( filename.find( ".desktop", 0, true ) != -1 ) {
switch ( QMessageBox::warning( this, tr( "TinyKATE" ),
tr("TinyKATE has detected<BR>you selected a <B>.desktop</B> file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?" ),
tr(".desktop File"),
tr("Linked Document"), 0, 1, 1 ) )
{
case 0: //desktop
realFileName = filename;
break;
case 1: //linked
DocLnk docLnk( filename );
realFileName = docLnk.file();
break;
};
} else {
realFileName = filename;
}
QFileInfo fileInfo( realFileName );
QString filenamed = fileInfo.fileName();
- tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed );
+ tabwidget->addTab(kd->createView(tabwidget,"Unnamed kateview"),"tinykate/tinykate", filenamed );
odebug << realFileName << oendl;
kd->setDocName( filenamed);
kd->open( realFileName );
viewCount++;
}
void TinyKate::setDocument(const QString& fileref)
{
open( fileref );
}
@@ -269,29 +268,28 @@ void TinyKate::slotCurrentChanged( QWidget * view)
connect(editReplace,SIGNAL(activated()),currentView,SLOT(replace()));
connect(editGotoLine,SIGNAL(activated()),currentView,SLOT(gotoLine()));
connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
connect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));
connect(hlmenu,SIGNAL(activated(int)), currentView,SLOT(setHl(int)));
connect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog()));
}
void TinyKate::slotNew( )
{
KateDocument *kd= new KateDocument(false, false, this,0,this);
- KTextEditor::View *kv;
kd->setDocName(tr("Unnamed %1").arg(nextUnnamed++));
kd->setNewDoc(true);
- tabwidget->addTab(kv=kd->createView(tabwidget,"BLAH"),
+ tabwidget->addTab(kd->createView(tabwidget,"Unnamed"),
"tinykate/tinykate",
kd->docName());
viewCount++;
}
bool TinyKate::checkSave() {
if (currentView==0) return true;
KateView *kv = (KateView*) currentView;
if(kv->isModified()) {
KateDocument *kd = (KateDocument*) kv->document();
switch( QMessageBox::information( 0, (tr("TinyKATE")),