- Add scalable icon into tarball

- let icons install into proper locations
- use theme routines to load proper icon
  (using this for loading toolbar icons would be another
  step how to synchronize LyX with its environment.)

Patch from Timo Kluck.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40418 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2011-12-07 16:47:43 +00:00
parent f41057cae6
commit 2b36e0a860
4 changed files with 26 additions and 2 deletions

View File

@ -22,7 +22,7 @@ SUBDIRS = config development intl po $(BOOST) src sourcedoc lib \
EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \
INSTALL.Win32 INSTALL.MacOSX INSTALL.scons INSTALL.cmake \
README.Win32 README.Cygwin README.localization lyx.1in \
autogen.sh lib/lyx.desktop
autogen.sh lib/lyx.desktop lib/images/lyx.svg
man_MANS = lyx.1

View File

@ -61,6 +61,10 @@ The following LyX key bindings have been changed:
The binding to "C-minus" has changed to "C-S-underscore".
Linux desktop file specification and scalable icon has been included
into the tarball.
New external programs and libraries:
------------------------------------

View File

@ -1606,6 +1606,19 @@ dist_tex_DATA = \
tex/lyxskak.sty \
tex/revtex.cls
if !INSTALL_WINDOWS
if !INSTALL_MACOSX
# install application icons. The 'hicolor' theme is the default theme
# where applications themselves should install their icons.
scalableappiconsdir = $(datadir)/icons/hicolor/scalable/apps
scalableappicons_DATA = images/lyx.svg
fixedappiconsdir = $(datadir)/icons/hicolor/48x48/apps
fixedappicons_DATA = images/lyx.png
endif
endif
# subscript.sty is not in dist_tex_DATA since we don't want to install it
# (it is part of TeXLive). We include it in our source package only so that
# packagers may decide to install it (e.g. for MikTeX).

View File

@ -444,11 +444,18 @@ GuiView::GuiView(int id)
setAttribute(Qt::WA_DeleteOnClose, true);
#if (!defined(Q_WS_WIN) && !defined(Q_WS_MACX))
// QIcon::fromTheme was introduced in Qt 4.6
#if (QT_VERSION >= 0x040600)
// assign an icon to main form. We do not do it under Qt/Win or Qt/Mac,
// since the icon is provided in the application bundle.
// since the icon is provided in the application bundle. We use a themed
// version when available and use the bundled one as fallback.
setWindowIcon(QIcon::fromTheme("lyx", getPixmap("images/", "lyx", "png")));
#else
setWindowIcon(getPixmap("images/", "lyx", "png"));
#endif
#endif
#if (QT_VERSION >= 0x040300)
// use tabbed dock area for multiple docks
// (such as "source" and "messages")