Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a6698be1 authored by Laurent Montel's avatar Laurent Montel 😁

improve tab

parent fdb08338
......@@ -61,11 +61,7 @@ void EmoticonTextEditSelector::slotCreateEmoticonList()
{
if (mListEmoticon->count() == 0) {
if (mEmojiPlainText) {
const QList<uint> lstEmoji = TextUtils::unicodeFullEmoji();
for (uint emoji : lstEmoji) {
const QString str = QString::fromUcs4(&emoji, 1);
new EmoticonTextEditItem(str, mListEmoticon);
}
mListEmoticon->setEmoticons(TextUtils::unicodeFullEmoji());
} else {
static QString cachedEmoticonsThemeName;
if (cachedEmoticonsThemeName.isEmpty()) {
......
......@@ -45,12 +45,19 @@ void EmoticonUnicodeTab::loadEmoticons()
createPlainTextEmoticonTab(i18n("Events"), KPIMTextEdit::TextUtils::unicodeEventEmoji());
createPlainTextEmoticonTab(i18n("Flags"), KPIMTextEdit::TextUtils::unicodeFlagsEmoji());
} else {
createEmoticonTab(QString());
//TODO
}
}
void EmoticonUnicodeTab::createEmoticonTab(const QString &str)
{
//Only one tab
EmoticonListWidgetSelector *selector = new EmoticonListWidgetSelector(this);
//TODO load it
//selector->setEmoticons(emoticons);
addTab(selector, str);
connect(selector, &KPIMTextEdit::EmoticonListWidgetSelector::itemSelected, this, &EmoticonUnicodeTab::itemSelected);
//TODO
}
......@@ -72,6 +79,8 @@ bool EmoticonUnicodeTab::emojiPlainText() const
void EmoticonUnicodeTab::setEmojiPlainText(bool emojiPlainText)
{
mEmojiPlainText = emojiPlainText;
clear();
if (mEmojiPlainText != emojiPlainText) {
mEmojiPlainText = emojiPlainText;
clear();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment