Changeset View
Changeset View
Standalone View
Standalone View
src/mode/katemodeconfigpage.cpp
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 60 | for (const auto &hl : KateHlManager::self()->modeList()) { | |||
---|---|---|---|---|---|
70 | indentationModes << KateAutoIndent::listModes(); | 70 | indentationModes << KateAutoIndent::listModes(); | ||
71 | ui->cmbIndenter->addItems(indentationModes); | 71 | ui->cmbIndenter->addItems(indentationModes); | ||
72 | 72 | | |||
73 | connect(ui->cmbFiletypes, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); | 73 | connect(ui->cmbFiletypes, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); | ||
74 | connect(ui->btnNew, SIGNAL(clicked()), this, SLOT(newType())); | 74 | connect(ui->btnNew, SIGNAL(clicked()), this, SLOT(newType())); | ||
75 | connect(ui->btnDelete, SIGNAL(clicked()), this, SLOT(deleteType())); | 75 | connect(ui->btnDelete, SIGNAL(clicked()), this, SLOT(deleteType())); | ||
76 | ui->btnMimeTypes->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); | 76 | ui->btnMimeTypes->setIcon(QIcon::fromTheme(QStringLiteral("tools-wizard"))); | ||
77 | connect(ui->btnMimeTypes, SIGNAL(clicked()), this, SLOT(showMTDlg())); | 77 | connect(ui->btnMimeTypes, SIGNAL(clicked()), this, SLOT(showMTDlg())); | ||
78 | connect(ui->btnDownload, SIGNAL(clicked()), this, SLOT(hlDownload())); | | |||
79 | 78 | | |||
80 | reload(); | 79 | reload(); | ||
81 | 80 | | |||
82 | connect(ui->edtName, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 81 | connect(ui->edtName, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
83 | connect(ui->edtSection, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 82 | connect(ui->edtSection, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
84 | connect(ui->edtVariables, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 83 | connect(ui->edtVariables, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
85 | connect(ui->edtFileExtensions, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 84 | connect(ui->edtFileExtensions, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
86 | connect(ui->edtMimeTypes, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 85 | connect(ui->edtMimeTypes, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 284 | { | |||
289 | if (d.exec() == QDialog::Accepted) { | 288 | if (d.exec() == QDialog::Accepted) { | ||
290 | // do some checking, warn user if mime types or patterns are removed. | 289 | // do some checking, warn user if mime types or patterns are removed. | ||
291 | // if the lists are empty, and the fields not, warn. | 290 | // if the lists are empty, and the fields not, warn. | ||
292 | ui->edtFileExtensions->setText(d.chooser()->patterns().join(QLatin1Char(';'))); | 291 | ui->edtFileExtensions->setText(d.chooser()->patterns().join(QLatin1Char(';'))); | ||
293 | ui->edtMimeTypes->setText(d.chooser()->mimeTypes().join(QLatin1Char(';'))); | 292 | ui->edtMimeTypes->setText(d.chooser()->mimeTypes().join(QLatin1Char(';'))); | ||
294 | } | 293 | } | ||
295 | } | 294 | } | ||
296 | 295 | | |||
297 | void ModeConfigPage::hlDownload() | | |||
298 | { | | |||
299 | KateHlDownloadDialog diag(this, "hlDownload", true); | | |||
300 | diag.exec(); | | |||
301 | } | | |||
302 | | ||||
303 | QString ModeConfigPage::name() const | 296 | QString ModeConfigPage::name() const | ||
304 | { | 297 | { | ||
305 | return i18n("Modes && Filetypes"); | 298 | return i18n("Modes && Filetypes"); | ||
306 | } | 299 | } |