author | paule <paule> | 2007-01-13 07:05:32 (UTC) |
---|---|---|
committer | paule <paule> | 2007-01-13 07:05:32 (UTC) |
commit | c0eb83f37ec3c49d0c6b322840605f2a95ea0b52 (patch) (unidiff) | |
tree | e776b5f8fd7f5d8f5ff5e9e3c6d9d638999ed622 | |
parent | 75c65c1dc728929f0430b8faf956195657b73311 (diff) | |
download | opie-c0eb83f37ec3c49d0c6b322840605f2a95ea0b52.zip opie-c0eb83f37ec3c49d0c6b322840605f2a95ea0b52.tar.gz opie-c0eb83f37ec3c49d0c6b322840605f2a95ea0b52.tar.bz2 |
Set sensible minimum width for Goto Line dialog
-rw-r--r-- | noncore/apps/tinykate/libkate/view/kateviewdialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp index b7cf9f5..d6fde62 100644 --- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp +++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp | |||
@@ -201,64 +201,67 @@ void ReplacePrompt::slotUser2( void ) { // No | |||
201 | } | 201 | } |
202 | 202 | ||
203 | void ReplacePrompt::slotUser3( void ) { // Yes | 203 | void ReplacePrompt::slotUser3( void ) { // Yes |
204 | accept(); | 204 | accept(); |
205 | } | 205 | } |
206 | 206 | ||
207 | void ReplacePrompt::done(int r) { | 207 | void ReplacePrompt::done(int r) { |
208 | setResult(r); | 208 | setResult(r); |
209 | emit clicked(); | 209 | emit clicked(); |
210 | } | 210 | } |
211 | 211 | ||
212 | void ReplacePrompt::closeEvent(QCloseEvent *) { | 212 | void ReplacePrompt::closeEvent(QCloseEvent *) { |
213 | reject(); | 213 | reject(); |
214 | } | 214 | } |
215 | 215 | ||
216 | GotoLineDialog::GotoLineDialog(QWidget *parent, int line, int max) | 216 | GotoLineDialog::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 | |||
234 | page->setMinimumWidth(100); | ||
235 | |||
233 | e1->setFocus(); | 236 | e1->setFocus(); |
234 | } | 237 | } |
235 | 238 | ||
236 | int GotoLineDialog::getLine() { | 239 | int GotoLineDialog::getLine() { |
237 | return e1->value(); | 240 | return e1->value(); |
238 | } | 241 | } |
239 | 242 | ||
240 | const int IndentConfigTab::flags[] = {KateView::cfAutoIndent, KateView::cfSpaceIndent, | 243 | const int IndentConfigTab::flags[] = {KateView::cfAutoIndent, KateView::cfSpaceIndent, |
241 | KateView::cfBackspaceIndents,KateView::cfTabIndents, KateView::cfKeepIndentProfile, KateView::cfKeepExtraSpaces}; | 244 | KateView::cfBackspaceIndents,KateView::cfTabIndents, KateView::cfKeepIndentProfile, KateView::cfKeepExtraSpaces}; |
242 | 245 | ||
243 | IndentConfigTab::IndentConfigTab(QWidget *parent, KateView *view) | 246 | IndentConfigTab::IndentConfigTab(QWidget *parent, KateView *view) |
244 | : QWidget(parent, 0L) | 247 | : QWidget(parent, 0L) |
245 | { | 248 | { |
246 | QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() ); | 249 | QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint() ); |
247 | int configFlags = view->config(); | 250 | int configFlags = view->config(); |
248 | 251 | ||
249 | opt[0] = new QCheckBox(i18n("&Auto Indent"), this); | 252 | opt[0] = new QCheckBox(i18n("&Auto Indent"), this); |
250 | layout->addWidget(opt[0], 0, AlignLeft); | 253 | layout->addWidget(opt[0], 0, AlignLeft); |
251 | opt[0]->setChecked(configFlags & flags[0]); | 254 | opt[0]->setChecked(configFlags & flags[0]); |
252 | 255 | ||
253 | opt[1] = new QCheckBox(i18n("Indent With &Spaces"), this); | 256 | opt[1] = new QCheckBox(i18n("Indent With &Spaces"), this); |
254 | layout->addWidget(opt[1], 0, AlignLeft); | 257 | layout->addWidget(opt[1], 0, AlignLeft); |
255 | opt[1]->setChecked(configFlags & flags[1]); | 258 | opt[1]->setChecked(configFlags & flags[1]); |
256 | 259 | ||
257 | opt[2] = new QCheckBox(i18n("&Backspace Key Indents"), this); | 260 | opt[2] = new QCheckBox(i18n("&Backspace Key Indents"), this); |
258 | layout->addWidget(opt[2], 0, AlignLeft); | 261 | layout->addWidget(opt[2], 0, AlignLeft); |
259 | opt[2]->setChecked(configFlags & flags[2]); | 262 | opt[2]->setChecked(configFlags & flags[2]); |
260 | 263 | ||
261 | opt[3] = new QCheckBox(i18n("&Tab Key Indents"), this); | 264 | opt[3] = new QCheckBox(i18n("&Tab Key Indents"), this); |
262 | layout->addWidget(opt[3], 0, AlignLeft); | 265 | layout->addWidget(opt[3], 0, AlignLeft); |
263 | opt[3]->setChecked(configFlags & flags[3]); | 266 | opt[3]->setChecked(configFlags & flags[3]); |
264 | 267 | ||