summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/libkate') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katebuffer.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp3
-rw-r--r--noncore/apps/tinykate/libkate/libkate.pro5
-rw-r--r--noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp12
-rw-r--r--noncore/apps/tinykate/libkate/microkde/kcolordialog.h4
-rw-r--r--noncore/apps/tinykate/libkate/view/kateview.cpp14
6 files changed, 20 insertions, 20 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
index 38ba55d..22a4917 100644
--- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp
+++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
@@ -118,13 +118,13 @@ KWBuffer::slotLoadFile()
/**
* Return the total number of lines in the buffer.
*/
int
KWBuffer::count()
{
-// qDebug("m_stringList.count %d",m_stringList.count());
+ qDebug("m_stringList.count %d",m_stringList.count());
return m_lineCount;
// return m_stringList.count();
// return m_totalLines;
}
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 844f27d..f90a5f8 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -68,13 +68,13 @@ void SyntaxDocument::setupModeList(bool force)
config->setGroup(Group);
syntaxModeListItem *mli=new syntaxModeListItem;
mli->name = config->readEntry("name","");
mli->section = config->readEntry("section","");
mli->mimetype = config->readEntry("mimetype","");
mli->extension = config->readEntry("extension","");
- mli->identifier = *it;
+ mli->identifier = path+*it;
myModeList.append(mli);
}
else
{
qDebug("Found a description file:"+path+(*it));
setIdentifier(path+(*it));
@@ -102,12 +102,13 @@ void SyntaxDocument::setupModeList(bool force)
config->writeEntry("extension",mli->extension);
myModeList.append(mli);
}
}
}
}
+ config->write();
// config->sync();
}
SyntaxModeList SyntaxDocument::modeList()
{
return myModeList;
diff --git a/noncore/apps/tinykate/libkate/libkate.pro b/noncore/apps/tinykate/libkate/libkate.pro
index 5cb0b14..b282059 100644
--- a/noncore/apps/tinykate/libkate/libkate.pro
+++ b/noncore/apps/tinykate/libkate/libkate.pro
@@ -22,12 +22,14 @@ HEADERS = microkde/kapplication.h \
microkde/krun.h \
microkde/knumvalidator.h \
microkde/kstaticdeleter.h \
microkde/klistview.h \
microkde/kglobalsettings.h \
microkde/kcolorbtn.h \
+ \
+ \
qt3back/qregexp3.h \
microkde/ksharedptr.h \
document/katebuffer.h document/katedialogs.h \
document/katetextline.h \
document/katecmd.h \
document/katehighlight.h \
@@ -46,18 +48,21 @@ SOURCES = microkde/kapplication.cpp \
microkde/klocale.cpp \
microkde/kmessagebox.cpp \
microkde/kprocess.cpp \
microkde/kstandarddirs.cpp \
microkde/ktempfile.cpp \
microkde/kurlrequester.cpp \
+ microkde/kcolordialog.cpp \
microkde/kfontdialog.cpp \
microkde/krun.cpp \
microkde/knumvalidator.cpp \
microkde/kglobal.cpp \
microkde/kglobalsettings.cpp \
microkde/kcolorbtn.cpp \
+ \
+ \
qt3back/qregexp3.cpp \
ktexteditor/ktexteditor.cpp \
document/katebuffer.cpp document/katedialogs.cpp \
document/katehighlight.cpp \
document/katecmd.cpp \
document/katesyntaxdocument.cpp document/katecmds.cpp \
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
index 976f1db..5d21f15 100644
--- a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
+++ b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
@@ -20,17 +20,15 @@
#include <qdialog.h>
#include <qpainter.h>
#include <qdrawutil.h>
#include <qapplication.h>
#include <kglobalsettings.h>
-//#include "kcolordialog.h"
+#include "kcolordialog.h"
#include "kcolorbtn.h"
-#include <opie/colordialog.h>
-
KColorButton::KColorButton( QWidget *parent, const char *name )
: QPushButton( parent, name ), dragFlag(false)
{
// 2000-10-15 (putzer): fixes broken keyboard usage
connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
}
@@ -72,15 +70,15 @@ void KColorButton::drawButtonLabel( QPainter *painter )
painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol );
}
}
void KColorButton::chooseColor()
{
- QColor newCol=OColorDialog::getColor( col);
- if( newCol != QDialog::Rejected )
+ if( KColorDialog::getColor( col) == QDialog::Rejected )
{
- col=newCol;
+ return;
+ }
+
repaint( false );
emit changed( col );
}
-}
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
index 1d5c27e..0f831cd 100644
--- a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
+++ b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
@@ -1,15 +1,13 @@
#ifndef MINIKDE_KCOLORDIALOG_H
#define MINIKDE_KCOLORDIALOG_H
#include <qcolor.h>
-#include <opie/colordialog.h>
-class KColorDialog : OColorDialog
+class KColorDialog
{
- Q_OBJECT
public:
enum { Accepted };
static int getColor( const QColor & );
};
diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp
index de81d0f..af3b30d 100644
--- a/noncore/apps/tinykate/libkate/view/kateview.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateview.cpp
@@ -2193,19 +2193,21 @@ bool KateView::askReplaceEnd() {
// ask for continue
if (!(s.flags & KateView::sfBackward)) {
// forward search
str = i18n("%1 replacement(s) made.\n"
"End of document reached.\n"
"Continue from the beginning?").arg(replaces);
- query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop"));
+ query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
+ i18n("Continue"), i18n("Stop"));
} else {
// backward search
str = i18n("%1 replacement(s) made.\n"
"Beginning of document reached.\n"
"Continue from the end?").arg(replaces);
- query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop"));
+ query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
+ i18n("Continue"), i18n("Stop"));
}
replaces = 0;
continueSearch(s);
return (query == KMessageBox::No);
}
@@ -2263,13 +2265,12 @@ void KateView::writeSessionConfig(KateConfig *config)
}
void KateView::configDialog()
{
#warning fixme
- QScrollView *pScroll;
#if 1
KDialogBase *kd = new KDialogBase(KDialogBase::IconList,
i18n("Configure Editor"),
KDialogBase::Ok | KDialogBase::Cancel |
KDialogBase::Help ,
@@ -2300,15 +2301,14 @@ void KateView::configDialog()
SelectConfigTab *selectConfig = new SelectConfigTab(page, this);
// edit options
page=kd->addPage(i18n("Edit"));
(new QVBoxLayout(page))->setAutoAdd(true);
- pScroll=new QScrollView(page);
+
EditConfigTab *editConfig = new EditConfigTab(page, this);
- pScroll->addChild(editConfig);
HighlightDialogPage *hlPage;
HlManager *hlManager;
HlDataList hlDataList;
@@ -2322,16 +2322,14 @@ void KateView::configDialog()
hlDataList.setAutoDelete(true);
//this gets the data from the KateConfig object
hlManager->getHlDataList(hlDataList);
page=kd->addPage(i18n("Highlighting"));
(new QVBoxLayout(page))->setAutoAdd(true);
- pScroll=new QScrollView(page);
- hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, pScroll->viewport());
- pScroll->addChild(hlPage);
+ hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page);
kd->showMaximized();
if (kd->exec()) {
// color options
colorConfig->getColors(colors);
myDoc->setFont (fontConfig->getFont());