Changeset View
Changeset View
Standalone View
Standalone View
kcms/emoticons/emoticonslist.cpp
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | |||||
109 | { | 109 | { | ||
110 | KAboutData *about = new KAboutData(QStringLiteral("kcm_emoticons"), i18n("Emoticons"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL); | 110 | KAboutData *about = new KAboutData(QStringLiteral("kcm_emoticons"), i18n("Emoticons"), QStringLiteral("1.0"), QString(), KAboutLicense::GPL); | ||
111 | setAboutData(about); | 111 | setAboutData(about); | ||
112 | // setButtons(Apply | Help); | 112 | // setButtons(Apply | Help); | ||
113 | setupUi(this); | 113 | setupUi(this); | ||
114 | btAdd->setIcon(QIcon::fromTheme(QStringLiteral("list-add"))); | 114 | btAdd->setIcon(QIcon::fromTheme(QStringLiteral("list-add"))); | ||
115 | btEdit->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename"))); | 115 | btEdit->setIcon(QIcon::fromTheme(QStringLiteral("edit-rename"))); | ||
116 | btRemoveEmoticon->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | 116 | btRemoveEmoticon->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | ||
117 | btNew->setIcon(QIcon::fromTheme(QStringLiteral("document-new"))); | 117 | btNew->setIcon(QIcon::fromTheme(QStringLiteral("list-add"))); | ||
118 | btGetNew->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff"))); | 118 | btGetNew->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff"))); | ||
119 | btInstall->setIcon(QIcon::fromTheme(QStringLiteral("document-import"))); | 119 | btInstall->setIcon(QIcon::fromTheme(QStringLiteral("document-import"))); | ||
120 | btRemoveTheme->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | 120 | btRemoveTheme->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | ||
121 | 121 | | |||
122 | connect(themeList, &QListWidget::itemSelectionChanged, this, &EmoticonList::selectTheme); | 122 | connect(themeList, &QListWidget::itemSelectionChanged, this, &EmoticonList::selectTheme); | ||
123 | connect(themeList, &QListWidget::itemSelectionChanged, this, &EmoticonList::updateButton); | 123 | connect(themeList, &QListWidget::itemSelectionChanged, this, &EmoticonList::updateButton); | ||
124 | connect(btRemoveTheme, &QPushButton::clicked, this, &EmoticonList::btRemoveThemeClicked); | 124 | connect(btRemoveTheme, &QPushButton::clicked, this, &EmoticonList::btRemoveThemeClicked); | ||
125 | connect(btInstall, &QPushButton::clicked, this, &EmoticonList::installEmoticonTheme); | 125 | connect(btInstall, &QPushButton::clicked, this, &EmoticonList::installEmoticonTheme); | ||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Line(s) | 311 | { | |||
356 | } | 356 | } | ||
357 | 357 | | |||
358 | emit changed(); | 358 | emit changed(); | ||
359 | delete dlg; | 359 | delete dlg; | ||
360 | } | 360 | } | ||
361 | 361 | | |||
362 | void EmoticonList::newTheme() | 362 | void EmoticonList::newTheme() | ||
363 | { | 363 | { | ||
364 | const QString name = KInputDialog::getText(i18n("New Emoticon Theme"), i18n("Enter the name of the new emoticon theme:")); | 364 | const QString name = KInputDialog::getText(i18n("New Emoticon Theme"), i18n("Name of new emoticon theme:")); | ||
ngraham: Shouldn't this use sentence case instead? Generally dialog boxes use sentence case for labels… | |||||
365 | if (name.isEmpty()) | 365 | if (name.isEmpty()) | ||
366 | return; | 366 | return; | ||
367 | const QString path = KGlobal::dirs()->saveLocation("emoticons", name, false); | 367 | const QString path = KGlobal::dirs()->saveLocation("emoticons", name, false); | ||
368 | 368 | | |||
369 | if (KIO::NetAccess::exists(QUrl(path), KIO::NetAccess::SourceSide, this)) { | 369 | if (KIO::NetAccess::exists(QUrl(path), KIO::NetAccess::SourceSide, this)) { | ||
370 | KMessageBox::error(this, i18n("%1 theme already exists", name)); | 370 | KMessageBox::error(this, i18n("%1 theme already exists", name)); | ||
371 | } else { | 371 | } else { | ||
372 | const QString constraint(QStringLiteral("(exist Library)")); | 372 | const QString constraint(QStringLiteral("(exist Library)")); | ||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |
Shouldn't this use sentence case instead? Generally dialog boxes use sentence case for labels like this.