Skip to content

Commit

Permalink
Fixed the absolute paths in the desktop file
Browse files Browse the repository at this point in the history
The application icons now install into the system icon theme. This also
results in the system always picking the best available icon to display.

To make installing simpler (and to make the names more consistent) the
icon files were moved into the folders of their resolution.

Fixes #383
  • Loading branch information
Erik Schilling authored and bjorn committed Mar 28, 2013
1 parent b09a9f5 commit 9aeac45
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/tiled.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
Name=Tiled
Comment=Tile map editor
Exec=/usr/bin/tiled
Exec=tiled
Terminal=false
Type=Application
Icon=/usr/share/tiled/images/tiled-icon-32.png
Icon=tiled
Categories=Graphics;2DGraphics;
X-Desktop-File-Install-Version=0.1
File renamed without changes
File renamed without changes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/tiled/mainwindow.cpp
Expand Up @@ -136,8 +136,8 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags)
QIcon redoIcon(QLatin1String(":images/16x16/edit-redo.png"));
QIcon undoIcon(QLatin1String(":images/16x16/edit-undo.png"));

QIcon tiledIcon(QLatin1String(":images/tiled-icon-16.png"));
tiledIcon.addFile(QLatin1String(":images/tiled-icon-32.png"));
QIcon tiledIcon(QLatin1String(":images/16x16/tiled.png"));
tiledIcon.addFile(QLatin1String(":images/32x32/tiled.png"));
setWindowIcon(tiledIcon);

// Add larger icon versions for actions used in the tool bar
Expand Down
14 changes: 11 additions & 3 deletions src/tiled/tiled.pro
Expand Up @@ -274,9 +274,17 @@ FORMS += aboutdialog.ui \
saveasimagedialog.ui\
editterraindialog.ui

images.path = $${PREFIX}/share/tiled/images
images.files += images/tiled-icon-32.png
INSTALLS += images
icon32.path = $${PREFIX}/share/icons/hicolor/32x32/apps/
icon32.files += images/32x32/tiled.png
INSTALLS += icon32

icon16.path = $${PREFIX}/share/icons/hicolor/16x16/apps/
icon16.files += images/16x16/tiled.png
INSTALLS += icon16

iconscalable.path = $${PREFIX}/share/icons/hicolor/scalable/apps/
iconscalable.files += images/scalable/tiled.svg
INSTALLS += iconscalable

desktopfile.path = $${PREFIX}/share/applications/
desktopfile.files += ../../docs/tiled.desktop
Expand Down
4 changes: 2 additions & 2 deletions src/tiled/tiled.qrc
@@ -1,8 +1,6 @@
<RCC>
<qresource prefix="/">
<file>images/about-tiled-logo.png</file>
<file>images/tiled-icon-16.png</file>
<file>images/tiled-icon-32.png</file>
<file>images/16x16/application-exit.png</file>
<file>images/16x16/document-export.png</file>
<file>images/16x16/document-import.png</file>
Expand All @@ -28,6 +26,7 @@
<file>images/16x16/window-close.png</file>
<file>images/16x16/stock-duplicate-16.png</file>
<file>images/16x16/terrain.png</file>
<file>images/16x16/tiled.png</file>
<file>images/16x16/zoom-in.png</file>
<file>images/16x16/zoom-original.png</file>
<file>images/16x16/zoom-out.png</file>
Expand Down Expand Up @@ -73,5 +72,6 @@
<file>images/16x16/show_hide_others.png</file>
<file>images/24x24/dice.png</file>
<file>images/24x24/terrain-edit.png</file>
<file>images/32x32/tiled.png</file>
</qresource>
</RCC>

0 comments on commit 9aeac45

Please sign in to comment.