summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate
Unidiff
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()
118/** 118/**
119 * Return the total number of lines in the buffer. 119 * Return the total number of lines in the buffer.
120 */ 120 */
121int 121int
122KWBuffer::count() 122KWBuffer::count()
123{ 123{
124// qDebug("m_stringList.count %d",m_stringList.count()); 124 qDebug("m_stringList.count %d",m_stringList.count());
125 return m_lineCount; 125 return m_lineCount;
126 //return m_stringList.count(); 126 //return m_stringList.count();
127// return m_totalLines; 127// return m_totalLines;
128} 128}
129 129
130 130
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)
68 config->setGroup(Group); 68 config->setGroup(Group);
69 syntaxModeListItem *mli=new syntaxModeListItem; 69 syntaxModeListItem *mli=new syntaxModeListItem;
70 mli->name = config->readEntry("name",""); 70 mli->name = config->readEntry("name","");
71 mli->section = config->readEntry("section",""); 71 mli->section = config->readEntry("section","");
72 mli->mimetype = config->readEntry("mimetype",""); 72 mli->mimetype = config->readEntry("mimetype","");
73 mli->extension = config->readEntry("extension",""); 73 mli->extension = config->readEntry("extension","");
74 mli->identifier = *it; 74 mli->identifier = path+*it;
75 myModeList.append(mli); 75 myModeList.append(mli);
76 } 76 }
77 else 77 else
78 { 78 {
79 qDebug("Found a description file:"+path+(*it)); 79 qDebug("Found a description file:"+path+(*it));
80 setIdentifier(path+(*it)); 80 setIdentifier(path+(*it));
@@ -102,12 +102,13 @@ void SyntaxDocument::setupModeList(bool force)
102 config->writeEntry("extension",mli->extension); 102 config->writeEntry("extension",mli->extension);
103 myModeList.append(mli); 103 myModeList.append(mli);
104 } 104 }
105 } 105 }
106 } 106 }
107 } 107 }
108 config->write();
108// config->sync(); 109// config->sync();
109} 110}
110 111
111SyntaxModeList SyntaxDocument::modeList() 112SyntaxModeList SyntaxDocument::modeList()
112{ 113{
113 return myModeList; 114 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 \
22 microkde/krun.h \ 22 microkde/krun.h \
23 microkde/knumvalidator.h \ 23 microkde/knumvalidator.h \
24 microkde/kstaticdeleter.h \ 24 microkde/kstaticdeleter.h \
25 microkde/klistview.h \ 25 microkde/klistview.h \
26 microkde/kglobalsettings.h \ 26 microkde/kglobalsettings.h \
27 microkde/kcolorbtn.h \ 27 microkde/kcolorbtn.h \
28 \
29 \
28 qt3back/qregexp3.h \ 30 qt3back/qregexp3.h \
29 microkde/ksharedptr.h \ 31 microkde/ksharedptr.h \
30 document/katebuffer.h document/katedialogs.h \ 32 document/katebuffer.h document/katedialogs.h \
31 document/katetextline.h \ 33 document/katetextline.h \
32 document/katecmd.h \ 34 document/katecmd.h \
33 document/katehighlight.h \ 35 document/katehighlight.h \
@@ -46,18 +48,21 @@ SOURCES = microkde/kapplication.cpp \
46 microkde/klocale.cpp \ 48 microkde/klocale.cpp \
47 microkde/kmessagebox.cpp \ 49 microkde/kmessagebox.cpp \
48 microkde/kprocess.cpp \ 50 microkde/kprocess.cpp \
49 microkde/kstandarddirs.cpp \ 51 microkde/kstandarddirs.cpp \
50 microkde/ktempfile.cpp \ 52 microkde/ktempfile.cpp \
51 microkde/kurlrequester.cpp \ 53 microkde/kurlrequester.cpp \
54 microkde/kcolordialog.cpp \
52 microkde/kfontdialog.cpp \ 55 microkde/kfontdialog.cpp \
53 microkde/krun.cpp \ 56 microkde/krun.cpp \
54 microkde/knumvalidator.cpp \ 57 microkde/knumvalidator.cpp \
55 microkde/kglobal.cpp \ 58 microkde/kglobal.cpp \
56 microkde/kglobalsettings.cpp \ 59 microkde/kglobalsettings.cpp \
57 microkde/kcolorbtn.cpp \ 60 microkde/kcolorbtn.cpp \
61 \
62 \
58 qt3back/qregexp3.cpp \ 63 qt3back/qregexp3.cpp \
59 ktexteditor/ktexteditor.cpp \ 64 ktexteditor/ktexteditor.cpp \
60 document/katebuffer.cpp document/katedialogs.cpp \ 65 document/katebuffer.cpp document/katedialogs.cpp \
61 document/katehighlight.cpp \ 66 document/katehighlight.cpp \
62 document/katecmd.cpp \ 67 document/katecmd.cpp \
63 document/katesyntaxdocument.cpp document/katecmds.cpp \ 68 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 @@
20 20
21#include <qdialog.h> 21#include <qdialog.h>
22#include <qpainter.h> 22#include <qpainter.h>
23#include <qdrawutil.h> 23#include <qdrawutil.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <kglobalsettings.h> 25#include <kglobalsettings.h>
26//#include "kcolordialog.h" 26#include "kcolordialog.h"
27#include "kcolorbtn.h" 27#include "kcolorbtn.h"
28 28
29#include <opie/colordialog.h>
30
31KColorButton::KColorButton( QWidget *parent, const char *name ) 29KColorButton::KColorButton( QWidget *parent, const char *name )
32 : QPushButton( parent, name ), dragFlag(false) 30 : QPushButton( parent, name ), dragFlag(false)
33{ 31{
34 // 2000-10-15 (putzer): fixes broken keyboard usage 32 // 2000-10-15 (putzer): fixes broken keyboard usage
35 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); 33 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
36} 34}
@@ -72,15 +70,15 @@ void KColorButton::drawButtonLabel( QPainter *painter )
72 painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol ); 70 painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol );
73 } 71 }
74} 72}
75 73
76void KColorButton::chooseColor() 74void KColorButton::chooseColor()
77{ 75{
78 QColor newCol=OColorDialog::getColor( col); 76 if( KColorDialog::getColor( col) == QDialog::Rejected )
79 if( newCol != QDialog::Rejected )
80 { 77 {
81 col=newCol; 78 return;
79 }
80
82 repaint( false ); 81 repaint( false );
83 emit changed( col ); 82 emit changed( col );
84 } 83 }
85}
86 84
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 @@
1#ifndef MINIKDE_KCOLORDIALOG_H 1#ifndef MINIKDE_KCOLORDIALOG_H
2#define MINIKDE_KCOLORDIALOG_H 2#define MINIKDE_KCOLORDIALOG_H
3 3
4#include <qcolor.h> 4#include <qcolor.h>
5#include <opie/colordialog.h>
6 5
7class KColorDialog : OColorDialog 6class KColorDialog
8{ 7{
9 Q_OBJECT
10 public: 8 public:
11 enum { Accepted }; 9 enum { Accepted };
12 10
13 static int getColor( const QColor & ); 11 static int getColor( const QColor & );
14}; 12};
15 13
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() {
2193 // ask for continue 2193 // ask for continue
2194 if (!(s.flags & KateView::sfBackward)) { 2194 if (!(s.flags & KateView::sfBackward)) {
2195 // forward search 2195 // forward search
2196 str = i18n("%1 replacement(s) made.\n" 2196 str = i18n("%1 replacement(s) made.\n"
2197 "End of document reached.\n" 2197 "End of document reached.\n"
2198 "Continue from the beginning?").arg(replaces); 2198 "Continue from the beginning?").arg(replaces);
2199 query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop")); 2199 query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
2200 i18n("Continue"), i18n("Stop"));
2200 } else { 2201 } else {
2201 // backward search 2202 // backward search
2202 str = i18n("%1 replacement(s) made.\n" 2203 str = i18n("%1 replacement(s) made.\n"
2203 "Beginning of document reached.\n" 2204 "Beginning of document reached.\n"
2204 "Continue from the end?").arg(replaces); 2205 "Continue from the end?").arg(replaces);
2205 query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop")); 2206 query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
2207 i18n("Continue"), i18n("Stop"));
2206 } 2208 }
2207 replaces = 0; 2209 replaces = 0;
2208 continueSearch(s); 2210 continueSearch(s);
2209 return (query == KMessageBox::No); 2211 return (query == KMessageBox::No);
2210} 2212}
2211 2213
@@ -2263,13 +2265,12 @@ void KateView::writeSessionConfig(KateConfig *config)
2263} 2265}
2264 2266
2265void KateView::configDialog() 2267void KateView::configDialog()
2266{ 2268{
2267 2269
2268#warning fixme 2270#warning fixme
2269 QScrollView *pScroll;
2270 2271
2271#if 1 2272#if 1
2272 KDialogBase *kd = new KDialogBase(KDialogBase::IconList, 2273 KDialogBase *kd = new KDialogBase(KDialogBase::IconList,
2273 i18n("Configure Editor"), 2274 i18n("Configure Editor"),
2274 KDialogBase::Ok | KDialogBase::Cancel | 2275 KDialogBase::Ok | KDialogBase::Cancel |
2275 KDialogBase::Help , 2276 KDialogBase::Help ,
@@ -2300,15 +2301,14 @@ void KateView::configDialog()
2300 2301
2301 SelectConfigTab *selectConfig = new SelectConfigTab(page, this); 2302 SelectConfigTab *selectConfig = new SelectConfigTab(page, this);
2302 2303
2303 // edit options 2304 // edit options
2304 page=kd->addPage(i18n("Edit")); 2305 page=kd->addPage(i18n("Edit"));
2305 (new QVBoxLayout(page))->setAutoAdd(true); 2306 (new QVBoxLayout(page))->setAutoAdd(true);
2306 pScroll=new QScrollView(page); 2307
2307 EditConfigTab *editConfig = new EditConfigTab(page, this); 2308 EditConfigTab *editConfig = new EditConfigTab(page, this);
2308 pScroll->addChild(editConfig);
2309 2309
2310 2310
2311 2311
2312 HighlightDialogPage *hlPage; 2312 HighlightDialogPage *hlPage;
2313 HlManager *hlManager; 2313 HlManager *hlManager;
2314 HlDataList hlDataList; 2314 HlDataList hlDataList;
@@ -2322,16 +2322,14 @@ void KateView::configDialog()
2322 hlDataList.setAutoDelete(true); 2322 hlDataList.setAutoDelete(true);
2323 //this gets the data from the KateConfig object 2323 //this gets the data from the KateConfig object
2324 hlManager->getHlDataList(hlDataList); 2324 hlManager->getHlDataList(hlDataList);
2325 2325
2326 page=kd->addPage(i18n("Highlighting")); 2326 page=kd->addPage(i18n("Highlighting"));
2327 (new QVBoxLayout(page))->setAutoAdd(true); 2327 (new QVBoxLayout(page))->setAutoAdd(true);
2328 pScroll=new QScrollView(page);
2329 hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, pScroll->viewport());
2330 pScroll->addChild(hlPage);
2331 2328
2329 hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page);
2332 kd->showMaximized(); 2330 kd->showMaximized();
2333 if (kd->exec()) { 2331 if (kd->exec()) {
2334 // color options 2332 // color options
2335 colorConfig->getColors(colors); 2333 colorConfig->getColors(colors);
2336 myDoc->setFont (fontConfig->getFont()); 2334 myDoc->setFont (fontConfig->getFont());
2337 2335