Diffstat (limited to 'noncore/apps/tinykate/libkate') (more/less context) (ignore whitespace changes)
6 files changed, 66 insertions, 66 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 | |||
@@ -112,25 +112,25 @@ KWBuffer::slotLoadFile() | |||
112 | { | 112 | { |
113 | loadFilePart(); | 113 | loadFilePart(); |
114 | // emit linesChanged(m_totalLines); | 114 | // emit linesChanged(m_totalLines); |
115 | emit linesChanged(20); | 115 | emit linesChanged(20); |
116 | } | 116 | } |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Return the total number of lines in the buffer. | 119 | * Return the total number of lines in the buffer. |
120 | */ | 120 | */ |
121 | int | 121 | int |
122 | KWBuffer::count() | 122 | KWBuffer::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 | ||
131 | void KWBuffer::seek(int i) | 131 | void KWBuffer::seek(int i) |
132 | { | 132 | { |
133 | if (m_stringListCurrent == i) | 133 | if (m_stringListCurrent == i) |
134 | return; | 134 | return; |
135 | while(m_stringListCurrent < i) | 135 | while(m_stringListCurrent < i) |
136 | { | 136 | { |
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 | |||
@@ -62,25 +62,25 @@ void SyntaxDocument::setupModeList(bool force) | |||
62 | 62 | ||
63 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) | 63 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) |
64 | { | 64 | { |
65 | QString Group="Highlighting_Cache"+path+*it; | 65 | QString Group="Highlighting_Cache"+path+*it; |
66 | if ((config->hasGroup(Group)) && (!force)) | 66 | if ((config->hasGroup(Group)) && (!force)) |
67 | { | 67 | { |
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)); |
81 | Opie::XMLElement *e=m_root; | 81 | Opie::XMLElement *e=m_root; |
82 | if (e) | 82 | if (e) |
83 | { | 83 | { |
84 | e=e->firstChild(); | 84 | e=e->firstChild(); |
85 | qDebug(e->tagName()); | 85 | qDebug(e->tagName()); |
86 | if (e->tagName()=="language") | 86 | if (e->tagName()=="language") |
@@ -96,24 +96,25 @@ void SyntaxDocument::setupModeList(bool force) | |||
96 | 96 | ||
97 | mli->identifier = path+(*it); | 97 | mli->identifier = path+(*it); |
98 | config->setGroup(Group); | 98 | config->setGroup(Group); |
99 | config->writeEntry("name",mli->name); | 99 | config->writeEntry("name",mli->name); |
100 | config->writeEntry("section",mli->section); | 100 | config->writeEntry("section",mli->section); |
101 | config->writeEntry("mimetype",mli->mimetype); | 101 | config->writeEntry("mimetype",mli->mimetype); |
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 | ||
111 | SyntaxModeList SyntaxDocument::modeList() | 112 | SyntaxModeList SyntaxDocument::modeList() |
112 | { | 113 | { |
113 | return myModeList; | 114 | return myModeList; |
114 | } | 115 | } |
115 | 116 | ||
116 | bool SyntaxDocument::nextGroup( syntaxContextData* data) | 117 | bool SyntaxDocument::nextGroup( syntaxContextData* data) |
117 | { | 118 | { |
118 | if(!data) return false; | 119 | if(!data) return false; |
119 | 120 | ||
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 | |||
@@ -1,86 +1,91 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE= lib |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | HEADERS = microkde/kapplication.h \ | 3 | HEADERS = microkde/kapplication.h \ |
4 | kateconfig.h \ | 4 | kateconfig.h \ |
5 | microkde/kdebug.h \ | 5 | microkde/kdebug.h \ |
6 | microkde/kdialog.h \ | 6 | microkde/kdialog.h \ |
7 | microkde/kdialogbase.h \ | 7 | microkde/kdialogbase.h \ |
8 | microkde/kfiledialog.h \ | 8 | microkde/kfiledialog.h \ |
9 | microkde/kglobal.h \ | 9 | microkde/kglobal.h \ |
10 | microkde/kiconloader.h \ | 10 | microkde/kiconloader.h \ |
11 | microkde/klineedit.h \ | 11 | microkde/klineedit.h \ |
12 | microkde/klocale.h \ | 12 | microkde/klocale.h \ |
13 | microkde/kmessagebox.h \ | 13 | microkde/kmessagebox.h \ |
14 | microkde/kprinter.h \ | 14 | microkde/kprinter.h \ |
15 | microkde/krestrictedline.h \ | 15 | microkde/krestrictedline.h \ |
16 | microkde/kseparator.h \ | 16 | microkde/kseparator.h \ |
17 | microkde/kstandarddirs.h \ | 17 | microkde/kstandarddirs.h \ |
18 | microkde/ktempfile.h \ | 18 | microkde/ktempfile.h \ |
19 | microkde/kunload.h \ | 19 | microkde/kunload.h \ |
20 | microkde/kurlrequester.h \ | 20 | microkde/kurlrequester.h \ |
21 | microkde/kfontdialog.h \ | 21 | microkde/kfontdialog.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 | qt3back/qregexp3.h \ | 28 | \ |
29 | microkde/ksharedptr.h \ | 29 | \ |
30 | document/katebuffer.h document/katedialogs.h \ | 30 | qt3back/qregexp3.h \ |
31 | document/katetextline.h \ | 31 | microkde/ksharedptr.h \ |
32 | document/katecmd.h \ | 32 | document/katebuffer.h document/katedialogs.h \ |
33 | document/katehighlight.h \ | 33 | document/katetextline.h \ |
34 | document/katecmds.h document/katedocument.h \ | 34 | document/katecmd.h \ |
35 | document/katesyntaxdocument.h \ | 35 | document/katehighlight.h \ |
36 | view/kateundohistory.h \ | 36 | document/katecmds.h document/katedocument.h \ |
37 | view/kateview.h \ | 37 | document/katesyntaxdocument.h \ |
38 | view/kateviewdialog.h \ | 38 | view/kateundohistory.h \ |
39 | interfaces/view.h \ | 39 | view/kateview.h \ |
40 | interfaces/document.h \ | 40 | view/kateviewdialog.h \ |
41 | ktexteditor/ktexteditor.h | 41 | interfaces/view.h \ |
42 | interfaces/document.h \ | ||
43 | ktexteditor/ktexteditor.h | ||
42 | 44 | ||
43 | SOURCES = microkde/kapplication.cpp \ | 45 | SOURCES = microkde/kapplication.cpp \ |
44 | microkde/kdialogbase.cpp \ | 46 | microkde/kdialogbase.cpp \ |
45 | kateconfig.cpp \ | 47 | kateconfig.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 \ |
58 | qt3back/qregexp3.cpp \ | 61 | \ |
59 | ktexteditor/ktexteditor.cpp \ | 62 | \ |
60 | document/katebuffer.cpp document/katedialogs.cpp \ | 63 | qt3back/qregexp3.cpp \ |
61 | document/katehighlight.cpp \ | 64 | ktexteditor/ktexteditor.cpp \ |
62 | document/katecmd.cpp \ | 65 | document/katebuffer.cpp document/katedialogs.cpp \ |
63 | document/katesyntaxdocument.cpp document/katecmds.cpp \ | 66 | document/katehighlight.cpp \ |
64 | document/katedocument.cpp document/katetextline.cpp \ | 67 | document/katecmd.cpp \ |
65 | view/kateundohistory.cpp \ | 68 | document/katesyntaxdocument.cpp document/katecmds.cpp \ |
66 | view/kateview.cpp \ | 69 | document/katedocument.cpp document/katetextline.cpp \ |
67 | view/kateviewdialog.cpp \ | 70 | view/kateundohistory.cpp \ |
68 | interfaces/interfaces.cpp | 71 | view/kateview.cpp \ |
72 | view/kateviewdialog.cpp \ | ||
73 | interfaces/interfaces.cpp | ||
69 | 74 | ||
70 | INTERFACES = | 75 | INTERFACES= |
71 | INCLUDEPATH += $(OPIEDIR)/include \ | 76 | INCLUDEPATH+= $(OPIEDIR)/include \ |
72 | $(OPIEDIR)/noncore/apps/tinykate/libkate \ | 77 | $(OPIEDIR)/noncore/apps/tinykate/libkate \ |
73 | $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ | 78 | $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ |
74 | $(OPIEDIR)/noncore/apps/tinykate/libkate/document \ | 79 | $(OPIEDIR)/noncore/apps/tinykate/libkate/document \ |
75 | $(OPIEDIR)/noncore/apps/tinykate/libkate/view \ | 80 | $(OPIEDIR)/noncore/apps/tinykate/libkate/view \ |
76 | $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \ | 81 | $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \ |
77 | $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \ | 82 | $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \ |
78 | $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back | 83 | $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back |
79 | DEPENDPATH += $(OPIEDIR)/include | 84 | DEPENDPATH+= $(OPIEDIR)/include |
80 | LIBS += -lqpe -lopie | 85 | LIBS += -lqpe -lopie |
81 | TARGET = tinykate | 86 | TARGET = tinykate |
82 | 87 | ||
83 | INCLUDEPATH += $(OPIEDIR)/include | 88 | INCLUDEPATH += $(OPIEDIR)/include |
84 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) | 89 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) |
85 | 90 | ||
86 | include ( $(OPIEDIR)/include.pro ) | 91 | include ( $(OPIEDIR)/include.pro ) |
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 | |||
@@ -14,38 +14,36 @@ | |||
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
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 | |||
31 | KColorButton::KColorButton( QWidget *parent, const char *name ) | 29 | KColorButton::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 | } |
37 | 35 | ||
38 | KColorButton::KColorButton( const QColor &c, QWidget *parent, | 36 | KColorButton::KColorButton( const QColor &c, QWidget *parent, |
39 | const char *name ) | 37 | const char *name ) |
40 | : QPushButton( parent, name ), col(c), dragFlag(false) | 38 | : QPushButton( parent, name ), col(c), dragFlag(false) |
41 | { | 39 | { |
42 | 40 | ||
43 | // 2000-10-15 (putzer): fixes broken keyboard usage | 41 | // 2000-10-15 (putzer): fixes broken keyboard usage |
44 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); | 42 | connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); |
45 | } | 43 | } |
46 | 44 | ||
47 | void KColorButton::setColor( const QColor &c ) | 45 | void KColorButton::setColor( const QColor &c ) |
48 | { | 46 | { |
49 | col = c; | 47 | col = c; |
50 | repaint( false ); | 48 | repaint( false ); |
51 | } | 49 | } |
@@ -66,21 +64,21 @@ void KColorButton::drawButtonLabel( QPainter *painter ) | |||
66 | qDrawPlainRect( painter, l+b+1, t+b+1, w-b*2, h-b*2, lnCol, 1, 0 ); | 64 | qDrawPlainRect( painter, l+b+1, t+b+1, w-b*2, h-b*2, lnCol, 1, 0 ); |
67 | b++; | 65 | b++; |
68 | painter->fillRect( l+b+1, t+b+1, w-b*2, h-b*2, fillCol ); | 66 | painter->fillRect( l+b+1, t+b+1, w-b*2, h-b*2, fillCol ); |
69 | } else { | 67 | } else { |
70 | qDrawPlainRect( painter, l+b, t+b, w-b*2, h-b*2, lnCol, 1, 0 ); | 68 | qDrawPlainRect( painter, l+b, t+b, w-b*2, h-b*2, lnCol, 1, 0 ); |
71 | b++; | 69 | b++; |
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 | ||
76 | void KColorButton::chooseColor() | 74 | void 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 | } | ||
85 | } | 83 | } |
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,16 +1,14 @@ | |||
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 | ||
7 | class KColorDialog : OColorDialog | 6 | class 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 | ||
16 | #endif | 14 | #endif |
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 | |||
@@ -2187,31 +2187,33 @@ bool KateView::askReplaceEnd() { | |||
2187 | // replace finished | 2187 | // replace finished |
2188 | str = i18n("%1 replacement(s) made").arg(replaces); | 2188 | str = i18n("%1 replacement(s) made").arg(replaces); |
2189 | KMessageBox::information(this, str, i18n("Replace")); | 2189 | KMessageBox::information(this, str, i18n("Replace")); |
2190 | return true; | 2190 | return true; |
2191 | } | 2191 | } |
2192 | 2192 | ||
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 | ||
2212 | void KateView::replaceSlot() { | 2214 | void KateView::replaceSlot() { |
2213 | doReplaceAction(replacePrompt->result(),true); | 2215 | doReplaceAction(replacePrompt->result(),true); |
2214 | } | 2216 | } |
2215 | 2217 | ||
2216 | void KateView::installPopup(QPopupMenu *rmb_Menu) | 2218 | void KateView::installPopup(QPopupMenu *rmb_Menu) |
2217 | { | 2219 | { |
@@ -2257,25 +2259,24 @@ void KateView::writeSessionConfig(KateConfig *config) | |||
2257 | { | 2259 | { |
2258 | config->writeEntry("XPos",myViewInternal->xPos); | 2260 | config->writeEntry("XPos",myViewInternal->xPos); |
2259 | config->writeEntry("YPos",myViewInternal->yPos); | 2261 | config->writeEntry("YPos",myViewInternal->yPos); |
2260 | config->writeEntry("CursorX",myViewInternal->cursor.x); | 2262 | config->writeEntry("CursorX",myViewInternal->cursor.x); |
2261 | config->writeEntry("CursorY",myViewInternal->cursor.y); | 2263 | config->writeEntry("CursorY",myViewInternal->cursor.y); |
2262 | config->writeEntry("IconBorder on", myIconBorder); | 2264 | config->writeEntry("IconBorder on", myIconBorder); |
2263 | } | 2265 | } |
2264 | 2266 | ||
2265 | void KateView::configDialog() | 2267 | void 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 , |
2276 | KDialogBase::Ok, this, "tabdialog"); | 2277 | KDialogBase::Ok, this, "tabdialog"); |
2277 | 2278 | ||
2278 | // color options | 2279 | // color options |
2279 | QFrame *page=kd->addPage(i18n("Colors")); | 2280 | QFrame *page=kd->addPage(i18n("Colors")); |
2280 | (new QVBoxLayout(page))->setAutoAdd(true); | 2281 | (new QVBoxLayout(page))->setAutoAdd(true); |
2281 | ColorConfig *colorConfig = new ColorConfig(page); | 2282 | ColorConfig *colorConfig = new ColorConfig(page); |
@@ -2294,51 +2295,48 @@ void KateView::configDialog() | |||
2294 | 2295 | ||
2295 | IndentConfigTab *indentConfig = new IndentConfigTab(page, this); | 2296 | IndentConfigTab *indentConfig = new IndentConfigTab(page, this); |
2296 | 2297 | ||
2297 | // select options | 2298 | // select options |
2298 | page=kd->addPage(i18n("Select")); | 2299 | page=kd->addPage(i18n("Select")); |
2299 | (new QVBoxLayout(page))->setAutoAdd(true); | 2300 | (new QVBoxLayout(page))->setAutoAdd(true); |
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; |
2315 | ItemStyleList defaultStyleList; | 2315 | ItemStyleList defaultStyleList; |
2316 | 2316 | ||
2317 | hlManager = HlManager::self(); | 2317 | hlManager = HlManager::self(); |
2318 | 2318 | ||
2319 | defaultStyleList.setAutoDelete(true); | 2319 | defaultStyleList.setAutoDelete(true); |
2320 | hlManager->getDefaults(defaultStyleList); | 2320 | hlManager->getDefaults(defaultStyleList); |
2321 | 2321 | ||
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 | ||
2332 | kd->showMaximized(); | 2329 | hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page); |
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 | ||
2338 | applyColors(); | 2336 | applyColors(); |
2339 | // indent options | 2337 | // indent options |
2340 | indentConfig->getData(this); | 2338 | indentConfig->getData(this); |
2341 | // select options | 2339 | // select options |
2342 | selectConfig->getData(this); | 2340 | selectConfig->getData(this); |
2343 | // edit options | 2341 | // edit options |
2344 | editConfig->getData(this); | 2342 | editConfig->getData(this); |