Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Palapeli
Commits
1ba706f6
Commit
1ba706f6
authored
Aug 12, 2022
by
Nicolas Fella
Browse files
Port thumbnailer to new install location and embed metadata
parent
81660563
Pipeline
#217263
passed with stage
in 1 minute and 58 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
mime/CMakeLists.txt
View file @
1ba706f6
...
...
@@ -9,8 +9,5 @@ update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
install
(
PROGRAMS palapeli_servicemenu.desktop DESTINATION
${
KDE_INSTALL_DATADIR
}
/kio/servicemenus
)
# thumbnail creator plugin
add_library
(
palathumbcreator
MODULE
thumbnail-creator.cpp
)
kcoreaddons_add_plugin
(
palathumbcreator
SOURCES
thumbnail-creator.cpp
INSTALL_NAMESPACE
"kf
${
QT_MAJOR_VERSION
}
/thumbcreator"
)
target_link_libraries
(
palathumbcreator KF5::KIOCore KF5::KIOWidgets KF5::Archive
)
install
(
TARGETS palathumbcreator DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
)
install
(
FILES palathumbcreator.desktop DESTINATION
${
KDE_INSTALL_KSERVICESDIR
}
)
mime/palathumbcreator.desktop
deleted
100644 → 0
View file @
81660563
[Desktop Entry]
Type=Service
Name=Palapeli puzzles
Name[bs]=Palapeli slagalice
Name[ca]=Trencaclosques del Palapeli
Name[ca@valencia]=Trencaclosques de Palapeli
Name[cs]=Palapeli puzzle
Name[da]=Palapeli-puslespil
Name[de]=Palapeli-Puzzle
Name[el]=Palapeli puzzles
Name[en_GB]=Palapeli puzzles
Name[es]=Rompecabezas de Palapeli
Name[et]=Palapeli pusled
Name[eu]=Palapeli buru-hausgarriak
Name[fi]=Palapelit
Name[fr]=Puzzles Palapeli
Name[ga]=Puzail Palapeli
Name[gl]=Quebracabezas de Palapeli
Name[hu]=Palapeli-feladványok
Name[is]=Palapeli púsl
Name[it]=Puzzle per Palapeli
Name[kk]=Palapeli басқатырғышы
Name[km]=ល្បែងផ្គុំរូប Palapeli
Name[ko]=Palapeli 퍼즐
Name[lv]=Palapeli mīklas
Name[mr]=पालापेली कोडी
Name[nb]=Palapeli-puslespill
Name[nds]=Palapeli-Pusselspelen
Name[nl]=Palapeli puzzels
Name[nn]=Palapeli-puslespel
Name[pl]=Puzzle Palapeli
Name[pt]='Puzzles' do Palapeli
Name[pt_BR]=Quebra-cabeças do Palapeli
Name[ro]=Puzzle-uri Palapeli
Name[ru]=Головоломки Palapeli
Name[sk]=Palapeli puzzle
Name[sl]=Sestavljanke Palapeli
Name[sr]=Палапелијеве слагалице
Name[sr@ijekavian]=Палапелијеве слагалице
Name[sr@ijekavianlatin]=Palapelijeve slagalice
Name[sr@latin]=Palapelijeve slagalice
Name[sv]=Palapeli-pussel
Name[tr]=Palapeli yapbozları
Name[uk]=Складанки Palapeli
Name[x-test]=xxPalapeli puzzlesxx
Name[zh_CN]=Palapeli 拼图
Name[zh_TW]=Palapeli 謎題
ServiceTypes=ThumbCreator
MimeType=application/x-palapeli-puzzle;
CacheThumbnail=true
X-KDE-Library=palathumbcreator
mime/palathumbcreator.json
0 → 100644
View file @
1ba706f6
{
"CacheThumbnail"
:
true
,
"KPlugin"
:
{
"MimeTypes"
:
[
"application/x-palapeli-puzzle"
],
"Name"
:
"Palapeli puzzles"
}
}
mime/thumbnail-creator.cpp
View file @
1ba706f6
...
...
@@ -26,6 +26,13 @@ extern "C"
}
}
class
KIOPluginForMetaData
:
public
QObject
{
Q_OBJECT
Q_PLUGIN_METADATA
(
IID
"KIOPluginForMetaData"
FILE
"palathumbcreator.json"
)
};
bool
Palapeli
::
ThumbCreator
::
create
(
const
QString
&
path
,
int
width
,
int
height
,
QImage
&
image
)
{
Q_UNUSED
(
width
)
Q_UNUSED
(
height
)
//NOTE: The ThumbCreator APIDOX says that these params should be ignored for images read from the disk.
...
...
@@ -41,3 +48,5 @@ bool Palapeli::ThumbCreator::create(const QString& path, int width, int height,
image
.
load
(
cachePath
+
QLatin1String
(
"image.jpg"
));
return
true
;
}
#include
"thumbnail-creator.moc"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment