mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
Make emojier use its own data instead of relying on ibus.
1. IBus data originated from unicode official data, use unicode data reduce the dependency on emoji feature. 2. It's not build data from run time gives us more control on when to update the data. Especially if font does not cover the emoji, it will just display a blank space. (At this point unicode-emoji 15.0 is out, but noto doesn't fully support it yet). 3. It is never a part of kimpanel infra, so also move it out of kimpanel directory. There are also other some small improvements: 1. The category name string is now under our own control, this also fixes the "&" accelerator issue in the side bar. 2. dict loading order now always load en. Otherwise certain language may only shows a small number of emoji. Can be tested via `LANGUAGE=ti_ER LANG=ti_ER.UTF-8 plasma-emojier`
This commit is contained in:
parent
902cb77151
commit
8e251dbce5
163 changed files with 408 additions and 86 deletions
8
.reuse/dep5
Normal file
8
.reuse/dep5
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: plasma-desktop
|
||||
Upstream-Contact: KDE <community@kde.org>
|
||||
Source: https://invent.kde.org/plasma/plasma-desktop/
|
||||
|
||||
Files: emojier/data/*.dict
|
||||
Copyright: Unicode, Inc.
|
||||
License: Unicode-DFS-2016
|
||||
|
|
@ -256,6 +256,7 @@ if(KAccounts_FOUND AND AccountsQt${QT_MAJOR_VERSION}_FOUND)
|
|||
endif()
|
||||
add_subdirectory(imports/activitymanager/)
|
||||
add_subdirectory(solid-device-automounter)
|
||||
add_subdirectory(emojier)
|
||||
if(X11_Xkb_FOUND AND XCB_XKB_FOUND)
|
||||
add_subdirectory(kaccess)
|
||||
endif()
|
||||
|
|
|
|||
22
LICENSES/Unicode-DFS-2016.txt
Normal file
22
LICENSES/Unicode-DFS-2016.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
|
||||
|
||||
Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
|
||||
|
||||
Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/.
|
||||
|
||||
Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
|
||||
|
||||
NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
|
||||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright © 1991-2022 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either
|
||||
|
||||
(a) this copyright and permission notice appear with all copies of the Data Files or Software, or
|
||||
(b) this copyright and permission notice appear in associated Documentation.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder.
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
if(IBUS_FOUND AND GLIB2_FOUND AND GOBJECT_FOUND)
|
||||
add_subdirectory(emojier)
|
||||
|
||||
configure_file(config-kimpanel.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kimpanel.h)
|
||||
if (QT_MAJOR_VERSION EQUAL "5")
|
||||
find_package(Qt5X11Extras)
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
kconfig_add_kcfg_files(emojier_KCFG emojiersettings.kcfgc GENERATE_MOC)
|
||||
|
||||
add_library(EmojierDeclarativePlugin SHARED emojierplugin.cpp ${emojier_KCFG})
|
||||
target_link_libraries(EmojierDeclarativePlugin PRIVATE GLIB2::GLIB2 PkgConfig::IBUS Qt::Qml Qt::Gui KF5::ConfigGui)
|
||||
|
||||
install (TARGETS EmojierDeclarativePlugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/emoji)
|
||||
install (FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/emoji)
|
||||
|
||||
add_subdirectory(app)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
add_executable(ibus-ui-emojier-plasma emojier.cpp resources.qrc)
|
||||
target_link_libraries(ibus-ui-emojier-plasma Qt::Widgets Qt::Quick KF5::ConfigGui KF5::I18n KF5::CoreAddons KF5::Crash KF5::DBusAddons KF5::WindowSystem)
|
||||
if (QT_MAJOR_VERSION EQUAL "5")
|
||||
target_link_libraries(ibus-ui-emojier-plasma Qt::X11Extras)
|
||||
else()
|
||||
target_link_libraries(ibus-ui-emojier-plasma Qt::GuiPrivate)
|
||||
endif()
|
||||
|
||||
install(TARGETS ibus-ui-emojier-plasma ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(FILES org.kde.plasma.emojier.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
|
||||
install(PROGRAMS org.kde.plasma.emojier.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
|
||||
12
emojier/CMakeLists.txt
Normal file
12
emojier/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
add_definitions(-DTRANSLATION_DOMAIN=\"org.kde.plasma.emojier\")
|
||||
|
||||
kconfig_add_kcfg_files(emojier_KCFG emojiersettings.kcfgc GENERATE_MOC)
|
||||
|
||||
add_library(EmojierDeclarativePlugin SHARED emojierplugin.cpp emojidict.cpp emojicategory.cpp ${emojier_KCFG})
|
||||
target_link_libraries(EmojierDeclarativePlugin PRIVATE Qt::Qml Qt::Gui KF5::ConfigGui KF5::I18n)
|
||||
|
||||
install (TARGETS EmojierDeclarativePlugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/emoji)
|
||||
install (FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/emoji)
|
||||
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(app)
|
||||
11
emojier/app/CMakeLists.txt
Normal file
11
emojier/app/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
add_executable(plasma-emojier emojier.cpp resources.qrc)
|
||||
target_link_libraries(plasma-emojier Qt::Widgets Qt::Quick KF5::ConfigGui KF5::I18n KF5::CoreAddons KF5::Crash KF5::DBusAddons KF5::WindowSystem)
|
||||
if (QT_MAJOR_VERSION EQUAL "5")
|
||||
target_link_libraries(plasma-emojier Qt::X11Extras)
|
||||
else()
|
||||
target_link_libraries(plasma-emojier Qt::GuiPrivate)
|
||||
endif()
|
||||
|
||||
install(TARGETS plasma-emojier ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(FILES org.kde.plasma.emojier.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
|
||||
install(PROGRAMS org.kde.plasma.emojier.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[Desktop Entry]
|
||||
Exec=ibus-ui-emojier-plasma
|
||||
Exec=plasma-emojier
|
||||
Name=Emoji Selector
|
||||
Name[ar]=منتقي إيموجي
|
||||
Name[ast]=Seleutor de fustaxes
|
||||
|
|
@ -10,22 +10,21 @@ Kirigami.Action {
|
|||
function getIcon(category) {
|
||||
switch (category.trim()) {
|
||||
case 'Activities': return 'games-highscores'
|
||||
case 'Animals & Nature': return 'animal'
|
||||
case 'Animals and Nature': return 'animal'
|
||||
case 'Flags': return 'flag'
|
||||
case 'Food & Drink': return 'food'
|
||||
case 'Food and Drink': return 'food'
|
||||
case 'Objects': return 'object'
|
||||
case 'People & Body': return 'user'
|
||||
case 'Smileys & Emotion':
|
||||
case 'Smileys & People': return 'smiley'
|
||||
case 'People and Body': return 'user'
|
||||
case 'Smileys and Emotion': return 'smiley'
|
||||
case 'Symbols': return 'checkmark'
|
||||
case 'Travel & Places': return 'globe'
|
||||
case 'Travel and Places': return 'globe'
|
||||
default: return 'folder'
|
||||
}
|
||||
}
|
||||
|
||||
property string category
|
||||
checked: window.pageStack.get(0).title === text
|
||||
text: i18nd("ibus10", category) //Get the translation of emoji categories from ibus10.mo installed by ibus
|
||||
text: i18ndc("org.kde.plasma.emojier", "Emoji Category", category)
|
||||
|
||||
icon.name: getIcon(category)
|
||||
onTriggered: {
|
||||
2
emojier/data/CMakeLists.txt
Normal file
2
emojier/data/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
file(GLOB EMOJI_DATA_FILES "*.dict")
|
||||
install(FILES ${EMOJI_DATA_FILES} DESTINATION ${KDE_INSTALL_DATADIR}/plasma/emoji)
|
||||
2
emojier/data/README.md
Normal file
2
emojier/data/README.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Dictionary file under this directory is generated from Unicode CLDR project
|
||||
(https://cldr.unicode.org/) and https://unicode.org/Public/emoji/.
|
||||
BIN
emojier/data/af.dict
Normal file
BIN
emojier/data/af.dict
Normal file
Binary file not shown.
BIN
emojier/data/am.dict
Normal file
BIN
emojier/data/am.dict
Normal file
Binary file not shown.
BIN
emojier/data/ar.dict
Normal file
BIN
emojier/data/ar.dict
Normal file
Binary file not shown.
BIN
emojier/data/ar_SA.dict
Normal file
BIN
emojier/data/ar_SA.dict
Normal file
Binary file not shown.
BIN
emojier/data/as.dict
Normal file
BIN
emojier/data/as.dict
Normal file
Binary file not shown.
BIN
emojier/data/ast.dict
Normal file
BIN
emojier/data/ast.dict
Normal file
Binary file not shown.
BIN
emojier/data/az.dict
Normal file
BIN
emojier/data/az.dict
Normal file
Binary file not shown.
BIN
emojier/data/be.dict
Normal file
BIN
emojier/data/be.dict
Normal file
Binary file not shown.
BIN
emojier/data/bg.dict
Normal file
BIN
emojier/data/bg.dict
Normal file
Binary file not shown.
BIN
emojier/data/bn.dict
Normal file
BIN
emojier/data/bn.dict
Normal file
Binary file not shown.
BIN
emojier/data/br.dict
Normal file
BIN
emojier/data/br.dict
Normal file
Binary file not shown.
BIN
emojier/data/bs.dict
Normal file
BIN
emojier/data/bs.dict
Normal file
Binary file not shown.
BIN
emojier/data/ca.dict
Normal file
BIN
emojier/data/ca.dict
Normal file
Binary file not shown.
BIN
emojier/data/ccp.dict
Normal file
BIN
emojier/data/ccp.dict
Normal file
Binary file not shown.
BIN
emojier/data/ceb.dict
Normal file
BIN
emojier/data/ceb.dict
Normal file
Binary file not shown.
BIN
emojier/data/chr.dict
Normal file
BIN
emojier/data/chr.dict
Normal file
Binary file not shown.
BIN
emojier/data/ckb.dict
Normal file
BIN
emojier/data/ckb.dict
Normal file
Binary file not shown.
BIN
emojier/data/cs.dict
Normal file
BIN
emojier/data/cs.dict
Normal file
Binary file not shown.
BIN
emojier/data/cy.dict
Normal file
BIN
emojier/data/cy.dict
Normal file
Binary file not shown.
BIN
emojier/data/da.dict
Normal file
BIN
emojier/data/da.dict
Normal file
Binary file not shown.
BIN
emojier/data/de.dict
Normal file
BIN
emojier/data/de.dict
Normal file
Binary file not shown.
BIN
emojier/data/de_CH.dict
Normal file
BIN
emojier/data/de_CH.dict
Normal file
Binary file not shown.
BIN
emojier/data/dsb.dict
Normal file
BIN
emojier/data/dsb.dict
Normal file
Binary file not shown.
BIN
emojier/data/el.dict
Normal file
BIN
emojier/data/el.dict
Normal file
Binary file not shown.
BIN
emojier/data/en.dict
Normal file
BIN
emojier/data/en.dict
Normal file
Binary file not shown.
BIN
emojier/data/en_001.dict
Normal file
BIN
emojier/data/en_001.dict
Normal file
Binary file not shown.
BIN
emojier/data/en_AU.dict
Normal file
BIN
emojier/data/en_AU.dict
Normal file
Binary file not shown.
BIN
emojier/data/en_CA.dict
Normal file
BIN
emojier/data/en_CA.dict
Normal file
Binary file not shown.
BIN
emojier/data/en_GB.dict
Normal file
BIN
emojier/data/en_GB.dict
Normal file
Binary file not shown.
BIN
emojier/data/es.dict
Normal file
BIN
emojier/data/es.dict
Normal file
Binary file not shown.
BIN
emojier/data/es_419.dict
Normal file
BIN
emojier/data/es_419.dict
Normal file
Binary file not shown.
BIN
emojier/data/es_MX.dict
Normal file
BIN
emojier/data/es_MX.dict
Normal file
Binary file not shown.
BIN
emojier/data/es_US.dict
Normal file
BIN
emojier/data/es_US.dict
Normal file
Binary file not shown.
BIN
emojier/data/et.dict
Normal file
BIN
emojier/data/et.dict
Normal file
Binary file not shown.
BIN
emojier/data/eu.dict
Normal file
BIN
emojier/data/eu.dict
Normal file
Binary file not shown.
BIN
emojier/data/fa.dict
Normal file
BIN
emojier/data/fa.dict
Normal file
Binary file not shown.
BIN
emojier/data/fi.dict
Normal file
BIN
emojier/data/fi.dict
Normal file
Binary file not shown.
BIN
emojier/data/fil.dict
Normal file
BIN
emojier/data/fil.dict
Normal file
Binary file not shown.
BIN
emojier/data/fo.dict
Normal file
BIN
emojier/data/fo.dict
Normal file
Binary file not shown.
BIN
emojier/data/fr.dict
Normal file
BIN
emojier/data/fr.dict
Normal file
Binary file not shown.
BIN
emojier/data/fr_CA.dict
Normal file
BIN
emojier/data/fr_CA.dict
Normal file
Binary file not shown.
BIN
emojier/data/ga.dict
Normal file
BIN
emojier/data/ga.dict
Normal file
Binary file not shown.
BIN
emojier/data/gd.dict
Normal file
BIN
emojier/data/gd.dict
Normal file
Binary file not shown.
BIN
emojier/data/gl.dict
Normal file
BIN
emojier/data/gl.dict
Normal file
Binary file not shown.
BIN
emojier/data/gu.dict
Normal file
BIN
emojier/data/gu.dict
Normal file
Binary file not shown.
BIN
emojier/data/ha.dict
Normal file
BIN
emojier/data/ha.dict
Normal file
Binary file not shown.
BIN
emojier/data/he.dict
Normal file
BIN
emojier/data/he.dict
Normal file
Binary file not shown.
BIN
emojier/data/hi.dict
Normal file
BIN
emojier/data/hi.dict
Normal file
Binary file not shown.
BIN
emojier/data/hi_Latn.dict
Normal file
BIN
emojier/data/hi_Latn.dict
Normal file
Binary file not shown.
BIN
emojier/data/hr.dict
Normal file
BIN
emojier/data/hr.dict
Normal file
Binary file not shown.
BIN
emojier/data/hsb.dict
Normal file
BIN
emojier/data/hsb.dict
Normal file
Binary file not shown.
BIN
emojier/data/hu.dict
Normal file
BIN
emojier/data/hu.dict
Normal file
Binary file not shown.
BIN
emojier/data/hy.dict
Normal file
BIN
emojier/data/hy.dict
Normal file
Binary file not shown.
BIN
emojier/data/ia.dict
Normal file
BIN
emojier/data/ia.dict
Normal file
Binary file not shown.
BIN
emojier/data/id.dict
Normal file
BIN
emojier/data/id.dict
Normal file
Binary file not shown.
BIN
emojier/data/ig.dict
Normal file
BIN
emojier/data/ig.dict
Normal file
Binary file not shown.
BIN
emojier/data/is.dict
Normal file
BIN
emojier/data/is.dict
Normal file
Binary file not shown.
BIN
emojier/data/it.dict
Normal file
BIN
emojier/data/it.dict
Normal file
Binary file not shown.
BIN
emojier/data/ja.dict
Normal file
BIN
emojier/data/ja.dict
Normal file
Binary file not shown.
BIN
emojier/data/jv.dict
Normal file
BIN
emojier/data/jv.dict
Normal file
Binary file not shown.
BIN
emojier/data/ka.dict
Normal file
BIN
emojier/data/ka.dict
Normal file
Binary file not shown.
BIN
emojier/data/kab.dict
Normal file
BIN
emojier/data/kab.dict
Normal file
Binary file not shown.
BIN
emojier/data/kk.dict
Normal file
BIN
emojier/data/kk.dict
Normal file
Binary file not shown.
BIN
emojier/data/kl.dict
Normal file
BIN
emojier/data/kl.dict
Normal file
Binary file not shown.
BIN
emojier/data/km.dict
Normal file
BIN
emojier/data/km.dict
Normal file
Binary file not shown.
BIN
emojier/data/kn.dict
Normal file
BIN
emojier/data/kn.dict
Normal file
Binary file not shown.
BIN
emojier/data/ko.dict
Normal file
BIN
emojier/data/ko.dict
Normal file
Binary file not shown.
BIN
emojier/data/kok.dict
Normal file
BIN
emojier/data/kok.dict
Normal file
Binary file not shown.
BIN
emojier/data/ky.dict
Normal file
BIN
emojier/data/ky.dict
Normal file
Binary file not shown.
BIN
emojier/data/lb.dict
Normal file
BIN
emojier/data/lb.dict
Normal file
Binary file not shown.
BIN
emojier/data/lo.dict
Normal file
BIN
emojier/data/lo.dict
Normal file
Binary file not shown.
BIN
emojier/data/lt.dict
Normal file
BIN
emojier/data/lt.dict
Normal file
Binary file not shown.
BIN
emojier/data/lv.dict
Normal file
BIN
emojier/data/lv.dict
Normal file
Binary file not shown.
BIN
emojier/data/mi.dict
Normal file
BIN
emojier/data/mi.dict
Normal file
Binary file not shown.
BIN
emojier/data/mk.dict
Normal file
BIN
emojier/data/mk.dict
Normal file
Binary file not shown.
BIN
emojier/data/ml.dict
Normal file
BIN
emojier/data/ml.dict
Normal file
Binary file not shown.
BIN
emojier/data/mn.dict
Normal file
BIN
emojier/data/mn.dict
Normal file
Binary file not shown.
BIN
emojier/data/mni.dict
Normal file
BIN
emojier/data/mni.dict
Normal file
Binary file not shown.
BIN
emojier/data/mr.dict
Normal file
BIN
emojier/data/mr.dict
Normal file
Binary file not shown.
BIN
emojier/data/ms.dict
Normal file
BIN
emojier/data/ms.dict
Normal file
Binary file not shown.
BIN
emojier/data/mt.dict
Normal file
BIN
emojier/data/mt.dict
Normal file
Binary file not shown.
BIN
emojier/data/my.dict
Normal file
BIN
emojier/data/my.dict
Normal file
Binary file not shown.
BIN
emojier/data/ne.dict
Normal file
BIN
emojier/data/ne.dict
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue