Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDGData: misc fixes #4110

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1397,22 +1397,6 @@ else(WIN32)
INSTALL(TARGETS FreeCADGui
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
#INSTALL(FILES Icons/freecad.xpm
# Icons/freecad-icon-16.png
# Icons/freecad-icon-32.png
# Icons/freecad-icon-48.png
# Icons/freecad-icon-64.png
# Icons/freecad.svg
# Icons/freecad-doc.png
# DESTINATION ${CMAKE_INSTALL_DATADIR}
#)
INSTALL(FILES Icons/freecad-icon-16.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps RENAME freecad.png)
INSTALL(FILES Icons/freecad-icon-32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps RENAME freecad.png)
INSTALL(FILES Icons/freecad-icon-48.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps RENAME freecad.png)
INSTALL(FILES Icons/freecad-icon-64.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps RENAME freecad.png)
INSTALL(FILES Icons/freecad.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
INSTALL(FILES Icons/freecad.xpm DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps)
INSTALL(FILES Icons/freecad-doc.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/mimetypes RENAME application-x-extension-fcstd.svg)
endif(WIN32)

set(FreeCADGui_Scripts
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/FileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,10 @@ QIcon FileIconProvider::icon(const QFileInfo & info) const
{
if (info.suffix().toLower() == QLatin1String("fcstd")) {
// return QApplication::windowIcon();
return QIcon(QString::fromLatin1(":/icons/freecad-doc.png"));
return QIcon(QString::fromLatin1(":/icons/freecad-doc-64.png"));
}
else if (info.suffix().toLower().startsWith(QLatin1String("fcstd"))) {
QIcon icon(QString::fromLatin1(":/icons/freecad-doc.png"));
QIcon icon(QString::fromLatin1(":/icons/freecad-doc-64.png"));
QIcon darkIcon;
int w = QApplication::style()->pixelMetric(QStyle::PM_ListViewIconSize);
darkIcon.addPixmap(icon.pixmap(w, w, QIcon::Disabled, QIcon::Off), QIcon::Normal, QIcon::Off);
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion src/Gui/Icons/resource.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<file>list-remove.svg</file>
<file>list-add.svg</file>
<file>freecad.svg</file>
<file>freecad-doc.png</file>
<file>freecad-doc-64.png</file>
<file>bulb.svg</file>
<file>TextDocument.svg</file>
<file>button_down.svg</file>
Expand Down
60 changes: 52 additions & 8 deletions src/XDGData/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(GNUInstallDirs)
set(APPDATA_RELEASE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${FREECAD_VERSION_PATCH}${PACKAGE_VERSION_SUFFIX}")

if(NOT DEFINED APPDATA_RELEASE_DATE)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
Expand All @@ -17,10 +17,11 @@ endif()

configure_file(
org.freecadweb.FreeCAD.appdata.xml.in
${CMAKE_BINARY_DIR}/org.freecadweb.FreeCAD.appdata.xml
org.freecadweb.FreeCAD.appdata.xml
)

install(
FILES ${CMAKE_BINARY_DIR}/org.freecadweb.FreeCAD.appdata.xml
FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freecadweb.FreeCAD.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo
)

Expand All @@ -29,11 +30,6 @@ install(
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications
)

install(
FILES org.freecadweb.FreeCAD.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps
)

install(
FILES org.freecadweb.FreeCAD.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
Expand All @@ -43,3 +39,51 @@ install(
FILES FreeCAD.thumbnailer
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/thumbnailers
)

install(
FILES ../Gui/Icons/freecad-icon-16.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps
RENAME org.freecadweb.FreeCAD.png
)

install(
FILES ../Gui/Icons/freecad-icon-32.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps
RENAME org.freecadweb.FreeCAD.png
)

install(
FILES ../Gui/Icons/freecad-icon-48.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps
RENAME org.freecadweb.FreeCAD.png
)

install(
FILES ../Gui/Icons/freecad-icon-64.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps
RENAME org.freecadweb.FreeCAD.png
)

install(
FILES ../Gui/Icons/freecad.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps
RENAME org.freecadweb.FreeCAD.svg
)

install(
FILES ../Gui/Icons/freecad.xpm
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps
RENAME org.freecadweb.FreeCAD.xpm
)

install(
FILES ../Gui/Icons/freecad-doc.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/mimetypes
RENAME org.freecadweb.FreeCAD-mimetype.svg
)

install(
FILES ../Gui/Icons/freecad-doc-64.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/mimetypes
RENAME org.freecadweb.FreeCAD-mimetype.png
)
2 changes: 1 addition & 1 deletion src/XDGData/org.freecadweb.FreeCAD.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
<update_contact>yorik_AT_uncreated.net</update_contact>
<content_rating type="oars-1.1"/>
<releases>
<release version="@PACKAGE_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
<release version="@APPDATA_RELEASE_VERSION@" date="@APPDATA_RELEASE_DATE@"/>
</releases>
</component>
256 changes: 0 additions & 256 deletions src/XDGData/org.freecadweb.FreeCAD.svg

This file was deleted.