summaryrefslogtreecommitdiff
authorsudonix <sudonix>2004-03-19 03:38:01 (UTC)
committer sudonix <sudonix>2004-03-19 03:38:01 (UTC)
commit9449dc7fe3181a01f187dc5b361312824edd419c (patch) (unidiff)
tree5de78c6b172d650b82f25864b985d607fd68b91b
parent2c8db13612d37c941676b4033298afc8e757765d (diff)
downloadopie-9449dc7fe3181a01f187dc5b361312824edd419c.zip
opie-9449dc7fe3181a01f187dc5b361312824edd419c.tar.gz
opie-9449dc7fe3181a01f187dc5b361312824edd419c.tar.bz2
Minor typo occurence -> occurrence
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
index f82356b..b7cf9f5 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
@@ -95,193 +95,193 @@ SearchDialog::SearchDialog( QWidget *parent, QStringList &searchFor, QStringList
95 gbox->addWidget( m_opt2, 2, 0 ); 95 gbox->addWidget( m_opt2, 2, 0 );
96 96
97 m_opt3 = new QCheckBox(i18n("&From Beginning" ), group ); 97 m_opt3 = new QCheckBox(i18n("&From Beginning" ), group );
98 gbox->addWidget( m_opt3, 3, 0 ); 98 gbox->addWidget( m_opt3, 3, 0 );
99 99
100 m_opt4 = new QCheckBox(i18n("Find &Backwards" ), group ); 100 m_opt4 = new QCheckBox(i18n("Find &Backwards" ), group );
101 gbox->addWidget( m_opt4, 1, 1 ); 101 gbox->addWidget( m_opt4, 1, 1 );
102 102
103 m_opt5 = new QCheckBox(i18n("&Selected Text" ), group ); 103 m_opt5 = new QCheckBox(i18n("&Selected Text" ), group );
104 gbox->addWidget( m_opt5, 2, 1 ); 104 gbox->addWidget( m_opt5, 2, 1 );
105 105
106 m_opt1->setChecked( flags & KateView::sfCaseSensitive ); 106 m_opt1->setChecked( flags & KateView::sfCaseSensitive );
107 m_opt2->setChecked( flags & KateView::sfWholeWords ); 107 m_opt2->setChecked( flags & KateView::sfWholeWords );
108 m_opt3->setChecked( flags & KateView::sfFromBeginning ); 108 m_opt3->setChecked( flags & KateView::sfFromBeginning );
109 m_optRegExp->setChecked( flags & KateView::sfRegularExpression ); 109 m_optRegExp->setChecked( flags & KateView::sfRegularExpression );
110 m_opt4->setChecked( flags & KateView::sfBackward ); 110 m_opt4->setChecked( flags & KateView::sfBackward );
111 m_opt5->setChecked( flags & KateView::sfSelected ); 111 m_opt5->setChecked( flags & KateView::sfSelected );
112 112
113 if( m_replace ) 113 if( m_replace )
114 { 114 {
115 m_opt6 = new QCheckBox( i18n( "&Prompt On Replace" ), group ); 115 m_opt6 = new QCheckBox( i18n( "&Prompt On Replace" ), group );
116 m_opt6->setChecked( flags & KateView::sfPrompt ); 116 m_opt6->setChecked( flags & KateView::sfPrompt );
117 gbox->addWidget( m_opt6, 3, 1 ); 117 gbox->addWidget( m_opt6, 3, 1 );
118 } 118 }
119 119
120 m_search->setFocus(); 120 m_search->setFocus();
121} 121}
122 122
123QString SearchDialog::getSearchFor() 123QString SearchDialog::getSearchFor()
124{ 124{
125 return m_search->currentText(); 125 return m_search->currentText();
126} 126}
127 127
128QString SearchDialog::getReplaceWith() 128QString SearchDialog::getReplaceWith()
129{ 129{
130 return m_replace->currentText(); 130 return m_replace->currentText();
131} 131}
132 132
133int SearchDialog::getFlags() 133int SearchDialog::getFlags()
134{ 134{
135 int flags = 0; 135 int flags = 0;
136 136
137 if( m_opt1->isChecked() ) flags |= KateView::sfCaseSensitive; 137 if( m_opt1->isChecked() ) flags |= KateView::sfCaseSensitive;
138 if( m_opt2->isChecked() ) flags |= KateView::sfWholeWords; 138 if( m_opt2->isChecked() ) flags |= KateView::sfWholeWords;
139 if( m_opt3->isChecked() ) flags |= KateView::sfFromBeginning; 139 if( m_opt3->isChecked() ) flags |= KateView::sfFromBeginning;
140 if( m_opt4->isChecked() ) flags |= KateView::sfBackward; 140 if( m_opt4->isChecked() ) flags |= KateView::sfBackward;
141 if( m_opt5->isChecked() ) flags |= KateView::sfSelected; 141 if( m_opt5->isChecked() ) flags |= KateView::sfSelected;
142 if( m_optRegExp->isChecked() ) flags |= KateView::sfRegularExpression; 142 if( m_optRegExp->isChecked() ) flags |= KateView::sfRegularExpression;
143 if( m_replace ) 143 if( m_replace )
144 { 144 {
145 if( m_opt6->isChecked() ) 145 if( m_opt6->isChecked() )
146 flags |= KateView::sfPrompt; 146 flags |= KateView::sfPrompt;
147 147
148 flags |= KateView::sfReplace; 148 flags |= KateView::sfReplace;
149 } 149 }
150 150
151 return flags; 151 return flags;
152} 152}
153 153
154void SearchDialog::slotOk() 154void SearchDialog::slotOk()
155{ 155{
156 if ( !m_search->currentText().isEmpty() ) 156 if ( !m_search->currentText().isEmpty() )
157 { 157 {
158 if ( !m_optRegExp->isChecked() ) 158 if ( !m_optRegExp->isChecked() )
159 { 159 {
160 accept(); 160 accept();
161 } 161 }
162 else 162 else
163 { 163 {
164 // Check for a valid regular expression. 164 // Check for a valid regular expression.
165 165
166 QRegExp regExp( m_search->currentText() ); 166 QRegExp regExp( m_search->currentText() );
167 167
168 if ( regExp.isValid() ) 168 if ( regExp.isValid() )
169 accept(); 169 accept();
170 } 170 }
171 } 171 }
172} 172}
173 173
174void SearchDialog::setSearchText( const QString &searchstr ) 174void SearchDialog::setSearchText( const QString &searchstr )
175 { 175 {
176 m_search->insertItem( searchstr, 0 ); 176 m_search->insertItem( searchstr, 0 );
177 m_search->setCurrentItem( 0 ); 177 m_search->setCurrentItem( 0 );
178 m_search->lineEdit()->selectAll(); 178 m_search->lineEdit()->selectAll();
179 } 179 }
180 180
181// this dialog is not modal 181// this dialog is not modal
182ReplacePrompt::ReplacePrompt( QWidget *parent ) 182ReplacePrompt::ReplacePrompt( QWidget *parent )
183 : KDialogBase(parent, 0L, false, i18n( "Replace Text" ), 183 : KDialogBase(parent, 0L, false, i18n( "Replace Text" ),
184 User3 | User2 | User1 | Close, User3, true, 184 User3 | User2 | User1 | Close, User3, true,
185 i18n("&All"), i18n("&No"), i18n("&Yes")) { 185 i18n("&All"), i18n("&No"), i18n("&Yes")) {
186 186
187 QWidget *page = new QWidget(this); 187 QWidget *page = new QWidget(this);
188 setMainWidget(page); 188 setMainWidget(page);
189 189
190 QBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); 190 QBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
191 QLabel *label = new QLabel(i18n("Replace this occurence?"),page); 191 QLabel *label = new QLabel(i18n("Replace this occurrence?"),page);
192 topLayout->addWidget(label ); 192 topLayout->addWidget(label );
193} 193}
194 194
195void ReplacePrompt::slotUser1( void ) { // All 195void ReplacePrompt::slotUser1( void ) { // All
196 done(KateView::srAll); 196 done(KateView::srAll);
197} 197}
198 198
199void ReplacePrompt::slotUser2( void ) { // No 199void ReplacePrompt::slotUser2( void ) { // No
200 done(KateView::srNo); 200 done(KateView::srNo);
201} 201}
202 202
203void ReplacePrompt::slotUser3( void ) { // Yes 203void ReplacePrompt::slotUser3( void ) { // Yes
204 accept(); 204 accept();
205} 205}
206 206
207void ReplacePrompt::done(int r) { 207void ReplacePrompt::done(int r) {
208 setResult(r); 208 setResult(r);
209 emit clicked(); 209 emit clicked();
210} 210}
211 211
212void ReplacePrompt::closeEvent(QCloseEvent *) { 212void ReplacePrompt::closeEvent(QCloseEvent *) {
213 reject(); 213 reject();
214} 214}
215 215
216GotoLineDialog::GotoLineDialog(QWidget *parent, int line, int max) 216GotoLineDialog::GotoLineDialog(QWidget *parent, int line, int max)
217 : KDialogBase(parent, 0L, true, i18n("Goto Line"), Ok | Cancel, Ok) { 217 : KDialogBase(parent, 0L, true, i18n("Goto Line"), Ok | Cancel, Ok) {
218 218
219 QWidget *page = new QWidget(this); 219 QWidget *page = new QWidget(this);
220 setMainWidget(page); 220 setMainWidget(page);
221 221
222 QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); 222 QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
223 e1 = new QSpinBox(page); 223 e1 = new QSpinBox(page);
224 e1->setMinValue(1); 224 e1->setMinValue(1);
225 e1->setMaxValue(max); 225 e1->setMaxValue(max);
226 e1->setValue((int)line); 226 e1->setValue((int)line);
227 227
228 QLabel *label = new QLabel( e1,i18n("&Goto Line:"), page ); 228 QLabel *label = new QLabel( e1,i18n("&Goto Line:"), page );
229 topLayout->addWidget(label); 229 topLayout->addWidget(label);
230 topLayout->addWidget(e1); 230 topLayout->addWidget(e1);
231 topLayout->addSpacing(spacingHint()); // A little bit extra space 231 topLayout->addSpacing(spacingHint()); // A little bit extra space
232 topLayout->addStretch(10); 232 topLayout->addStretch(10);
233 e1->setFocus(); 233 e1->setFocus();
234} 234}
235 235
236int GotoLineDialog::getLine() { 236int GotoLineDialog::getLine() {
237 return e1->value(); 237 return e1->value();
238} 238}
239 239
240const int IndentConfigTab::flags[] = {KateView::cfAutoIndent, KateView::cfSpaceIndent, 240const int IndentConfigTab::flags[] = {KateView::cfAutoIndent, KateView::cfSpaceIndent,
241 KateView::cfBackspaceIndents,KateView::cfTabIndents, KateView::cfKeepIndentProfile, KateView::cfKeepExtraSpaces}; 241 KateView::cfBackspaceIndents,KateView::cfTabIndents, KateView::cfKeepIndentProfile, KateView::cfKeepExtraSpaces};
242 242
243IndentConfigTab::IndentConfigTab(QWidget *parent, KateView *view) 243IndentConfigTab::IndentConfigTab(QWidget *parent, KateView *view)
244 : QWidget(parent, 0L) 244 : QWidget(parent, 0L)
245{ 245{
246 QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() ); 246 QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() );
247 int configFlags = view->config(); 247 int configFlags = view->config();
248 248
249 opt[0] = new QCheckBox(i18n("&Auto Indent"), this); 249 opt[0] = new QCheckBox(i18n("&Auto Indent"), this);
250 layout->addWidget(opt[0], 0, AlignLeft); 250 layout->addWidget(opt[0], 0, AlignLeft);
251 opt[0]->setChecked(configFlags & flags[0]); 251 opt[0]->setChecked(configFlags & flags[0]);
252 252
253 opt[1] = new QCheckBox(i18n("Indent With &Spaces"), this); 253 opt[1] = new QCheckBox(i18n("Indent With &Spaces"), this);
254 layout->addWidget(opt[1], 0, AlignLeft); 254 layout->addWidget(opt[1], 0, AlignLeft);
255 opt[1]->setChecked(configFlags & flags[1]); 255 opt[1]->setChecked(configFlags & flags[1]);
256 256
257 opt[2] = new QCheckBox(i18n("&Backspace Key Indents"), this); 257 opt[2] = new QCheckBox(i18n("&Backspace Key Indents"), this);
258 layout->addWidget(opt[2], 0, AlignLeft); 258 layout->addWidget(opt[2], 0, AlignLeft);
259 opt[2]->setChecked(configFlags & flags[2]); 259 opt[2]->setChecked(configFlags & flags[2]);
260 260
261 opt[3] = new QCheckBox(i18n("&Tab Key Indents"), this); 261 opt[3] = new QCheckBox(i18n("&Tab Key Indents"), this);
262 layout->addWidget(opt[3], 0, AlignLeft); 262 layout->addWidget(opt[3], 0, AlignLeft);
263 opt[3]->setChecked(configFlags & flags[3]); 263 opt[3]->setChecked(configFlags & flags[3]);
264 264
265 opt[4] = new QCheckBox(i18n("Keep Indent &Profile"), this); 265 opt[4] = new QCheckBox(i18n("Keep Indent &Profile"), this);
266 layout->addWidget(opt[4], 0, AlignLeft); 266 layout->addWidget(opt[4], 0, AlignLeft);
267// opt[4]->setChecked(configFlags & flags[4]); 267// opt[4]->setChecked(configFlags & flags[4]);
268 opt[4]->setChecked(true); 268 opt[4]->setChecked(true);
269 opt[4]->hide(); 269 opt[4]->hide();
270 270
271 opt[5] = new QCheckBox(i18n("&Keep Extra Spaces"), this); 271 opt[5] = new QCheckBox(i18n("&Keep Extra Spaces"), this);
272 layout->addWidget(opt[5], 0, AlignLeft); 272 layout->addWidget(opt[5], 0, AlignLeft);
273 opt[5]->setChecked(configFlags & flags[5]); 273 opt[5]->setChecked(configFlags & flags[5]);
274 274
275 layout->addStretch(); 275 layout->addStretch();
276 276
277 // What is this? help 277 // What is this? help
278 QWhatsThis::add(opt[0], i18n("When <b>Auto indent</b> is on, KateView will indent new lines to equal the indent on the previous line.<p>If the previous line is blank, the nearest line above with text is used")); 278 QWhatsThis::add(opt[0], i18n("When <b>Auto indent</b> is on, KateView will indent new lines to equal the indent on the previous line.<p>If the previous line is blank, the nearest line above with text is used"));
279 QWhatsThis::add(opt[1], i18n("Check this if you want to indent with spaces rather than tabs.<br>A Tab will be converted to <u>Tab-width</u> as set in the <b>edit</b> options")); 279 QWhatsThis::add(opt[1], i18n("Check this if you want to indent with spaces rather than tabs.<br>A Tab will be converted to <u>Tab-width</u> as set in the <b>edit</b> options"));
280 QWhatsThis::add(opt[2], i18n("This allows the <b>backspace</b> key to be used to indent.")); 280 QWhatsThis::add(opt[2], i18n("This allows the <b>backspace</b> key to be used to indent."));
281 QWhatsThis::add(opt[3], i18n("This allows the <b>tab</b> key to be used to indent.")); 281 QWhatsThis::add(opt[3], i18n("This allows the <b>tab</b> key to be used to indent."));
282 QWhatsThis::add(opt[4], i18n("This retains current indentation settings for future documents.")); 282 QWhatsThis::add(opt[4], i18n("This retains current indentation settings for future documents."));
283 QWhatsThis::add(opt[5], i18n("Indentations of more than the selected number of spaces will not be shortened.")); 283 QWhatsThis::add(opt[5], i18n("Indentations of more than the selected number of spaces will not be shortened."));
284} 284}
285 285
286void IndentConfigTab::getData(KateView *view) { 286void IndentConfigTab::getData(KateView *view) {
287 int configFlags, z; 287 int configFlags, z;