diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-09-02 10:56:51 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-09-02 10:58:57 (GMT) |
commit | e008ce19585bf607ff652ab95391a890a9523076 (patch) | |
tree | dc7838c85d1ddf3126566b50a672ca16a4faedb2 /src/gui/kernel/qapplication_x11.cpp | |
parent | 66fc43343b06575a97b84ad44d70fd3082a6140e (diff) | |
download | Qt-e008ce19585bf607ff652ab95391a890a9523076.zip Qt-e008ce19585bf607ff652ab95391a890a9523076.tar.gz Qt-e008ce19585bf607ff652ab95391a890a9523076.tar.bz2 |
Respect "menus_have_icons" property in GTK+
The default value is planned to be changed in the next minor update to
Gtk+ (2.28), hence we need to read this dynamically now. We also
added a helper-function to easily read a gconf bool.
Note, as a bonus feature I also added support for
"buttons_have_icons".
Task-number: 260684
Reviewed-by: joao
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 0056b9e..a7a6504 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -79,6 +79,7 @@ #include <private/qcolor_p.h> #include <private/qcursor_p.h> #include <private/qiconloader_p.h> +#include <private/gtksymbols_p.h> #include "qstyle.h" #include "qmetaobject.h" #include "qtimer.h" @@ -2287,6 +2288,12 @@ void qt_init(QApplicationPrivate *priv, int, if (X11->desktopEnvironment == DE_KDE) X11->desktopVersion = QString::fromLocal8Bit(qgetenv("KDE_SESSION_VERSION")).toInt(); +#if !defined(QT_NO_STYLE_GTK) + if (X11->desktopEnvironment == DE_GNOME) { + static bool menusHaveIcons = QGtk::getGConfBool(QLatin1String("/desktop/gnome/interface/menus_have_icons"), true); + QApplication::setAttribute(Qt::AA_DontShowIconsInMenus, !menusHaveIcons); + } +#endif qt_set_input_encoding(); qt_set_x11_resources(appFont, appFGCol, appBGCol, appBTNCol); |