]> git.lyx.org Git - lyx.git/commitdiff
- Add scalable icon into tarball
authorPavel Sanda <sanda@lyx.org>
Wed, 7 Dec 2011 16:47:43 +0000 (16:47 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 7 Dec 2011 16:47:43 +0000 (16:47 +0000)
- 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

Makefile.am
RELEASE-NOTES
lib/Makefile.am
src/frontends/qt4/GuiView.cpp

index ae61306a977da7b07ba2149d010860aed47a9ae0..efcbeca75ab881bbf43770a09291b306a2c2d65f 100644 (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
 
index 361b30ccd67c6c087177c83eadc1e3b768b6c9e7..28f9aedd068ab0a074ff65f001ee7ac58ed00ee7 100644 (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:
 ------------------------------------
 
index 93e03e7af32352393594da0f41ef043ddd8ecad2..a96ae2fb7a403b463750230c175e172836882f87 100644 (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).
index d66fa80c0bf19630d08412526fca571c9d2790ea..4ac5d6b94a28bb412a2e48722279c5c3358d94e6 100644 (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")