OSDN Git Service

make GTK2, GConf2 and CUPS linked dependencies
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 15 Oct 2016 16:05:45 +0000 (16:05 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 15 Oct 2016 16:05:45 +0000 (16:05 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
14 files changed:
CMakeLists.txt
README
cmake/modules/FindGConf2.cmake [new file with mode: 0644]
src/core/global/qconfig.h.cmake
src/gui/dialogs/qprintdialog_unix.cpp
src/gui/kernel/qkde.cpp
src/gui/painting/painting.cmake
src/gui/painting/qcups.cpp
src/gui/painting/qcups_p.h
src/gui/styles/qgtkpainter.cpp
src/gui/styles/qgtkstyle.cpp
src/gui/styles/qgtkstyle_p.cpp
src/gui/styles/qgtkstyle_p.h
src/gui/styles/styles.cmake

index cba5e96..6dfc8de 100644 (file)
@@ -96,6 +96,9 @@ add_feature_info(dbus WITH_DBUS "an open source something")
 option(WITH_GTK2 "Build gtk2 support" ON)
 add_feature_info(gtk2 WITH_GTK2 "an open source something")
 
+option(WITH_GCONF2 "Build gconf2 support" ON)
+add_feature_info(gconf2 WITH_GCONF2 "an open source something")
+
 option(WITH_EGL "Build egl support" OFF)
 add_feature_info(egl WITH_EGL "an open source something")
 
@@ -376,6 +379,14 @@ set_package_properties(GTK2 PROPERTIES
     TYPE RECOMMENDED
 )
 
+find_package(GConf2)
+set_package_properties(GConf2 PROPERTIES
+    PURPOSE "Required for GTK style and application integration support"
+    DESCRIPTION "System for storing application preferences"
+    URL "https://projects.gnome.org/gconf/"
+    TYPE RECOMMENDED
+)
+
 find_package(EGL)
 set_package_properties(EGL PROPERTIES
     PURPOSE "Required for EGL support"
@@ -532,6 +543,10 @@ if(NOT WITH_TIFF OR NOT TIFF_FOUND)
     katie_definition(-DQT_NO_IMAGEFORMAT_TIFF)
 endif()
 
+if(NOT WITH_GCONF2 OR NOT GCONF2_FOUND)
+    katie_definition(-DQT_NO_GCONF2)
+endif()
+
 # conditional features
 if(NOT WITH_ACCESSIBILITY)
     katie_definition(-DQT_NO_ACCESSIBILITY)
diff --git a/README b/README
index 178e2cf..31822a5 100644 (file)
--- a/README
+++ b/README
@@ -17,8 +17,8 @@ There are several things you should be aware before considering Katie:
   - QIconEnginePluginV{2} classes have been merged
   - QIconEngineFactoryInterfaceV{2} classes and interfaces have been merged
   - QKeyEventEx and QKeyEvent classes have been merged
-  - OpenSSL and D-Bus cannot be runtime dependencies, they must be linked to
-    during build
+  - OpenSSL, D-Bus, CUPS, GTK2 and GConf2 cannot be runtime dependencies, they
+    must be linked to during build
   - QtUiTools is build as shared library by default
   - moc, uic, rcc, lrelease and idc are linked to components
   - updated bundled Harfbuzz from upstream (not Harfbuzz-NG)
diff --git a/cmake/modules/FindGConf2.cmake b/cmake/modules/FindGConf2.cmake
new file mode 100644 (file)
index 0000000..1b08b91
--- /dev/null
@@ -0,0 +1,46 @@
+# - Try to find GConf2
+# Once done this will define
+#
+#  GCONF2_FOUND - system has GConf2
+#  GCONF2_INCLUDES - the GConf2 include directory
+#  GCONF2_LIBRARIES - The libraries needed to use GConf2
+#
+# Copyright (c) 2016, Ivailo Monev, <xakepa10@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+if(GCONF2_INCLUDES AND GCONF2_LIBRARIES)
+    set(GCONF2_FIND_QUIETLY TRUE)
+endif()
+
+if(NOT WIN32)
+    include(FindPkgConfig)
+    pkg_check_modules(PC_SQLITE QUIET gconf-2.0)
+endif()
+
+find_path(GCONF2_INCLUDES
+    NAMES
+    gconf/gconf.h
+    PATH_SUFFIXES gconf/2
+    HINTS
+    $ENV{SQLITEDIR}/include
+    ${PC_GCONF2_INCLUDEDIR}
+    /usr/include
+    /usr/local/include
+    ${INCLUDE_INSTALL_DIR}
+)
+
+find_library(GCONF2_LIBRARIES
+    gconf-2
+    HINTS
+    $ENV{SQLITEDIR}/lib
+    ${PC_GCONF2_LIBDIR}
+    /usr/lib
+    /usr/local/lib
+    ${LIB_INSTALL_DIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GConf2 DEFAULT_MSG GCONF2_INCLUDES GCONF2_LIBRARIES)
+
+mark_as_advanced(GCONF2_INCLUDES GCONF2_LIBRARIES)
index 95a4de9..e601d6d 100644 (file)
 #cmakedefine QT_NO_STYLE_CLEANLOOKS
 #cmakedefine QT_NO_STYLE_PLASTIQUE
 #cmakedefine QT_NO_STYLE_STYLESHEET
+#cmakedefine QT_NO_GCONF2
 
 /* Utilities */
 #cmakedefine QT_NO_ACCESSIBILITY
index af7bdf1..9a2950b 100644 (file)
@@ -64,8 +64,6 @@
 #  include <qcups_p.h>
 #  include <cups/cups.h>
 #  include <qpdf_p.h>
-#else
-#  include <QtCore/qlibrary.h>
 #endif
 
 #include <qprinterinfo_unix_p.h>
index 89809e1..f67af56 100644 (file)
@@ -41,7 +41,6 @@
 
 
 #include "qkde_p.h"
-#include <QtCore/QLibrary>
 #include <QtCore/QDir>
 #include <QtCore/qdebug.h>
 #include <QtCore/QSettings>
index 166a4b7..b44c25a 100644 (file)
@@ -54,7 +54,6 @@ set(GUI_HEADERS
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qgraphicssystemplugin_p.h
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qwindowsurface_raster_p.h
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qrgb.h
-    ${CMAKE_CURRENT_SOURCE_DIR}/painting/qcups_p.h
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qprinterinfo_unix_p.h
 )
 
@@ -101,7 +100,6 @@ set(GUI_SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qgraphicssystemfactory.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qgraphicssystemplugin.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qwindowsurface_raster.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/painting/qcups.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/painting/qprinterinfo_unix.cpp
 )
 
@@ -119,3 +117,19 @@ if(WITH_X11 AND X11_FOUND)
         ${CMAKE_CURRENT_SOURCE_DIR}/painting/qwindowsurface_x11.cpp
     )
 endif()
+
+if(WITH_CUPS AND CUPS_FOUND)
+    set(GUI_HEADERS
+        ${GUI_HEADERS}
+        ${CMAKE_CURRENT_SOURCE_DIR}/painting/qcups_p.h
+    )
+    set(GUI_SOURCES
+        ${GUI_SOURCES}
+        ${CMAKE_CURRENT_SOURCE_DIR}/painting/qcups.cpp
+    )
+    set(EXTRA_GUI_LIBS
+        ${EXTRA_GUI_LIBS}
+        ${CUPS_LIBRARIES}
+    )
+    include_directories(${CUPS_INCLUDE_DIR})
+endif()
\ No newline at end of file
index b804303..ad16820 100644 (file)
 
 QT_BEGIN_NAMESPACE
 
-typedef int (*CupsGetDests)(cups_dest_t **dests);
-typedef void (*CupsFreeDests)(int num_dests, cups_dest_t *dests);
-typedef const char* (*CupsGetPPD)(const char *printer);
-typedef int (*CupsMarkOptions)(ppd_file_t *ppd, int num_options, cups_option_t *options);
-typedef ppd_file_t* (*PPDOpenFile)(const char *filename);
-typedef void (*PPDMarkDefaults)(ppd_file_t *ppd);
-typedef int (*PPDMarkOption)(ppd_file_t *ppd, const char *keyword, const char *option);
-typedef void (*PPDClose)(ppd_file_t *ppd);
-typedef int (*PPDMarkOption)(ppd_file_t *ppd, const char *keyword, const char *option);
-typedef void (*CupsFreeOptions)(int num_options, cups_option_t *options);
-typedef void (*CupsSetDests)(int num_dests, cups_dest_t *dests);
-typedef cups_lang_t* (*CupsLangGet)(const char *language);
-typedef const char* (*CupsLangEncoding)(cups_lang_t *language);
-typedef int (*CupsAddOption)(const char *name, const char *value, int num_options, cups_option_t **options);
-typedef int (*CupsTempFd)(char *name, int len);
-typedef int (*CupsPrintFile)(const char * name, const char * filename, const char * title, int num_options, cups_option_t * options);
-
 static bool cupsLoaded = false;
 static int qt_cups_num_printers = 0;
-static CupsGetDests _cupsGetDests = 0;
-static CupsFreeDests _cupsFreeDests = 0;
-static CupsGetPPD _cupsGetPPD = 0;
-static PPDOpenFile _ppdOpenFile = 0;
-static PPDMarkDefaults _ppdMarkDefaults = 0;
-static PPDClose _ppdClose = 0;
-static CupsMarkOptions _cupsMarkOptions = 0;
-static PPDMarkOption _ppdMarkOption = 0;
-static CupsFreeOptions _cupsFreeOptions = 0;
-static CupsSetDests _cupsSetDests = 0;
-static CupsLangGet _cupsLangGet = 0;
-static CupsLangEncoding _cupsLangEncoding = 0;
-static CupsAddOption _cupsAddOption = 0;
-static CupsTempFd _cupsTempFd = 0;
-static CupsPrintFile _cupsPrintFile = 0;
-
-static void resolveCups()
+
+static inline void resolveCups()
 {
-    QLibrary cupsLib(QLatin1String("cups"), 2);
-    if(cupsLib.load()) {
-        _cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests");
-        _cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests");
-        _cupsGetPPD = (CupsGetPPD) cupsLib.resolve("cupsGetPPD");
-        _cupsLangGet = (CupsLangGet) cupsLib.resolve("cupsLangGet");
-        _cupsLangEncoding = (CupsLangEncoding) cupsLib.resolve("cupsLangEncoding");
-        _ppdOpenFile = (PPDOpenFile) cupsLib.resolve("ppdOpenFile");
-        _ppdMarkDefaults = (PPDMarkDefaults) cupsLib.resolve("ppdMarkDefaults");
-        _ppdClose = (PPDClose) cupsLib.resolve("ppdClose");
-        _cupsMarkOptions = (CupsMarkOptions) cupsLib.resolve("cupsMarkOptions");
-        _ppdMarkOption = (PPDMarkOption) cupsLib.resolve("ppdMarkOption");
-        _cupsFreeOptions = (CupsFreeOptions) cupsLib.resolve("cupsFreeOptions");
-        _cupsSetDests = (CupsSetDests) cupsLib.resolve("cupsSetDests");
-        _cupsAddOption = (CupsAddOption) cupsLib.resolve("cupsAddOption");
-        _cupsTempFd = (CupsTempFd) cupsLib.resolve("cupsTempFd");
-        _cupsPrintFile = (CupsPrintFile) cupsLib.resolve("cupsPrintFile");
-
-        if (_cupsGetDests && _cupsFreeDests) {
-            cups_dest_t *printers;
-            int num_printers = _cupsGetDests(&printers);
-            if (num_printers)
-                _cupsFreeDests(num_printers, printers);
-            qt_cups_num_printers = num_printers;
-        }
-    }
+    cups_dest_t *printers;
+    int num_printers = cupsGetDests(&printers);
+    if (num_printers)
+        cupsFreeDests(num_printers, printers);
+    qt_cups_num_printers = num_printers;
     cupsLoaded = true;
 }
 
@@ -134,7 +81,7 @@ QCUPSSupport::QCUPSSupport()
         return;
 
     // Update the available printer count
-    qt_cups_num_printers = prnCount = _cupsGetDests(&printers);
+    qt_cups_num_printers = prnCount = cupsGetDests(&printers);
 
     for (int i = 0; i <  prnCount; ++i) {
         if (printers[i].is_default) {
@@ -145,8 +92,8 @@ QCUPSSupport::QCUPSSupport()
     }
 
 #ifndef QT_NO_TEXTCODEC
-    cups_lang_t *cupsLang = _cupsLangGet(0);
-    codec = QTextCodec::codecForName(_cupsLangEncoding(cupsLang));
+    cups_lang_t *cupsLang = cupsLangGet(0);
+    codec = QTextCodec::codecForName(cupsLangEncoding(cupsLang));
     if (!codec)
         codec = QTextCodec::codecForLocale();
 #endif
@@ -155,9 +102,9 @@ QCUPSSupport::QCUPSSupport()
 QCUPSSupport::~QCUPSSupport()
 {
      if (currPPD)
-        _ppdClose(currPPD);
+        ppdClose(currPPD);
      if (prnCount)
-         _cupsFreeDests(prnCount, printers);
+         cupsFreeDests(prnCount, printers);
 }
 
 int QCUPSSupport::availablePrintersCount() const
@@ -184,23 +131,23 @@ const ppd_file_t* QCUPSSupport::setCurrentPrinter(int index)
     currPrinterIndex = index;
 
     if (currPPD)
-        _ppdClose(currPPD);
+        ppdClose(currPPD);
     currPPD = 0;
     page_sizes = 0;
 
-    const char *ppdFile = _cupsGetPPD(printers[index].name);
+    const char *ppdFile = cupsGetPPD(printers[index].name);
 
     if (!ppdFile)
       return 0;
 
-    currPPD = _ppdOpenFile(ppdFile);
+    currPPD = ppdOpenFile(ppdFile);
     unlink(ppdFile);
 
     // marking default options
-    _ppdMarkDefaults(currPPD);
+    ppdMarkDefaults(currPPD);
 
     // marking options explicitly set
-    _cupsMarkOptions(currPPD, printers[currPrinterIndex].num_options, printers[currPrinterIndex].options);
+    cupsMarkOptions(currPPD, printers[currPrinterIndex].num_options, printers[currPrinterIndex].options);
 
     // getting pointer to page sizes
     page_sizes = ppdOption("PageSize");
@@ -218,20 +165,7 @@ bool QCUPSSupport::isAvailable()
     if(!cupsLoaded)
         resolveCups();
 
-    return _cupsGetDests &&
-        _cupsFreeDests &&
-        _cupsGetPPD &&
-        _ppdOpenFile &&
-        _ppdMarkDefaults &&
-        _ppdClose &&
-        _cupsMarkOptions &&
-        _ppdMarkOption &&
-        _cupsFreeOptions &&
-        _cupsSetDests &&
-        _cupsLangGet &&
-        _cupsLangEncoding &&
-        _cupsAddOption &&
-        (qt_cups_num_printers > 0);
+    return (qt_cups_num_printers > 0);
 }
 
 const ppd_option_t* QCUPSSupport::ppdOption(const char *key) const
@@ -263,7 +197,7 @@ const ppd_option_t* QCUPSSupport::pageSizes() const
 
 int QCUPSSupport::markOption(const char* name, const char* value)
 {
-    return _ppdMarkOption(currPPD, name, value);
+    return ppdMarkOption(currPPD, name, value);
 }
 
 void QCUPSSupport::saveOptions(QList<const ppd_option_t*> options, QList<const char*> markedOptions)
@@ -285,18 +219,18 @@ void QCUPSSupport::saveOptions(QList<const ppd_option_t*> options, QList<const c
         }
 
         if (!contains) {
-            newOptionCount = _cupsAddOption(oldOptions[i].name, oldOptions[i].value, newOptionCount, &newOptions);
+            newOptionCount = cupsAddOption(oldOptions[i].name, oldOptions[i].value, newOptionCount, &newOptions);
         }
     }
 
     // we can release old option list
-     _cupsFreeOptions(oldOptionCount, oldOptions);
+     cupsFreeOptions(oldOptionCount, oldOptions);
 
     // adding marked options
     for (int i = 0; i < markedOptions.count(); ++i) {
         const char* name = markedOptions.at(i);
         ++i;
-        newOptionCount = _cupsAddOption(name, markedOptions.at(i), newOptionCount, &newOptions);
+        newOptionCount = cupsAddOption(name, markedOptions.at(i), newOptionCount, &newOptions);
     }
 
     // placing the new option list
@@ -304,7 +238,7 @@ void QCUPSSupport::saveOptions(QList<const ppd_option_t*> options, QList<const c
     printers[currPrinterIndex].options = newOptions;
 
     // saving new default values
-    _cupsSetDests(prnCount, printers);
+    cupsSetDests(prnCount, printers);
 }
 
 QRect QCUPSSupport::paperRect(const char *choice) const
@@ -343,7 +277,7 @@ bool QCUPSSupport::printerHasPPD(const char *printerName)
 {
     if (!isAvailable())
         return false;
-    const char *ppdFile = _cupsGetPPD(printerName);
+    const char *ppdFile = cupsGetPPD(printerName);
     if (ppdFile)
         unlink(ppdFile);
     return (ppdFile != 0);
@@ -386,7 +320,7 @@ void QCUPSSupport::collectMarkedOptionsHelper(QStringList& list, const ppd_group
 QPair<int, QString> QCUPSSupport::tempFd()
 {
     char filename[512];
-    int fd = _cupsTempFd(filename, 512);
+    int fd = cupsTempFd(filename, 512);
     return QPair<int, QString>(fd, QString::fromLocal8Bit(filename));
 }
 
@@ -394,7 +328,7 @@ QPair<int, QString> QCUPSSupport::tempFd()
 int QCUPSSupport::printFile(const char * printerName, const char * filename, const char * title,
                             int num_options, cups_option_t * options)
 {
-    return _cupsPrintFile(printerName, filename, title, num_options, options);
+    return cupsPrintFile(printerName, filename, title, num_options, options);
 }
 
 QT_END_NAMESPACE
index 79b624a..1ac90c1 100644 (file)
@@ -57,7 +57,6 @@
 #include "QtGui/qprinter.h"
 
 #ifndef QT_NO_CUPS
-#include <QtCore/qlibrary.h>
 #include <cups/cups.h>
 #include <cups/ppd.h>
 
index de4a55f..21d6eff 100644 (file)
@@ -109,37 +109,37 @@ QPixmap QGtkPainter::renderTheme(uchar *bdata, uchar *wdata, const QRect &rect)
         return;                                                                                    \
     QRect pixmapRect(0, 0, rect.width(), rect.height());                                           \
     {                                                                                              \
-        GdkPixmap *pixmap = QGtkStylePrivate::gdk_pixmap_new((GdkDrawable*)(m_window->window),                    \
+        GdkPixmap *pixmap = gdk_pixmap_new((GdkDrawable*)(m_window->window),                    \
                                             rect.width(), rect.height(), -1);                      \
         if (!pixmap)                                                                               \
             return;                                                                                \
-        style = QGtkStylePrivate::gtk_style_attach (style, m_window->window);                                  \
-        QGtkStylePrivate::gdk_draw_rectangle(pixmap, m_alpha ? style->black_gc : *style->bg_gc, true,                \
+        style = gtk_style_attach (style, m_window->window);                                  \
+        gdk_draw_rectangle(pixmap, m_alpha ? style->black_gc : *style->bg_gc, true,                \
                            0, 0, rect.width(), rect.height());                                     \
         draw_func;                                                                                 \
-        GdkPixbuf *imgb = QGtkStylePrivate::gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, rect.width(), rect.height());\
+        GdkPixbuf *imgb = gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, rect.width(), rect.height());\
         if (!imgb)                                                                                 \
             return;                                                                                \
-        imgb = QGtkStylePrivate::gdk_pixbuf_get_from_drawable(imgb, pixmap, NULL, 0, 0, 0, 0,                  \
+        imgb = gdk_pixbuf_get_from_drawable(imgb, pixmap, NULL, 0, 0, 0, 0,                  \
                                             rect.width(), rect.height());                          \
-        uchar* bdata = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(imgb);                                  \
+        uchar* bdata = (uchar*)gdk_pixbuf_get_pixels(imgb);                                  \
         if (m_alpha) {                                                                             \
-            QGtkStylePrivate::gdk_draw_rectangle(pixmap, style->white_gc, true, 0, 0, rect.width(), rect.height());  \
+            gdk_draw_rectangle(pixmap, style->white_gc, true, 0, 0, rect.width(), rect.height());  \
             draw_func;                                                                             \
-            GdkPixbuf *imgw = QGtkStylePrivate::gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, rect.              \
+            GdkPixbuf *imgw = gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, rect.              \
                                              width(), rect.height());                              \
             if (!imgw)                                                                             \
                 return;                                                                            \
-            imgw = QGtkStylePrivate::gdk_pixbuf_get_from_drawable(imgw, pixmap, NULL, 0, 0, 0, 0,              \
+            imgw = gdk_pixbuf_get_from_drawable(imgw, pixmap, NULL, 0, 0, 0, 0,              \
                                                 rect.width(), rect.height());                      \
-            uchar* wdata = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(imgw);                                    \
+            uchar* wdata = (uchar*)gdk_pixbuf_get_pixels(imgw);                                    \
             cache = renderTheme(bdata, wdata, rect);                                               \
-            QGtkStylePrivate::gdk_pixbuf_unref(imgw);                                                          \
+            gdk_pixbuf_unref(imgw);                                                          \
         } else {                                                                                   \
             cache = renderTheme(bdata, 0, rect);                                                   \
         }                                                                                          \
-        QGtkStylePrivate::gdk_drawable_unref(pixmap);                                                          \
-        QGtkStylePrivate::gdk_pixbuf_unref(imgb);                                                              \
+        gdk_drawable_unref(pixmap);                                                          \
+        gdk_pixbuf_unref(imgb);                                                              \
     }
 
 QGtkPainter::QGtkPainter(QPainter *_painter)
@@ -191,17 +191,17 @@ GtkStyle* QGtkPainter::getStyle(GtkWidget *gtkWidget)
 QPixmap QGtkPainter::getIcon(const char* iconName, GtkIconSize size)
 {
     GtkStyle *style = QGtkStylePrivate::gtkStyle();
-    GtkIconSet* iconSet  = QGtkStylePrivate::gtk_icon_factory_lookup_default (iconName);
-    GdkPixbuf* icon = QGtkStylePrivate::gtk_icon_set_render_icon(iconSet,
+    GtkIconSet* iconSet  = gtk_icon_factory_lookup_default (iconName);
+    GdkPixbuf* icon = gtk_icon_set_render_icon(iconSet,
                                                  style,
                                                  GTK_TEXT_DIR_LTR,
                                                  GTK_STATE_NORMAL,
                                                  size,
                                                  NULL,
                                                  "button");
-    uchar* data = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(icon);
-    int width = QGtkStylePrivate::gdk_pixbuf_get_width(icon);
-    int height = QGtkStylePrivate::gdk_pixbuf_get_height(icon);
+    uchar* data = (uchar*)gdk_pixbuf_get_pixels(icon);
+    int width = gdk_pixbuf_get_width(icon);
+    int height = gdk_pixbuf_get_height(icon);
     QImage converted(width, height, QImage::Format_ARGB32);
     uchar* tdata = (uchar*)converted.bits();
 
@@ -213,7 +213,7 @@ QPixmap QGtkPainter::getIcon(const char* iconName, GtkIconSize size)
         tdata[index + QT_ALPHA] = data[index + GTK_ALPHA];
     }
 
-    QGtkStylePrivate::gdk_pixbuf_unref(icon);
+    gdk_pixbuf_unref(icon);
 
     // should we free iconset?
     return QPixmap::fromImage(converted);
@@ -247,19 +247,19 @@ void QGtkPainter::paintBoxGap(GtkWidget *gtkWidget, const gchar* part,
                          % HexString<gint>(x);
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_box_gap (style,
-                                           pixmap,
-                                           state,
-                                           shadow,
-                                           NULL,
-                                           gtkWidget,
-                                           (gchar*)part,
-                                           0, 0,
-                                           rect.width(),
-                                           rect.height(),
-                                           gap_side,
-                                           x,
-                                           width));
+        DRAW_TO_CACHE(gtk_paint_box_gap (style,
+                                         pixmap,
+                                         state,
+                                         shadow,
+                                         NULL,
+                                         gtkWidget,
+                                         (gchar*)part,
+                                         0, 0,
+                                         rect.width(),
+                                         rect.height(),
+                                         gap_side,
+                                         x,
+                                         width));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -312,16 +312,16 @@ void QGtkPainter::paintBox(GtkWidget *gtkWidget, const gchar* part,
                                     rect.size(), gtkWidget) % pmKey;
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_box (style,
-                                           pixmap,
-                                           state,
-                                           shadow,
-                                           NULL,
-                                           gtkWidget,
-                                           part,
-                                           0, 0,
-                                           rect.width(),
-                                           rect.height()));
+        DRAW_TO_CACHE(gtk_paint_box (style,
+                                     pixmap,
+                                     state,
+                                     shadow,
+                                     NULL,
+                                     gtkWidget,
+                                     part,
+                                     0, 0,
+                                     rect.width(),
+                                     rect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -365,13 +365,13 @@ void QGtkPainter::paintHline(GtkWidget *gtkWidget, const gchar* part,
                          % HexString<int>(y)
                          % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_hline (style,
-                                         pixmap,
-                                         state,
-                                         NULL,
-                                         gtkWidget,
-                                         part,
-                                         x1, x2, y));
+        DRAW_TO_CACHE(gtk_paint_hline (style,
+                                       pixmap,
+                                       state,
+                                       NULL,
+                                       gtkWidget,
+                                       part,
+                                       x1, x2, y));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -395,14 +395,14 @@ void QGtkPainter::paintVline(GtkWidget *gtkWidget, const gchar* part,
                         % pmKey;
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_vline (style,
-                                         pixmap,
-                                         state,
-                                         NULL,
-                                         gtkWidget,
-                                         part,
-                                         y1, y2,
-                                         x));
+        DRAW_TO_CACHE(gtk_paint_vline (style,
+                                       pixmap,
+                                       state,
+                                       NULL,
+                                       gtkWidget,
+                                       part,
+                                       y1, y2,
+                                       x));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -424,12 +424,12 @@ void QGtkPainter::paintExpander(GtkWidget *gtkWidget,
                          % pmKey;
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_expander (style, pixmap,
-                                            state, NULL,
-                                            gtkWidget, part,
-                                            rect.width()/2,
-                                            rect.height()/2,
-                                            expander_state));
+        DRAW_TO_CACHE(gtk_paint_expander (style, pixmap,
+                                          state, NULL,
+                                          gtkWidget, part,
+                                          rect.width()/2,
+                                          rect.height()/2,
+                                          expander_state));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -447,12 +447,12 @@ void QGtkPainter::paintFocus(GtkWidget *gtkWidget, const gchar* part,
     QPixmap cache;
     QString pixmapName = uniqueName(QLS(part), state, GTK_SHADOW_NONE, rect.size(), gtkWidget) % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_focus (style, pixmap, state, NULL,
-                                         gtkWidget,
-                                         part,
-                                         0, 0,
-                                         rect.width(),
-                                         rect.height()));
+        DRAW_TO_CACHE(gtk_paint_focus (style, pixmap, state, NULL,
+                                       gtkWidget,
+                                       part,
+                                       0, 0,
+                                       rect.width(),
+                                       rect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -472,11 +472,11 @@ void QGtkPainter::paintResizeGrip(GtkWidget *gtkWidget, const gchar* part,
     QPixmap cache;
     QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_resize_grip (style, pixmap, state,
-                                               NULL, gtkWidget,
-                                               part, edge, 0, 0,
-                                               rect.width(),
-                                               rect.height()));
+        DRAW_TO_CACHE(gtk_paint_resize_grip (style, pixmap, state,
+                                             NULL, gtkWidget,
+                                             part, edge, 0, 0,
+                                             rect.width(),
+                                             rect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -503,14 +503,14 @@ void QGtkPainter::paintArrow(GtkWidget *gtkWidget, const gchar* part,
     int xOffset = m_cliprect.isValid() ? arrowrect.x() - m_cliprect.x() : 0;
     int yOffset = m_cliprect.isValid() ? arrowrect.y() - m_cliprect.y() : 0;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_arrow (style, pixmap, state, shadow,
-                                         &gtkCliprect,
-                                         gtkWidget,
-                                         part,
-                                         arrow_type, fill,
-                                         xOffset, yOffset,
-                                         arrowrect.width(),
-                                         arrowrect.height()))
+        DRAW_TO_CACHE(gtk_paint_arrow (style, pixmap, state, shadow,
+                                       &gtkCliprect,
+                                       gtkWidget,
+                                       part,
+                                       arrow_type, fill,
+                                       xOffset, yOffset,
+                                       arrowrect.width(),
+                                       arrowrect.height()))
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -531,16 +531,16 @@ void QGtkPainter::paintHandle(GtkWidget *gtkWidget, const gchar* part, const QRe
                          % HexString<uchar>(orientation);
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_handle (style,
-                                          pixmap,
-                                          state,
-                                          shadow,
-                                          NULL,
-                                          gtkWidget,
-                                          part, 0, 0,
-                                          rect.width(),
-                                          rect.height(),
-                                          orientation));
+        DRAW_TO_CACHE(gtk_paint_handle (style,
+                                        pixmap,
+                                        state,
+                                        shadow,
+                                        NULL,
+                                        gtkWidget,
+                                        part, 0, 0,
+                                        rect.width(),
+                                        rect.height(),
+                                        orientation));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -559,17 +559,17 @@ void QGtkPainter::paintSlider(GtkWidget *gtkWidget, const gchar* part, const QRe
     QPixmap cache;
     QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_slider (style,
-                                          pixmap,
-                                          state,
-                                          shadow,
-                                          NULL,
-                                          gtkWidget,
-                                          part,
-                                          0, 0,
-                                          rect.width(),
-                                          rect.height(),
-                                          orientation));
+        DRAW_TO_CACHE(gtk_paint_slider (style,
+                                        pixmap,
+                                        state,
+                                        shadow,
+                                        NULL,
+                                        gtkWidget,
+                                        part,
+                                        0, 0,
+                                        rect.width(),
+                                        rect.height(),
+                                        orientation));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -589,8 +589,8 @@ void QGtkPainter::paintShadow(GtkWidget *gtkWidget, const gchar* part,
     QPixmap cache;
     QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_shadow(style, pixmap, state, shadow, NULL,
-                                         gtkWidget, part, 0, 0, rect.width(), rect.height()));
+        DRAW_TO_CACHE(gtk_paint_shadow(style, pixmap, state, shadow, NULL,
+                                       gtkWidget, part, 0, 0, rect.width(), rect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -607,15 +607,15 @@ void QGtkPainter::paintFlatBox(GtkWidget *gtkWidget, const gchar* part,
     QPixmap cache;
     QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) % pmKey;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_flat_box (style,
-                                            pixmap,
-                                            state,
-                                            shadow,
-                                            NULL,
-                                            gtkWidget,
-                                            part, 0, 0,
-                                            rect.width(),
-                                            rect.height()));
+        DRAW_TO_CACHE(gtk_paint_flat_box (style,
+                                          pixmap,
+                                          state,
+                                          shadow,
+                                          NULL,
+                                          gtkWidget,
+                                          part, 0, 0,
+                                          rect.width(),
+                                          rect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -635,12 +635,12 @@ void QGtkPainter::paintExtention(GtkWidget *gtkWidget,
                          % HexString<uchar>(gap_pos);
 
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_extension (style, pixmap, state, shadow,
-                                             NULL, gtkWidget,
-                                             (gchar*)part, 0, 0,
-                                             rect.width(),
-                                             rect.height(),
-                                             gap_pos));
+        DRAW_TO_CACHE(gtk_paint_extension (style, pixmap, state, shadow,
+                                           NULL, gtkWidget,
+                                           (gchar*)part, 0, 0,
+                                           rect.width(),
+                                           rect.height(),
+                                           gap_pos));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
@@ -663,14 +663,14 @@ void QGtkPainter::paintOption(GtkWidget *gtkWidget, const QRect &radiorect,
     int xOffset = m_cliprect.isValid() ? radiorect.x() - m_cliprect.x() : 0;
     int yOffset = m_cliprect.isValid() ? radiorect.y() - m_cliprect.y() : 0;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_option(style, pixmap,
-                                         state, shadow,
-                                         &gtkCliprect,
-                                         gtkWidget,
-                                         detail.toLatin1(),
-                                         xOffset, yOffset,
-                                         radiorect.width(),
-                                         radiorect.height()));
+        DRAW_TO_CACHE(gtk_paint_option(style, pixmap,
+                                       state, shadow,
+                                       &gtkCliprect,
+                                       gtkWidget,
+                                       detail.toLatin1(),
+                                       xOffset, yOffset,
+                                       radiorect.width(),
+                                       radiorect.height()));
 
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
@@ -694,16 +694,16 @@ void QGtkPainter::paintCheckbox(GtkWidget *gtkWidget, const QRect &checkrect,
     int xOffset = m_cliprect.isValid() ? checkrect.x() - m_cliprect.x() : 0;
     int yOffset = m_cliprect.isValid() ? checkrect.y() - m_cliprect.y() : 0;
     if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
-        DRAW_TO_CACHE(QGtkStylePrivate::gtk_paint_check (style,
-                                         pixmap,
-                                         state,
-                                         shadow,
-                                         &gtkCliprect,
-                                         gtkWidget,
-                                         detail.toLatin1(),
-                                         xOffset, yOffset,
-                                         checkrect.width(),
-                                         checkrect.height()));
+        DRAW_TO_CACHE(gtk_paint_check (style,
+                                       pixmap,
+                                       state,
+                                       shadow,
+                                       &gtkCliprect,
+                                       gtkWidget,
+                                       detail.toLatin1(),
+                                       xOffset, yOffset,
+                                       checkrect.width(),
+                                       checkrect.height()));
         if (m_usePixmapCache)
             QPixmapCache::insert(pixmapName, cache);
     }
index c0d0843..c7f86e1 100644 (file)
@@ -255,10 +255,10 @@ QPalette QGtkStyle::standardPalette() const
         QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box
         GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
         GdkColor *gtkAltBase = NULL;
-        d->gtk_widget_style_get(gtkTreeView, "odd-row-color", &gtkAltBase, NULL);
+        gtk_widget_style_get(gtkTreeView, "odd-row-color", &gtkAltBase, NULL);
         if (gtkAltBase) {
             alternateRowColor = QColor(gtkAltBase->red>>8, gtkAltBase->green>>8, gtkAltBase->blue>>8);
-            d->gdk_color_free(gtkAltBase);
+            gdk_color_free(gtkAltBase);
         }
         palette.setColor(QPalette::AlternateBase, alternateRowColor);
 
@@ -282,8 +282,8 @@ QPalette QGtkStyle::standardPalette() const
         palette.setColor(QPalette::Inactive, QPalette::HighlightedText, inactiveHighlightedTExt);
         palette.setColor(QPalette::Inactive, QPalette::Highlight, inactiveHighlight);
 
-        style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
-                d->gtk_window_get_type());
+        style = gtk_rc_get_style_by_paths(gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
+                gtk_window_get_type());
         if (style) {
             gdkText = style->fg[GTK_STATE_NORMAL];
             text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8);
@@ -403,10 +403,10 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
     case PM_DefaultFrameWidth:
         if (qobject_cast<const QFrame*>(widget)) {
             if (GtkStyle *style =
-                d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(),
+                gtk_rc_get_style_by_paths(gtk_settings_get_default(),
                                                 "*.GtkScrolledWindow",
                                                 "*.GtkScrolledWindow",
-                                                d->gtk_window_get_type()))
+                                                gtk_window_get_type()))
                 return qMax(style->xthickness, style->ythickness);
         }
         return 2;
@@ -429,14 +429,14 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
     case PM_ButtonShiftHorizontal: {
         GtkWidget *gtkButton = d->gtkWidget("GtkButton");
         guint horizontal_shift;
-        d->gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL);
+        gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL);
         return horizontal_shift;
     }
 
     case PM_ButtonShiftVertical: {
         GtkWidget *gtkButton = d->gtkWidget("GtkButton");
         guint vertical_shift;
-        d->gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL);
+        gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL);
         return vertical_shift;
     }
 
@@ -447,15 +447,15 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
         GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
         guint horizontal_padding = 0;
         // horizontal-padding is used by Maemo to get thicker borders
-        if (!d->gtk_check_version(2, 10, 0))
-            d->gtk_widget_style_get(gtkMenu, "horizontal-padding", &horizontal_padding, NULL);
+        if (!gtk_check_version(2, 10, 0))
+            gtk_widget_style_get(gtkMenu, "horizontal-padding", &horizontal_padding, NULL);
         int padding = qMax<int>(gtkMenu->style->xthickness, horizontal_padding);
         return padding;
     }
 
     case PM_ButtonIconSize: {
         int retVal = 24;
-        GtkSettings *settings = d->gtk_settings_get_default();
+        GtkSettings *settings = gtk_settings_get_default();
         gchararray icon_sizes;
         g_object_get(settings, "gtk-icon-sizes", &icon_sizes, NULL);
         QStringList values = QString(QLS(icon_sizes)).split(QLatin1Char(':'));
@@ -503,7 +503,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
     case PM_SliderControlThickness: {
         GtkWidget *gtkScale = d->gtkWidget("GtkHScale");
         gint val;
-        d->gtk_widget_style_get(gtkScale, "slider-width", &val, NULL);
+        gtk_widget_style_get(gtkScale, "slider-width", &val, NULL);
         if (metric == PM_SliderControlThickness)
             return val + 2*gtkScale->style->ythickness;
         return val;
@@ -513,7 +513,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
         gint sliderLength;
         gint trough_border;
         GtkWidget *hScrollbar = d->gtkWidget("GtkHScrollbar");
-        d->gtk_widget_style_get(hScrollbar,
+        gtk_widget_style_get(hScrollbar,
                                "trough-border",   &trough_border,
                                "slider-width",    &sliderLength,
                                NULL);
@@ -525,7 +525,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
 
     case PM_SliderLength:
         gint val;
-        d->gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL);
+        gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL);
         return val;
 
     case PM_ExclusiveIndicatorWidth:
@@ -534,7 +534,7 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
     case PM_IndicatorHeight: {
         GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton");
         gint size, spacing;
-        d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL);
+        gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL);
         return size + 2 * spacing;
     }
 
@@ -547,13 +547,13 @@ int QGtkStyle::pixelMetric(PixelMetric metric,
         gint spacing = 3;
         GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
         Q_ASSERT(gtkScrollWindow);
-        d->gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL);
+        gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL);
         return spacing;
     }
     case PM_SubMenuOverlap: {
         gint offset = 0;
         GtkWidget *gtkMenu = d->gtkWidget("GtkMenu");
-        d->gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL);
+        gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL);
         return offset;
     }
     default:
@@ -578,7 +578,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
     case SH_DialogButtonLayout: {
         int ret = QDialogButtonBox::GnomeLayout;
         gboolean alternateOrder = 0;
-        GtkSettings *settings = d->gtk_settings_get_default();
+        GtkSettings *settings = gtk_settings_get_default();
         g_object_get(settings, "gtk-alternative-button-order", &alternateOrder, NULL);
 
         if (alternateOrder)
@@ -618,7 +618,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
     case SH_ComboBox_Popup: {
         GtkWidget *gtkComboBox = d->gtkWidget("GtkComboBox");
         gboolean appears_as_list;
-        d->gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL);
+        gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL);
         return appears_as_list ? 0 : 1;
     }
 
@@ -630,7 +630,7 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
 
     case SH_Menu_SubMenuPopupDelay: {
         gint delay = 225;
-        GtkSettings *settings = d->gtk_settings_get_default();
+        GtkSettings *settings = gtk_settings_get_default();
         g_object_get(settings, "gtk-menu-popup-delay", &delay, NULL);
         return delay;
     }
@@ -639,9 +639,9 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
         gboolean scrollbars_within_bevel = false;
         if (widget && widget->isWindow())
             scrollbars_within_bevel = true;
-        else if (!d->gtk_check_version(2, 12, 0)) {
+        else if (!gtk_check_version(2, 12, 0)) {
             GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow");
-            d->gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL);
+            gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL);
         }
         return !scrollbars_within_bevel;
     }
@@ -653,8 +653,8 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
 
     case SH_UnderlineShortcut: {
         gboolean underlineShortcut = true;
-        if (!d->gtk_check_version(2, 12, 0)) {
-            GtkSettings *settings = d->gtk_settings_get_default();
+        if (!gtk_check_version(2, 12, 0)) {
+            GtkSettings *settings = gtk_settings_get_default();
             g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, NULL);
         }
         return underlineShortcut;
@@ -715,8 +715,8 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
             else if (option->state & State_Raised)
                 shadow_type = GTK_SHADOW_OUT;
 
-            GtkStyle *style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(),
-                                     "*.GtkScrolledWindow", "*.GtkScrolledWindow", d->gtk_window_get_type());
+            GtkStyle *style = gtk_rc_get_style_by_paths(gtk_settings_get_default(),
+                                     "*.GtkScrolledWindow", "*.GtkScrolledWindow", gtk_window_get_type());
             if (style)
                 gtkFramePainter.paintShadow(d->gtkWidget("GtkFrame"), "viewport", pmRect,
                                          option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
@@ -746,8 +746,8 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
 
     case PE_PanelTipLabel: {
         GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed
-        style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
-                d->gtk_window_get_type());
+        style = gtk_rc_get_style_by_paths(gtk_settings_get_default(), "gtk-tooltips", "GtkWindow",
+                gtk_window_get_type());
         gtkPainter.paintFlatBox(gtkWindow, "tooltip", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_NONE, style);
     }
     break;
@@ -761,7 +761,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
         }
         GtkShadowType shadow_type;
         GtkWidget *gtkStatusbarFrame = d->gtkWidget("GtkStatusbar.GtkFrame");
-        d->gtk_widget_style_get(gtkStatusbarFrame->parent, "shadow-type", &shadow_type, NULL);
+        gtk_widget_style_get(gtkStatusbarFrame->parent, "shadow-type", &shadow_type, NULL);
         gtkPainter.paintShadow(gtkStatusbarFrame, "frame", option->rect, GTK_STATE_NORMAL,
                                shadow_type, gtkStatusbarFrame->style);
     }
@@ -898,7 +898,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
     case PE_IndicatorToolBarHandle: {
         GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
         GtkShadowType shadow_type;
-        d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
+        gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
         //Note when the toolbar is horizontal, the handle is vertical
         painter->setClipRect(option->rect);
         gtkPainter.paintHandle(gtkToolbar, "toolbar", option->rect.adjusted(-1, -1 ,0 ,1),
@@ -946,12 +946,12 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
         QColor arrowColor = option->palette.buttonText().color();
         GtkWidget *gtkArrow = d->gtkWidget("GtkArrow");
         GdkColor color = fromQColor(arrowColor);
-        d->gtk_widget_modify_fg (gtkArrow, state, &color);
+        gtk_widget_modify_fg (gtkArrow, state, &color);
         gtkPainter.paintArrow(gtkArrow, "button", arrowRect,
                               type, state, shadow, FALSE, gtkArrow->style,
                               QString::number(arrowColor.rgba(), 16));
         // Passing NULL will revert the color change
-        d->gtk_widget_modify_fg (gtkArrow, state, NULL);
+        gtk_widget_modify_fg (gtkArrow, state, NULL);
     }
     break;
 
@@ -987,7 +987,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
         gboolean interior_focus;
         gint focus_line_width;
         QRect rect = option->rect;
-        d->gtk_widget_style_get(gtkEntry,
+        gtk_widget_style_get(gtkEntry,
                                "interior-focus", &interior_focus,
                                "focus-line-width", &focus_line_width, NULL);
 
@@ -1039,7 +1039,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
             GtkShadowType shadow = GTK_SHADOW_OUT;
             GtkStateType state = GTK_STATE_NORMAL; // Only state supported by gtknotebook
             bool reverse = (option->direction == Qt::RightToLeft);
-            QGtkStylePrivate::gtk_widget_set_direction(gtkNotebook, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+            gtk_widget_set_direction(gtkNotebook, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
             if (const QStyleOptionTabWidgetFrameV2 *tabframe = qstyleoption_cast<const QStyleOptionTabWidgetFrameV2*>(option)) {
                 GtkPositionType frameType = GTK_POS_TOP;
                 QTabBar::Shape shape = frame->shape;
@@ -1084,7 +1084,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
         GtkWidget *gtkButton = isTool ? d->gtkWidget("GtkToolButton.GtkButton") : d->gtkWidget("GtkButton");
         gint focusWidth, focusPad;
         gboolean interiorFocus = false;
-        d->gtk_widget_style_get (gtkButton,
+        gtk_widget_style_get (gtkButton,
                                 "focus-line-width", &focusWidth,
                                 "focus-padding", &focusPad,
                                 "interior-focus", &interiorFocus, NULL);
@@ -1139,7 +1139,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
 
         GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton");
         gint spacing;
-        d->gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL);
+        gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL);
         QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing);
         gtkPainter.setClipRect(option->rect);
         // ### Note: Ubuntulooks breaks when the proper widget is passed
@@ -1182,7 +1182,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
         // Some styles such as aero-clone assume they can paint in the spacing area
         gtkPainter.setClipRect(option->rect);
 
-        d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, NULL);
+        gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, NULL);
 
         QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing);
 
@@ -1384,13 +1384,13 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
             // We use the gtk widget to position arrows and separators for us
             GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath);
             GtkAllocation geometry = {0, 0, option->rect.width(), option->rect.height()};
-            d->gtk_widget_set_direction(gtkCombo, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
-            d->gtk_widget_size_allocate(gtkCombo, &geometry);
+            gtk_widget_set_direction(gtkCombo, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+            gtk_widget_size_allocate(gtkCombo, &geometry);
 
             QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
                                 : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
             GtkWidget *gtkToggleButton = d->gtkWidget(buttonPath);
-            d->gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+            gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
             if (gtkToggleButton && (appears_as_list || comboBox->editable)) {
                 if (focus)
                     GTK_WIDGET_SET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS);
@@ -1399,7 +1399,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
                     GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state;
                     QHashableLatin1Literal entryPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkEntry") : QHashableLatin1Literal("GtkComboBox.GtkFrame");
                     GtkWidget *gtkEntry = d->gtkWidget(entryPath);
-                    d->gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+                    gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
                     QRect frameRect = option->rect;
 
                     if (reverse)
@@ -1480,7 +1480,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
 
 
                     gint interiorFocus = true;
-                    d->gtk_widget_style_get(gtkToggleButton, "interior-focus", &interiorFocus, NULL);
+                    gtk_widget_style_get(gtkToggleButton, "interior-focus", &interiorFocus, NULL);
                     int xt = interiorFocus ? gtkToggleButton->style->xthickness : 0;
                     int yt = interiorFocus ? gtkToggleButton->style->ythickness : 0;
                     if (focus && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget)))
@@ -1519,9 +1519,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
                 gint minSize = 15;
                 QRect arrowWidgetRect;
 
-                if (gtkArrow && !d->gtk_check_version(2, 12, 0)) {
-                    d->gtk_widget_style_get(gtkArrow, "arrow-scaling", &scale, NULL);
-                    d->gtk_widget_style_get(gtkCombo, "arrow-size", &minSize, NULL);
+                if (gtkArrow && !gtk_check_version(2, 12, 0)) {
+                    gtk_widget_style_get(gtkArrow, "arrow-scaling", &scale, NULL);
+                    gtk_widget_style_get(gtkCombo, "arrow-size", &minSize, NULL);
                 }
                 if (gtkArrow) {
                     arrowWidgetRect = QRect(gtkArrow->allocation.x, gtkArrow->allocation.y,
@@ -1544,8 +1544,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
                             : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
 
                     GtkWidget *gtkButton = d->gtkWidget(toggleButtonPath);
-                    d->gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL);
-                    d->gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL);
+                    gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL);
+                    gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL);
                     arrowRect = arrowRect.adjusted(xoff, yoff, xoff, yoff);
                 }
 
@@ -1670,8 +1670,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
             gboolean activate_slider = false;
             gboolean stepper_size = 14;
             gint trough_border = 1;
-            if (!d->gtk_check_version(2, 10, 0)) {
-                d->gtk_widget_style_get((GtkWidget*)(scrollbarWidget),
+            if (!gtk_check_version(2, 10, 0)) {
+                gtk_widget_style_get((GtkWidget*)(scrollbarWidget),
                                            "trough-border",   &trough_border,
                                            "trough-side-details",   &trough_side_details,
                                            "trough-under-steppers", &trough_under_steppers,
@@ -1701,13 +1701,13 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
             GtkRange *range = (GtkRange*)(horizontal ? gtkHScrollBar : gtkVScrollBar);
             GtkAdjustment *adjustment = 0;
 
-            if (d->gtk_adjustment_configure)
-                adjustment = d->gtk_range_get_adjustment(range);
+            if (gtk_adjustment_configure)
+                adjustment = gtk_range_get_adjustment(range);
             if (adjustment) {
-                d->gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0);
+                gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0);
             } else {
-                adjustment = (GtkAdjustment*)d->gtk_adjustment_new(fakePos, 0, maximum, 0, 0, 0);
-                d->gtk_range_set_adjustment(range, adjustment);
+                adjustment = (GtkAdjustment*) gtk_adjustment_new(fakePos, 0, maximum, 0, 0, 0);
+                gtk_range_set_adjustment(range, adjustment);
             }
 
             if (scrollBar->subControls & SC_ScrollBarGroove) {
@@ -1979,8 +1979,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
             QColor highlightAlpha(Qt::white);
             highlightAlpha.setAlpha(80);
 
-            QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ?
-                                                       GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+            gtk_widget_set_direction(hScaleWidget, slider->upsideDown ?
+                                     GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
             GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget;
             style = scaleWidget->style;
 
@@ -1988,10 +1988,10 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
 
                 GtkRange *range = (GtkRange*)scaleWidget;
                 GtkAdjustment *adjustment = 0;
-                if (d->gtk_adjustment_configure)
-                    adjustment = d->gtk_range_get_adjustment(range);
+                if (gtk_adjustment_configure)
+                    adjustment = gtk_range_get_adjustment(range);
                 if (adjustment) {
-                    d->gtk_adjustment_configure(adjustment,
+                    gtk_adjustment_configure(adjustment,
                                                 slider->sliderPosition,
                                                 slider->minimum,
                                                 slider->maximum,
@@ -1999,18 +1999,18 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
                                                 slider->singleStep,
                                                 slider->pageStep);
                 } else {
-                    adjustment = (GtkAdjustment*)d->gtk_adjustment_new(slider->sliderPosition,
-                                                                       slider->minimum,
-                                                                       slider->maximum,
-                                                                       slider->singleStep,
-                                                                       slider->singleStep,
-                                                                       slider->pageStep);
-                    d->gtk_range_set_adjustment(range, adjustment);
+                    adjustment = (GtkAdjustment*)gtk_adjustment_new(slider->sliderPosition,
+                                                    slider->minimum,
+                                                    slider->maximum,
+                                                    slider->singleStep,
+                                                    slider->singleStep,
+                                                    slider->pageStep);
+                    gtk_range_set_adjustment(range, adjustment);
                 }
 
                 int outerSize;
-                d->gtk_range_set_inverted(range, !horizontal);
-                d->gtk_widget_style_get(scaleWidget, "trough-border", &outerSize, NULL);
+                gtk_range_set_inverted(range, !horizontal);
+                gtk_widget_style_get(scaleWidget, "trough-border", &outerSize, NULL);
                 outerSize++;
 
                 GtkStateType state = gtkPainter.gtkState(option);
@@ -2019,8 +2019,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
                                    -focusFrameMargin, -outerSize - focusFrameMargin);
 
                 gboolean trough_side_details = false; // Indicates if the upper or lower scale background differs
-                if (!d->gtk_check_version(2, 10, 0))
-                    d->gtk_widget_style_get((GtkWidget*)(scaleWidget), "trough-side-details",   &trough_side_details, NULL);
+                if (!gtk_check_version(2, 10, 0))
+                    gtk_widget_style_get((GtkWidget*)(scaleWidget), "trough-side-details",   &trough_side_details, NULL);
 
                 if (!trough_side_details) {
                     gtkPainter.paintBox( scaleWidget, "trough", grooveRect, state,
@@ -2448,7 +2448,7 @@ void QGtkStyle::drawControl(ControlElement element,
             Q_UNUSED(header);
             GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView");
             // Get the middle column
-            GtkTreeViewColumn *column = d->gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1);
+            GtkTreeViewColumn *column = gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1);
             Q_ASSERT(column);
 
             GtkWidget *gtkTreeHeader = column->button;
@@ -2489,7 +2489,7 @@ void QGtkStyle::drawControl(ControlElement element,
             QPainter pmPainter(&pixmap);
             QGtkPainter gtkMenuBarPainter(&pmPainter);
             GtkShadowType shadow_type;
-            d->gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL);
+            gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL);
             gtkMenuBarPainter.paintBox( gtkMenubar, "menubar",  menuBarRect,
                                         GTK_STATE_NORMAL, shadow_type, gtkMenubar->style);
             pmPainter.end();
@@ -2518,7 +2518,7 @@ void QGtkStyle::drawControl(ControlElement element,
                 QPainter pmPainter(&pixmap);
                 QGtkPainter menubarPainter(&pmPainter);
                 GtkShadowType shadow_type;
-                d->gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL);
+                gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL);
                 GdkColor gdkBg = gtkMenubar->style->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency
                 painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8));
                 menubarPainter.paintBox(gtkMenubar, "menubar",  menuBarRect,
@@ -2542,7 +2542,7 @@ void QGtkStyle::drawControl(ControlElement element,
 
             if (act) {
                 GtkShadowType shadowType = GTK_SHADOW_NONE;
-                d->gtk_widget_style_get (gtkMenubarItem, "selected-shadow-type", &shadowType, NULL);
+                gtk_widget_style_get (gtkMenubarItem, "selected-shadow-type", &shadowType, NULL);
                 gtkPainter.paintBox(gtkMenubarItem, "menuitem",  option->rect.adjusted(0, 0, 0, 3),
                                     GTK_STATE_PRELIGHT, shadowType, gtkMenubarItem->style);
                 //draw text
@@ -2581,7 +2581,7 @@ void QGtkStyle::drawControl(ControlElement element,
 
             GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar");
             GtkShadowType shadow_type = GTK_SHADOW_NONE;
-            d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
+            gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL);
             gtkPainter.paintBox( gtkToolbar, "toolbar",  rect,
                                  GTK_STATE_NORMAL, shadow_type, gtkToolbar->style);
         }
@@ -2611,8 +2611,8 @@ void QGtkStyle::drawControl(ControlElement element,
                 gint     separator_height = 0;
                 guint    horizontal_padding = 3;
                 QRect separatorRect = option->rect;
-                if (!d->gtk_check_version(2, 10, 0)) {
-                    d->gtk_widget_style_get(gtkMenuSeparator,
+                if (!gtk_check_version(2, 10, 0)) {
+                    gtk_widget_style_get(gtkMenuSeparator,
                                            "wide-separators",    &wide_separators,
                                            "separator-height",   &separator_height,
                                            "horizontal-padding", &horizontal_padding,
@@ -2649,7 +2649,7 @@ void QGtkStyle::drawControl(ControlElement element,
             bool ignoreCheckMark = false;
 
             gint checkSize;
-            d->gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL);
+            gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL);
 
             int checkcol = qMax(menuItem->maxIconWidth, qMax(20, checkSize));
 
@@ -2831,16 +2831,16 @@ void QGtkStyle::drawControl(ControlElement element,
                 int arrow_size = fm.ascent() + fm.descent() - 2 * gtkMenuItem->style->ythickness;
                 gfloat arrow_scaling = 0.8;
                 int extra = 0;
-                if (!d->gtk_check_version(2, 16, 0)) {
+                if (!gtk_check_version(2, 16, 0)) {
                     // "arrow-scaling" is actually hardcoded and fails on hardy (see gtk+-2.12/gtkmenuitem.c)
                     // though the current documentation states otherwise
-                    d->gtk_widget_style_get(gtkMenuItem, "arrow-scaling", &arrow_scaling, NULL);
+                    gtk_widget_style_get(gtkMenuItem, "arrow-scaling", &arrow_scaling, NULL);
                     // in versions < 2.16 ythickness was previously subtracted from the arrow_size
                     extra = 2 * gtkMenuItem->style->ythickness;
                 }
 
                 int horizontal_padding;
-                d->gtk_widget_style_get(gtkMenuItem, "horizontal-padding", &horizontal_padding, NULL);
+                gtk_widget_style_get(gtkMenuItem, "horizontal-padding", &horizontal_padding, NULL);
 
                 const int dim = static_cast<int>(arrow_size * arrow_scaling) + extra;
                 int xpos = menuItem->rect.left() + menuItem->rect.width() - horizontal_padding - dim;
@@ -2863,7 +2863,7 @@ void QGtkStyle::drawControl(ControlElement element,
             QStyleOptionButton subopt = *btn;
             subopt.rect = subElementRect(SE_PushButtonContents, btn, widget);
             gint interiorFocus = true;
-            d->gtk_widget_style_get(gtkButton, "interior-focus", &interiorFocus, NULL);
+            gtk_widget_style_get(gtkButton, "interior-focus", &interiorFocus, NULL);
             int xt = interiorFocus ? gtkButton->style->xthickness : 0;
             int yt = interiorFocus ? gtkButton->style->ythickness : 0;
 
@@ -3009,7 +3009,7 @@ void QGtkStyle::drawControl(ControlElement element,
             else if (bar->progress > bar->minimum)
                 fakePos = maximum - 1;
 
-            d->gtk_progress_configure((GtkProgress*)gtkProgressBar, fakePos, 0, maximum);
+            gtk_progress_configure((GtkProgress*)gtkProgressBar, fakePos, 0, maximum);
 
             QRect progressBar;
 
@@ -3173,9 +3173,9 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple
             // We employ the gtk widget to position arrows and separators for us
             GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry")
                                                 : d->gtkWidget("GtkComboBox");
-            d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
+            gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
             GtkAllocation geometry = {0, 0, qMax(0, option->rect.width()), qMax(0, option->rect.height())};
-            d->gtk_widget_size_allocate(gtkCombo, &geometry);
+            gtk_widget_size_allocate(gtkCombo, &geometry);
             int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, option, widget);
             QHashableLatin1Literal arrowPath("GtkComboBoxEntry.GtkToggleButton");
             if (!box->editable) {
@@ -3262,7 +3262,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
             if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
                 GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem");
                 GtkRequisition sizeReq = {0, 0};
-                d->gtk_widget_size_request(gtkMenuSeparator, &sizeReq);
+                gtk_widget_size_request(gtkMenuSeparator, &sizeReq);
                 newSize = QSize(size.width(), sizeReq.height);
                 break;
             }
@@ -3274,14 +3274,14 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
             // set a fake text label on the gtkMenuItem
             // But if custom fonts are used on the widget we need a minimum size
             GtkRequisition sizeReq = {0, 0};
-            d->gtk_widget_size_request(gtkMenuItem, &sizeReq);
+            gtk_widget_size_request(gtkMenuItem, &sizeReq);
             newSize.setHeight(qMax(newSize.height() - 4, sizeReq.height));
             newSize += QSize(textMargin + style->xthickness - 1, 0);
 
             // Cleanlooks assumes a check column of 20 pixels so we need to
             // expand it a bit
             gint checkSize;
-            d->gtk_widget_style_get(gtkMenuItem, "indicator-size", &checkSize, NULL);
+            gtk_widget_style_get(gtkMenuItem, "indicator-size", &checkSize, NULL);
             newSize.setWidth(newSize.width() + qMax(0, checkSize - 20));
         }
 
@@ -3296,15 +3296,15 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option,
         if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(option)) {
             GtkWidget *gtkButton = d->gtkWidget("GtkButton");
             gint focusPadding, focusWidth;
-            d->gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL);
-            d->gtk_widget_style_get(gtkButton, "focus-line-width", &focusWidth, NULL);
+            gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL);
+            gtk_widget_style_get(gtkButton, "focus-line-width", &focusWidth, NULL);
             newSize = size;
             newSize += QSize(2*gtkButton->style->xthickness + 4, 2*gtkButton->style->ythickness);
             newSize += QSize(2*(focusWidth + focusPadding + 2), 2*(focusWidth + focusPadding));
 
             GtkWidget *gtkButtonBox = d->gtkWidget("GtkHButtonBox");
             gint minWidth = 85, minHeight = 0;
-            d->gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth,
+            gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth,
                                    "child-min-height", &minHeight, NULL);
             if (!btn->text.isEmpty() && newSize.width() < minWidth)
                 newSize.setWidth(minWidth);
@@ -3486,13 +3486,13 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option,
     case SE_ProgressBarGroove:
         return option->rect;
     case SE_PushButtonContents:
-        if (!d->gtk_check_version(2, 10, 0)) {
+        if (!gtk_check_version(2, 10, 0)) {
             GtkWidget *gtkButton = d->gtkWidget("GtkButton");
             GtkBorder *border = 0;
-            d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL);
+            gtk_widget_style_get(gtkButton, "inner-border", &border, NULL);
             if (border) {
                 r = option->rect.adjusted(border->left, border->top, -border->right, -border->bottom);
-                d->gtk_border_free(border);
+                gtk_border_free(border);
             } else {
                 r = option->rect.adjusted(1, 1, -1, -1);
             }
index a46f640..f4462d4 100644 (file)
 
 #include <qt_x11_p.h>
 
+#ifndef QT_NO_GCONF2
+#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
+#endif
+
+#include <gdk/gdkx.h>
+
 QT_BEGIN_NAMESPACE
 
 Q_GLOBAL_STATIC(QGtkStyleUpdateScheduler, styleScheduler)
 
-Ptr_gtk_container_forall QGtkStylePrivate::gtk_container_forall = 0;
-Ptr_gtk_init QGtkStylePrivate::gtk_init = 0;
-Ptr_gtk_style_attach QGtkStylePrivate::gtk_style_attach = 0;
-Ptr_gtk_window_new QGtkStylePrivate::gtk_window_new = 0;
-Ptr_gtk_widget_destroy QGtkStylePrivate::gtk_widget_destroy = 0;
-Ptr_gtk_widget_realize QGtkStylePrivate::gtk_widget_realize = 0;
-Ptr_gtk_widget_set_default_direction QGtkStylePrivate::gtk_widget_set_default_direction = 0;
-Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_fg = 0;
-Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_bg = 0;
-Ptr_gtk_arrow_new QGtkStylePrivate::gtk_arrow_new = 0;
-Ptr_gtk_menu_item_new_with_label QGtkStylePrivate::gtk_menu_item_new_with_label = 0;
-Ptr_gtk_check_menu_item_new_with_label QGtkStylePrivate::gtk_check_menu_item_new_with_label = 0;
-Ptr_gtk_menu_bar_new QGtkStylePrivate::gtk_menu_bar_new = 0;
-Ptr_gtk_menu_new QGtkStylePrivate::gtk_menu_new = 0;
-Ptr_gtk_button_new QGtkStylePrivate::gtk_button_new = 0;
-Ptr_gtk_tool_button_new QGtkStylePrivate::gtk_tool_button_new = 0;
-Ptr_gtk_hbutton_box_new QGtkStylePrivate::gtk_hbutton_box_new = 0;
-Ptr_gtk_check_button_new QGtkStylePrivate::gtk_check_button_new = 0;
-Ptr_gtk_radio_button_new QGtkStylePrivate::gtk_radio_button_new = 0;
-Ptr_gtk_spin_button_new QGtkStylePrivate::gtk_spin_button_new = 0;
-Ptr_gtk_frame_new QGtkStylePrivate::gtk_frame_new = 0;
-Ptr_gtk_expander_new QGtkStylePrivate::gtk_expander_new = 0;
-Ptr_gtk_statusbar_new QGtkStylePrivate::gtk_statusbar_new = 0;
-Ptr_gtk_entry_new QGtkStylePrivate::gtk_entry_new = 0;
-Ptr_gtk_hscale_new QGtkStylePrivate::gtk_hscale_new = 0;
-Ptr_gtk_vscale_new QGtkStylePrivate::gtk_vscale_new = 0;
-Ptr_gtk_hscrollbar_new QGtkStylePrivate::gtk_hscrollbar_new = 0;
-Ptr_gtk_vscrollbar_new QGtkStylePrivate::gtk_vscrollbar_new = 0;
-Ptr_gtk_scrolled_window_new QGtkStylePrivate::gtk_scrolled_window_new = 0;
-Ptr_gtk_notebook_new QGtkStylePrivate::gtk_notebook_new = 0;
-Ptr_gtk_toolbar_new QGtkStylePrivate::gtk_toolbar_new = 0;
-Ptr_gtk_toolbar_insert QGtkStylePrivate::gtk_toolbar_insert = 0;
-Ptr_gtk_separator_tool_item_new QGtkStylePrivate::gtk_separator_tool_item_new = 0;
-Ptr_gtk_tree_view_new QGtkStylePrivate::gtk_tree_view_new = 0;
-Ptr_gtk_combo_box_new QGtkStylePrivate::gtk_combo_box_new = 0;
-Ptr_gtk_combo_box_entry_new QGtkStylePrivate::gtk_combo_box_entry_new = 0;
-Ptr_gtk_progress_bar_new QGtkStylePrivate::gtk_progress_bar_new = 0;
-Ptr_gtk_container_add QGtkStylePrivate::gtk_container_add = 0;
-Ptr_gtk_menu_shell_append QGtkStylePrivate::gtk_menu_shell_append = 0;
-Ptr_gtk_progress_configure QGtkStylePrivate::gtk_progress_configure = 0;
-Ptr_gtk_range_get_adjustment QGtkStylePrivate::gtk_range_get_adjustment = 0;
-Ptr_gtk_range_set_adjustment QGtkStylePrivate::gtk_range_set_adjustment = 0;
-Ptr_gtk_range_set_inverted QGtkStylePrivate::gtk_range_set_inverted = 0;
-Ptr_gtk_icon_factory_lookup_default QGtkStylePrivate::gtk_icon_factory_lookup_default = 0;
-Ptr_gtk_icon_theme_get_default QGtkStylePrivate::gtk_icon_theme_get_default = 0;
-Ptr_gtk_widget_style_get QGtkStylePrivate::gtk_widget_style_get = 0;
-Ptr_gtk_icon_set_render_icon QGtkStylePrivate::gtk_icon_set_render_icon = 0;
-Ptr_gtk_fixed_new QGtkStylePrivate::gtk_fixed_new = 0;
-Ptr_gtk_tree_view_column_new QGtkStylePrivate::gtk_tree_view_column_new = 0;
-Ptr_gtk_tree_view_get_column QGtkStylePrivate::gtk_tree_view_get_column = 0;
-Ptr_gtk_tree_view_append_column QGtkStylePrivate::gtk_tree_view_append_column = 0;
-Ptr_gtk_paint_check QGtkStylePrivate::gtk_paint_check = 0;
-Ptr_gtk_paint_box QGtkStylePrivate::gtk_paint_box = 0;
-Ptr_gtk_paint_box_gap QGtkStylePrivate::gtk_paint_box_gap = 0;
-Ptr_gtk_paint_flat_box QGtkStylePrivate::gtk_paint_flat_box = 0;
-Ptr_gtk_paint_option QGtkStylePrivate::gtk_paint_option = 0;
-Ptr_gtk_paint_extension QGtkStylePrivate::gtk_paint_extension = 0;
-Ptr_gtk_paint_slider QGtkStylePrivate::gtk_paint_slider = 0;
-Ptr_gtk_paint_shadow QGtkStylePrivate::gtk_paint_shadow = 0;
-Ptr_gtk_paint_resize_grip QGtkStylePrivate::gtk_paint_resize_grip = 0;
-Ptr_gtk_paint_focus QGtkStylePrivate::gtk_paint_focus = 0;
-Ptr_gtk_paint_arrow QGtkStylePrivate::gtk_paint_arrow = 0;
-Ptr_gtk_paint_handle QGtkStylePrivate::gtk_paint_handle = 0;
-Ptr_gtk_paint_expander QGtkStylePrivate::gtk_paint_expander = 0;
-Ptr_gtk_adjustment_configure QGtkStylePrivate::gtk_adjustment_configure = 0;
-Ptr_gtk_adjustment_new QGtkStylePrivate::gtk_adjustment_new = 0;
-Ptr_gtk_paint_hline QGtkStylePrivate::gtk_paint_hline = 0;
-Ptr_gtk_paint_vline QGtkStylePrivate::gtk_paint_vline = 0;
-Ptr_gtk_menu_item_set_submenu QGtkStylePrivate::gtk_menu_item_set_submenu = 0;
-Ptr_gtk_settings_get_default QGtkStylePrivate::gtk_settings_get_default = 0;
-Ptr_gtk_separator_menu_item_new QGtkStylePrivate::gtk_separator_menu_item_new = 0;
-Ptr_gtk_widget_size_allocate QGtkStylePrivate::gtk_widget_size_allocate = 0;
-Ptr_gtk_widget_size_request QGtkStylePrivate::gtk_widget_size_request = 0;
-Ptr_gtk_widget_set_direction QGtkStylePrivate::gtk_widget_set_direction = 0;
-Ptr_gtk_widget_path QGtkStylePrivate::gtk_widget_path = 0;
-Ptr_gtk_container_get_type QGtkStylePrivate::gtk_container_get_type = 0;
-Ptr_gtk_window_get_type QGtkStylePrivate::gtk_window_get_type = 0;
-Ptr_gtk_widget_get_type QGtkStylePrivate::gtk_widget_get_type = 0;
-Ptr_gtk_rc_get_style_by_paths QGtkStylePrivate::gtk_rc_get_style_by_paths = 0;
-Ptr_gtk_check_version QGtkStylePrivate::gtk_check_version = 0;
-Ptr_gtk_border_free QGtkStylePrivate::gtk_border_free = 0;
-Ptr_pango_font_description_get_size QGtkStylePrivate::pango_font_description_get_size = 0;
-Ptr_pango_font_description_get_weight QGtkStylePrivate::pango_font_description_get_weight = 0;
-Ptr_pango_font_description_get_family QGtkStylePrivate::pango_font_description_get_family = 0;
-Ptr_pango_font_description_get_style QGtkStylePrivate::pango_font_description_get_style = 0;
-
-Ptr_gtk_file_filter_new QGtkStylePrivate::gtk_file_filter_new = 0;
-Ptr_gtk_file_filter_set_name QGtkStylePrivate::gtk_file_filter_set_name = 0;
-Ptr_gtk_file_filter_add_pattern QGtkStylePrivate::gtk_file_filter_add_pattern = 0;
-Ptr_gtk_file_chooser_add_filter QGtkStylePrivate::gtk_file_chooser_add_filter = 0;
-Ptr_gtk_file_chooser_set_filter QGtkStylePrivate::gtk_file_chooser_set_filter = 0;
-Ptr_gtk_file_chooser_get_filter QGtkStylePrivate::gtk_file_chooser_get_filter = 0;
-Ptr_gtk_file_chooser_dialog_new QGtkStylePrivate::gtk_file_chooser_dialog_new = 0;
-Ptr_gtk_file_chooser_set_current_folder QGtkStylePrivate::gtk_file_chooser_set_current_folder = 0;
-Ptr_gtk_file_chooser_get_filename QGtkStylePrivate::gtk_file_chooser_get_filename = 0;
-Ptr_gtk_file_chooser_get_filenames QGtkStylePrivate::gtk_file_chooser_get_filenames = 0;
-Ptr_gtk_file_chooser_set_current_name QGtkStylePrivate::gtk_file_chooser_set_current_name = 0;
-Ptr_gtk_dialog_run QGtkStylePrivate::gtk_dialog_run = 0;
-Ptr_gtk_file_chooser_set_filename QGtkStylePrivate::gtk_file_chooser_set_filename = 0;
-
-Ptr_gdk_pixbuf_get_pixels QGtkStylePrivate::gdk_pixbuf_get_pixels = 0;
-Ptr_gdk_pixbuf_get_width QGtkStylePrivate::gdk_pixbuf_get_width = 0;
-Ptr_gdk_pixbuf_get_height QGtkStylePrivate::gdk_pixbuf_get_height = 0;
-Ptr_gdk_pixmap_new QGtkStylePrivate::gdk_pixmap_new = 0;
-Ptr_gdk_pixbuf_new QGtkStylePrivate::gdk_pixbuf_new = 0;
-Ptr_gdk_pixbuf_get_from_drawable QGtkStylePrivate::gdk_pixbuf_get_from_drawable = 0;
-Ptr_gdk_draw_rectangle QGtkStylePrivate::gdk_draw_rectangle = 0;
-Ptr_gdk_pixbuf_unref QGtkStylePrivate::gdk_pixbuf_unref = 0;
-Ptr_gdk_drawable_unref QGtkStylePrivate::gdk_drawable_unref = 0;
-Ptr_gdk_color_free QGtkStylePrivate::gdk_color_free = 0;
-Ptr_gdk_x11_window_set_user_time QGtkStylePrivate::gdk_x11_window_set_user_time = 0;
-Ptr_gdk_x11_drawable_get_xid QGtkStylePrivate::gdk_x11_drawable_get_xid = 0;
-Ptr_gdk_x11_drawable_get_xdisplay QGtkStylePrivate::gdk_x11_drawable_get_xdisplay = 0;
-
-Ptr_gconf_client_get_default QGtkStylePrivate::gconf_client_get_default = 0;
-Ptr_gconf_client_get_string QGtkStylePrivate::gconf_client_get_string = 0;
-Ptr_gconf_client_get_bool QGtkStylePrivate::gconf_client_get_bool = 0;
-
 Ptr_gnome_icon_lookup_sync QGtkStylePrivate::gnome_icon_lookup_sync = 0;
 Ptr_gnome_vfs_init QGtkStylePrivate::gnome_vfs_init = 0;
 
@@ -237,7 +126,7 @@ static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer)
 static QHashableLatin1Literal classPath(GtkWidget *widget)
 {
     char *class_path;
-    QGtkStylePrivate::gtk_widget_path (widget, NULL, &class_path, NULL);
+    gtk_widget_path (widget, NULL, &class_path, NULL);
 
     char *copy = class_path;
     if (strncmp(copy, "GtkWindow.", 10) == 0)
@@ -283,7 +172,10 @@ QGtkStylePrivate::~QGtkStylePrivate()
 
 void QGtkStylePrivate::init()
 {
-    resolveGtk();
+#warning make gnomeui linked
+    gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
+    gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
+
     initGtkWidgets();
 }
 
@@ -304,138 +196,6 @@ GtkStyle* QGtkStylePrivate::gtkStyle(const QHashableLatin1Literal &path)
     return 0;
 }
 
-/*! \internal
- *  Get references to gtk functions after we dynamically load the library.
- */
-void QGtkStylePrivate::resolveGtk() const
-{
-    // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
-    QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
-    libgtk.setLoadHints(QLibrary::ImprovedSearchHeuristics);
-
-    gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
-    gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
-    gtk_style_attach = (Ptr_gtk_style_attach)libgtk.resolve("gtk_style_attach");
-    gtk_widget_destroy = (Ptr_gtk_widget_destroy)libgtk.resolve("gtk_widget_destroy");
-    gtk_widget_realize = (Ptr_gtk_widget_realize)libgtk.resolve("gtk_widget_realize");
-
-    gtk_file_chooser_set_current_folder = (Ptr_gtk_file_chooser_set_current_folder)libgtk.resolve("gtk_file_chooser_set_current_folder");
-    gtk_file_filter_new = (Ptr_gtk_file_filter_new)libgtk.resolve("gtk_file_filter_new");
-    gtk_file_filter_set_name = (Ptr_gtk_file_filter_set_name)libgtk.resolve("gtk_file_filter_set_name");
-    gtk_file_filter_add_pattern = (Ptr_gtk_file_filter_add_pattern)libgtk.resolve("gtk_file_filter_add_pattern");
-    gtk_file_chooser_add_filter = (Ptr_gtk_file_chooser_add_filter)libgtk.resolve("gtk_file_chooser_add_filter");
-    gtk_file_chooser_set_filter = (Ptr_gtk_file_chooser_set_filter)libgtk.resolve("gtk_file_chooser_set_filter");
-    gtk_file_chooser_get_filter = (Ptr_gtk_file_chooser_get_filter)libgtk.resolve("gtk_file_chooser_get_filter");
-    gtk_file_chooser_dialog_new = (Ptr_gtk_file_chooser_dialog_new)libgtk.resolve("gtk_file_chooser_dialog_new");
-    gtk_file_chooser_set_current_folder = (Ptr_gtk_file_chooser_set_current_folder)libgtk.resolve("gtk_file_chooser_set_current_folder");
-    gtk_file_chooser_get_filename = (Ptr_gtk_file_chooser_get_filename)libgtk.resolve("gtk_file_chooser_get_filename");
-    gtk_file_chooser_get_filenames = (Ptr_gtk_file_chooser_get_filenames)libgtk.resolve("gtk_file_chooser_get_filenames");
-    gtk_file_chooser_set_current_name = (Ptr_gtk_file_chooser_set_current_name)libgtk.resolve("gtk_file_chooser_set_current_name");
-    gtk_dialog_run = (Ptr_gtk_dialog_run)libgtk.resolve("gtk_dialog_run");
-    gtk_file_chooser_set_filename = (Ptr_gtk_file_chooser_set_filename)libgtk.resolve("gtk_file_chooser_set_filename");
-
-    gdk_pixbuf_get_pixels = (Ptr_gdk_pixbuf_get_pixels)libgtk.resolve("gdk_pixbuf_get_pixels");
-    gdk_pixbuf_get_width = (Ptr_gdk_pixbuf_get_width)libgtk.resolve("gdk_pixbuf_get_width");
-    gdk_pixbuf_get_height = (Ptr_gdk_pixbuf_get_height)libgtk.resolve("gdk_pixbuf_get_height");
-    gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
-    gdk_pixbuf_new = (Ptr_gdk_pixbuf_new)libgtk.resolve("gdk_pixbuf_new");
-    gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
-    gdk_draw_rectangle = (Ptr_gdk_draw_rectangle)libgtk.resolve("gdk_draw_rectangle");
-    gdk_pixbuf_unref = (Ptr_gdk_pixbuf_unref)libgtk.resolve("gdk_pixbuf_unref");
-    gdk_drawable_unref = (Ptr_gdk_drawable_unref)libgtk.resolve("gdk_drawable_unref");
-    gdk_color_free = (Ptr_gdk_color_free)libgtk.resolve("gdk_color_free");
-    gdk_x11_window_set_user_time = (Ptr_gdk_x11_window_set_user_time)libgtk.resolve("gdk_x11_window_set_user_time");
-    gdk_x11_drawable_get_xid = (Ptr_gdk_x11_drawable_get_xid)libgtk.resolve("gdk_x11_drawable_get_xid");
-    gdk_x11_drawable_get_xdisplay = (Ptr_gdk_x11_drawable_get_xdisplay)libgtk.resolve("gdk_x11_drawable_get_xdisplay");
-
-    gtk_widget_set_default_direction = (Ptr_gtk_widget_set_default_direction)libgtk.resolve("gtk_widget_set_default_direction");
-    gtk_widget_modify_fg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_fg");
-    gtk_widget_modify_bg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_bg");
-    gtk_arrow_new = (Ptr_gtk_arrow_new)libgtk.resolve("gtk_arrow_new");
-    gtk_menu_item_new_with_label = (Ptr_gtk_menu_item_new_with_label)libgtk.resolve("gtk_menu_item_new_with_label");
-    gtk_check_menu_item_new_with_label = (Ptr_gtk_check_menu_item_new_with_label)libgtk.resolve("gtk_check_menu_item_new_with_label");
-    gtk_menu_bar_new = (Ptr_gtk_menu_bar_new)libgtk.resolve("gtk_menu_bar_new");
-    gtk_menu_new = (Ptr_gtk_menu_new)libgtk.resolve("gtk_menu_new");
-    gtk_toolbar_new = (Ptr_gtk_toolbar_new)libgtk.resolve("gtk_toolbar_new");
-    gtk_separator_tool_item_new = (Ptr_gtk_separator_tool_item_new)libgtk.resolve("gtk_separator_tool_item_new");
-    gtk_toolbar_insert = (Ptr_gtk_toolbar_insert)libgtk.resolve("gtk_toolbar_insert");
-    gtk_button_new = (Ptr_gtk_button_new)libgtk.resolve("gtk_button_new");
-    gtk_tool_button_new = (Ptr_gtk_tool_button_new)libgtk.resolve("gtk_tool_button_new");
-    gtk_hbutton_box_new = (Ptr_gtk_hbutton_box_new)libgtk.resolve("gtk_hbutton_box_new");
-    gtk_check_button_new = (Ptr_gtk_check_button_new)libgtk.resolve("gtk_check_button_new");
-    gtk_radio_button_new = (Ptr_gtk_radio_button_new)libgtk.resolve("gtk_radio_button_new");
-    gtk_notebook_new = (Ptr_gtk_notebook_new)libgtk.resolve("gtk_notebook_new");
-    gtk_progress_bar_new = (Ptr_gtk_progress_bar_new)libgtk.resolve("gtk_progress_bar_new");
-    gtk_spin_button_new = (Ptr_gtk_spin_button_new)libgtk.resolve("gtk_spin_button_new");
-    gtk_hscale_new = (Ptr_gtk_hscale_new)libgtk.resolve("gtk_hscale_new");
-    gtk_vscale_new = (Ptr_gtk_vscale_new)libgtk.resolve("gtk_vscale_new");
-    gtk_hscrollbar_new = (Ptr_gtk_hscrollbar_new)libgtk.resolve("gtk_hscrollbar_new");
-    gtk_vscrollbar_new = (Ptr_gtk_vscrollbar_new)libgtk.resolve("gtk_vscrollbar_new");
-    gtk_scrolled_window_new = (Ptr_gtk_scrolled_window_new)libgtk.resolve("gtk_scrolled_window_new");
-    gtk_menu_shell_append = (Ptr_gtk_menu_shell_append)libgtk.resolve("gtk_menu_shell_append");
-    gtk_entry_new = (Ptr_gtk_entry_new)libgtk.resolve("gtk_entry_new");
-    gtk_tree_view_new = (Ptr_gtk_tree_view_new)libgtk.resolve("gtk_tree_view_new");
-    gtk_combo_box_new = (Ptr_gtk_combo_box_new)libgtk.resolve("gtk_combo_box_new");
-    gtk_progress_configure = (Ptr_gtk_progress_configure)libgtk.resolve("gtk_progress_configure");
-    gtk_range_get_adjustment = (Ptr_gtk_range_get_adjustment)libgtk.resolve("gtk_range_get_adjustment");
-    gtk_range_set_adjustment = (Ptr_gtk_range_set_adjustment)libgtk.resolve("gtk_range_set_adjustment");
-    gtk_range_set_inverted = (Ptr_gtk_range_set_inverted)libgtk.resolve("gtk_range_set_inverted");
-    gtk_container_add = (Ptr_gtk_container_add)libgtk.resolve("gtk_container_add");
-    gtk_icon_factory_lookup_default = (Ptr_gtk_icon_factory_lookup_default)libgtk.resolve("gtk_icon_factory_lookup_default");
-    gtk_icon_theme_get_default = (Ptr_gtk_icon_theme_get_default)libgtk.resolve("gtk_icon_theme_get_default");
-    gtk_widget_style_get = (Ptr_gtk_widget_style_get)libgtk.resolve("gtk_widget_style_get");
-    gtk_icon_set_render_icon = (Ptr_gtk_icon_set_render_icon)libgtk.resolve("gtk_icon_set_render_icon");
-    gtk_fixed_new = (Ptr_gtk_fixed_new)libgtk.resolve("gtk_fixed_new");
-    gtk_tree_view_column_new = (Ptr_gtk_tree_view_column_new)libgtk.resolve("gtk_tree_view_column_new");
-    gtk_tree_view_append_column= (Ptr_gtk_tree_view_append_column )libgtk.resolve("gtk_tree_view_append_column");
-    gtk_tree_view_get_column = (Ptr_gtk_tree_view_get_column )libgtk.resolve("gtk_tree_view_get_column");
-    gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check");
-    gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box");
-    gtk_paint_flat_box = (Ptr_gtk_paint_flat_box)libgtk.resolve("gtk_paint_flat_box");
-    gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check");
-    gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box");
-    gtk_paint_resize_grip = (Ptr_gtk_paint_resize_grip)libgtk.resolve("gtk_paint_resize_grip");
-    gtk_paint_focus = (Ptr_gtk_paint_focus)libgtk.resolve("gtk_paint_focus");
-    gtk_paint_shadow = (Ptr_gtk_paint_shadow)libgtk.resolve("gtk_paint_shadow");
-    gtk_paint_slider = (Ptr_gtk_paint_slider)libgtk.resolve("gtk_paint_slider");
-    gtk_paint_expander = (Ptr_gtk_paint_expander)libgtk.resolve("gtk_paint_expander");
-    gtk_paint_handle = (Ptr_gtk_paint_handle)libgtk.resolve("gtk_paint_handle");
-    gtk_paint_option = (Ptr_gtk_paint_option)libgtk.resolve("gtk_paint_option");
-    gtk_paint_arrow = (Ptr_gtk_paint_arrow)libgtk.resolve("gtk_paint_arrow");
-    gtk_paint_box_gap = (Ptr_gtk_paint_box_gap)libgtk.resolve("gtk_paint_box_gap");
-    gtk_paint_extension = (Ptr_gtk_paint_extension)libgtk.resolve("gtk_paint_extension");
-    gtk_paint_hline = (Ptr_gtk_paint_hline)libgtk.resolve("gtk_paint_hline");
-    gtk_paint_vline = (Ptr_gtk_paint_vline)libgtk.resolve("gtk_paint_vline");
-    gtk_adjustment_configure = (Ptr_gtk_adjustment_configure)libgtk.resolve("gtk_adjustment_configure");
-    gtk_adjustment_new = (Ptr_gtk_adjustment_new)libgtk.resolve("gtk_adjustment_new");
-    gtk_menu_item_set_submenu = (Ptr_gtk_menu_item_set_submenu)libgtk.resolve("gtk_menu_item_set_submenu");
-    gtk_settings_get_default = (Ptr_gtk_settings_get_default)libgtk.resolve("gtk_settings_get_default");
-    gtk_separator_menu_item_new = (Ptr_gtk_separator_menu_item_new)libgtk.resolve("gtk_separator_menu_item_new");
-    gtk_frame_new = (Ptr_gtk_frame_new)libgtk.resolve("gtk_frame_new");
-    gtk_expander_new = (Ptr_gtk_expander_new)libgtk.resolve("gtk_expander_new");
-    gtk_statusbar_new = (Ptr_gtk_statusbar_new)libgtk.resolve("gtk_statusbar_new");
-    gtk_combo_box_entry_new = (Ptr_gtk_combo_box_entry_new)libgtk.resolve("gtk_combo_box_entry_new");
-    gtk_container_forall = (Ptr_gtk_container_forall)libgtk.resolve("gtk_container_forall");
-    gtk_widget_size_allocate =(Ptr_gtk_widget_size_allocate)libgtk.resolve("gtk_widget_size_allocate");
-    gtk_widget_size_request =(Ptr_gtk_widget_size_request)libgtk.resolve("gtk_widget_size_request");
-    gtk_widget_set_direction =(Ptr_gtk_widget_set_direction)libgtk.resolve("gtk_widget_set_direction");
-    gtk_widget_path =(Ptr_gtk_widget_path)libgtk.resolve("gtk_widget_path");
-    gtk_container_get_type =(Ptr_gtk_container_get_type)libgtk.resolve("gtk_container_get_type");
-    gtk_window_get_type =(Ptr_gtk_window_get_type)libgtk.resolve("gtk_window_get_type");
-    gtk_widget_get_type =(Ptr_gtk_widget_get_type)libgtk.resolve("gtk_widget_get_type");
-
-    gtk_rc_get_style_by_paths =(Ptr_gtk_rc_get_style_by_paths)libgtk.resolve("gtk_rc_get_style_by_paths");
-    gtk_check_version =(Ptr_gtk_check_version)libgtk.resolve("gtk_check_version");
-    gtk_border_free =(Ptr_gtk_border_free)libgtk.resolve("gtk_border_free");
-    pango_font_description_get_size = (Ptr_pango_font_description_get_size)libgtk.resolve("pango_font_description_get_size");
-    pango_font_description_get_weight = (Ptr_pango_font_description_get_weight)libgtk.resolve("pango_font_description_get_weight");
-    pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
-    pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
-
-    gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
-    gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
-}
-
 /* \internal
  * Initializes a number of gtk menu widgets.
  * The widgets are cached.
@@ -443,27 +203,27 @@ void QGtkStylePrivate::resolveGtk() const
 void QGtkStylePrivate::initGtkMenu() const
 {
     // Create menubar
-    GtkWidget *gtkMenuBar = QGtkStylePrivate::gtk_menu_bar_new();
+    GtkWidget *gtkMenuBar = gtk_menu_bar_new();
     setupGtkWidget(gtkMenuBar);
 
-    GtkWidget *gtkMenuBarItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X");
+    GtkWidget *gtkMenuBarItem = gtk_menu_item_new_with_label("X");
     gtk_menu_shell_append((GtkMenuShell*)(gtkMenuBar), gtkMenuBarItem);
     gtk_widget_realize(gtkMenuBarItem);
 
     // Create menu
-    GtkWidget *gtkMenu = QGtkStylePrivate::gtk_menu_new();
+    GtkWidget *gtkMenu = gtk_menu_new();
     gtk_menu_item_set_submenu((GtkMenuItem*)(gtkMenuBarItem), gtkMenu);
     gtk_widget_realize(gtkMenu);
 
-    GtkWidget *gtkMenuItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X");
+    GtkWidget *gtkMenuItem = gtk_menu_item_new_with_label("X");
     gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuItem);
     gtk_widget_realize(gtkMenuItem);
 
-    GtkWidget *gtkCheckMenuItem = QGtkStylePrivate::gtk_check_menu_item_new_with_label("X");
+    GtkWidget *gtkCheckMenuItem = gtk_check_menu_item_new_with_label("X");
     gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkCheckMenuItem);
     gtk_widget_realize(gtkCheckMenuItem);
 
-    GtkWidget *gtkMenuSeparator = QGtkStylePrivate::gtk_separator_menu_item_new();
+    GtkWidget *gtkMenuSeparator = gtk_separator_menu_item_new();
     gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuSeparator);
 
     addAllSubWidgets(gtkMenuBar);
@@ -512,74 +272,71 @@ void QGtkStylePrivate::initGtkWidgets() const
         }
     }
 
-    if (QGtkStylePrivate::gtk_init) {
-        // Gtk will set the Qt error handler so we have to reset it afterwards
-        x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
-        QGtkStylePrivate::gtk_init (NULL, NULL);
-        XSetErrorHandler(qt_x_errhandler);
+    // Gtk will set the Qt error handler so we have to reset it afterwards
+    x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
+    gtk_init (NULL, NULL);
+    XSetErrorHandler(qt_x_errhandler);
 
-        // make a window
-        GtkWidget* gtkWindow = QGtkStylePrivate::gtk_window_new(GTK_WINDOW_POPUP);
-        QGtkStylePrivate::gtk_widget_realize(gtkWindow);
-        QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkWindow"));
-        removeWidgetFromMap(widgetPath);
-        gtkWidgetMap()->insert(widgetPath, gtkWindow);
-
-
-        // Make all other widgets. respect the text direction
-        if (qApp->layoutDirection() == Qt::RightToLeft)
-            QGtkStylePrivate::gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL);
-
-        if (!gtkWidgetMap()->contains("GtkButton")) {
-            GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new();
-            addWidget(gtkButton);
-            g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0);
-            addWidget(QGtkStylePrivate::gtk_tool_button_new(NULL, "Qt"));
-            addWidget(QGtkStylePrivate::gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE));
-            addWidget(QGtkStylePrivate::gtk_hbutton_box_new());
-            addWidget(QGtkStylePrivate::gtk_check_button_new());
-            addWidget(QGtkStylePrivate::gtk_radio_button_new(NULL));
-            addWidget(QGtkStylePrivate::gtk_combo_box_new());
-            addWidget(QGtkStylePrivate::gtk_combo_box_entry_new());
-            addWidget(QGtkStylePrivate::gtk_entry_new());
-            addWidget(QGtkStylePrivate::gtk_frame_new(NULL));
-            addWidget(QGtkStylePrivate::gtk_expander_new(""));
-            addWidget(QGtkStylePrivate::gtk_statusbar_new());
-            addWidget(QGtkStylePrivate::gtk_hscale_new((GtkAdjustment*)(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
-            addWidget(QGtkStylePrivate::gtk_hscrollbar_new(NULL));
-            addWidget(QGtkStylePrivate::gtk_scrolled_window_new(NULL, NULL));
-
-            initGtkMenu();
-            addWidget(QGtkStylePrivate::gtk_notebook_new());
-            addWidget(QGtkStylePrivate::gtk_progress_bar_new());
-            addWidget(QGtkStylePrivate::gtk_spin_button_new((GtkAdjustment*)
-                                             (QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
-            GtkWidget *toolbar = gtk_toolbar_new();
-            g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar);
-            gtk_toolbar_insert((GtkToolbar*)toolbar, gtk_separator_tool_item_new(), -1);
-            addWidget(toolbar);
-            initGtkTreeview();
-            addWidget(gtk_vscale_new((GtkAdjustment*)(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
-            addWidget(gtk_vscrollbar_new(NULL));
-        }
-        else // Rebuild map
-        {
-            // When styles change subwidgets can get rearranged
-            // as with the combo box. We need to update the widget map
-            // to reflect this;
-            QHash<QHashableLatin1Literal, GtkWidget*> oldMap = *gtkWidgetMap();
-            gtkWidgetMap()->clear();
-            QHashIterator<QHashableLatin1Literal, GtkWidget*> it(oldMap);
-            while (it.hasNext()) {
-                it.next();
-                if (!strchr(it.key().data(), '.')) {
-                    addAllSubWidgets(it.value());
-                }
-                free(const_cast<char *>(it.key().data()));
+    // make a window
+    GtkWidget* gtkWindow = gtk_window_new(GTK_WINDOW_POPUP);
+    gtk_widget_realize(gtkWindow);
+    QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkWindow"));
+    removeWidgetFromMap(widgetPath);
+    gtkWidgetMap()->insert(widgetPath, gtkWindow);
+
+
+    // Make all other widgets. respect the text direction
+    if (qApp->layoutDirection() == Qt::RightToLeft)
+        gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL);
+
+    if (!gtkWidgetMap()->contains("GtkButton")) {
+        GtkWidget *gtkButton = gtk_button_new();
+        addWidget(gtkButton);
+        g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0);
+#warning FIXME, add addWidget() overload
+        // addWidget(gtk_tool_button_new(NULL, "Qt"));
+        addWidget(gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE));
+        addWidget(gtk_hbutton_box_new());
+        addWidget(gtk_check_button_new());
+        addWidget(gtk_radio_button_new(NULL));
+        addWidget(gtk_combo_box_new());
+        addWidget(gtk_combo_box_entry_new());
+        addWidget(gtk_entry_new());
+        addWidget(gtk_frame_new(NULL));
+        addWidget(gtk_expander_new(""));
+        addWidget(gtk_statusbar_new());
+        addWidget(gtk_hscale_new((GtkAdjustment*)(gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
+        addWidget(gtk_hscrollbar_new(NULL));
+        addWidget(gtk_scrolled_window_new(NULL, NULL));
+
+        initGtkMenu();
+        addWidget(gtk_notebook_new());
+        addWidget(gtk_progress_bar_new());
+        addWidget(gtk_spin_button_new((GtkAdjustment*)
+                                            (gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
+        GtkWidget *toolbar = gtk_toolbar_new();
+        g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar);
+        gtk_toolbar_insert((GtkToolbar*)toolbar, gtk_separator_tool_item_new(), -1);
+        addWidget(toolbar);
+        initGtkTreeview();
+        addWidget(gtk_vscale_new((GtkAdjustment*)(gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
+        addWidget(gtk_vscrollbar_new(NULL));
+    }
+    else // Rebuild map
+    {
+        // When styles change subwidgets can get rearranged
+        // as with the combo box. We need to update the widget map
+        // to reflect this;
+        QHash<QHashableLatin1Literal, GtkWidget*> oldMap = *gtkWidgetMap();
+        gtkWidgetMap()->clear();
+        QHashIterator<QHashableLatin1Literal, GtkWidget*> it(oldMap);
+        while (it.hasNext()) {
+            it.next();
+            if (!strchr(it.key().data(), '.')) {
+                addAllSubWidgets(it.value());
             }
+            free(const_cast<char *>(it.key().data()));
         }
-    } else {
-        qWarning("QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.");
     }
 }
 
@@ -597,53 +354,43 @@ void QGtkStylePrivate::cleanupGtkWidgets()
         free(const_cast<char *>(it.key().data()));
 }
 
-static bool resolveGConf()
-{
-    if (!QGtkStylePrivate::gconf_client_get_default) {
-        QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default");
-        QGtkStylePrivate::gconf_client_get_string =  (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string");
-        QGtkStylePrivate::gconf_client_get_bool =  (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool");
-    }
-    return (QGtkStylePrivate::gconf_client_get_default !=0);
-}
-
 QString QGtkStylePrivate::getGConfString(const QString &value, const QString &fallback)
 {
     QString retVal = fallback;
-    if (resolveGConf()) {
+#ifndef QT_NO_GCONF2
 #if !GLIB_CHECK_VERSION(2,35,0)
-        g_type_init ();
+    g_type_init ();
 #endif
-        GConfClient* client = gconf_client_get_default();
-        GError *err = 0;
-        char *str = gconf_client_get_string(client, qPrintable(value), &err);
-        if (!err) {
-            retVal = QString::fromUtf8(str);
-            g_free(str);
-        }
-        g_object_unref(client);
-        if (err)
-            g_error_free (err);
+    GConfClient* client = gconf_client_get_default();
+    GError *err = 0;
+    char *str = gconf_client_get_string(client, qPrintable(value), &err);
+    if (!err) {
+        retVal = QString::fromUtf8(str);
+        g_free(str);
     }
+    g_object_unref(client);
+    if (err)
+        g_error_free (err);
+#endif
     return retVal;
 }
 
 bool QGtkStylePrivate::getGConfBool(const QString &key, bool fallback)
 {
     bool retVal = fallback;
-    if (resolveGConf()) {
+#ifndef QT_NO_GCONF2
 #if !GLIB_CHECK_VERSION(2,35,0)
-        g_type_init ();
+    g_type_init ();
+#endif
+    GConfClient* client = gconf_client_get_default();
+    GError *err = 0;
+    bool result = gconf_client_get_bool(client, qPrintable(key), &err);
+    g_object_unref(client);
+    if (!err)
+        retVal = result;
+    else
+        g_error_free (err);
 #endif
-        GConfClient* client = gconf_client_get_default();
-        GError *err = 0;
-        bool result = gconf_client_get_bool(client, qPrintable(key), &err);
-        g_object_unref(client);
-        if (!err)
-            retVal = result;
-        else
-            g_error_free (err);
-    }
     return retVal;
 }
 
@@ -678,24 +425,16 @@ QString QGtkStylePrivate::getThemeName()
         }
     }
 
+#ifndef QT_NO_GCONF2
     // Fall back to gconf
-    if (themeName.isEmpty() && resolveGConf())
+    if (themeName.isEmpty())
         themeName = getGConfString(QLS("/desktop/gnome/interface/gtk_theme"));
+#endif
 
     return themeName;
 }
 
 QString QGtkStylePrivate::getIconThemeName() {
-    if (!gtk_settings_get_default) {
-        // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
-        QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
-        libgtk.setLoadHints(QLibrary::ImprovedSearchHeuristics);
-        gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
-        gtk_settings_get_default = (Ptr_gtk_settings_get_default)libgtk.resolve("gtk_settings_get_default");
-    }
-    if (!gtk_settings_get_default) {
-        return QString();
-    }
     x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
     gtk_init(NULL, NULL);
     XSetErrorHandler(qt_x_errhandler);
@@ -758,14 +497,14 @@ void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget)
     if (Q_GTK_IS_WIDGET(widget)) {
         static GtkWidget* protoLayout = 0;
         if (!protoLayout) {
-            protoLayout = QGtkStylePrivate::gtk_fixed_new();
-            QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout);
+            protoLayout = gtk_fixed_new();
+            gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout);
         }
         Q_ASSERT(protoLayout);
 
         if (!widget->parent && !GTK_WIDGET_TOPLEVEL(widget))
-            QGtkStylePrivate::gtk_container_add((GtkContainer*)(protoLayout), widget);
-        QGtkStylePrivate::gtk_widget_realize(widget);
+            gtk_container_add((GtkContainer*)(protoLayout), widget);
+        gtk_widget_realize(widget);
     }
 }
 
@@ -924,10 +663,10 @@ void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *p
     if (!filter.isEmpty()) {
         QStringList filters = qt_make_filter_list(filter);
         foreach (const QString &rawfilter, filters) {
-            GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_filter_new ();
+            GtkFileFilter *gtkFilter = gtk_file_filter_new ();
             QString name = rawfilter.left(rawfilter.indexOf(QLatin1Char('(')));
             QStringList extensions = extract_filter(rawfilter);
-            QGtkStylePrivate::gtk_file_filter_set_name(gtkFilter, qPrintable(name.isEmpty() ? extensions.join(QLS(", ")) : name));
+            gtk_file_filter_set_name(gtkFilter, qPrintable(name.isEmpty() ? extensions.join(QLS(", ")) : name));
 
             foreach (const QString &fileExtension, extensions) {
                 // Note Gtk file dialogs are by default case sensitive
@@ -946,14 +685,14 @@ void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *p
                         caseInsensitive.append(ch);
                     }
                 }
-                QGtkStylePrivate::gtk_file_filter_add_pattern (gtkFilter, qPrintable(caseInsensitive));
+                gtk_file_filter_add_pattern (gtkFilter, qPrintable(caseInsensitive));
 
             }
             if (filterMap)
                 filterMap->insert(gtkFilter, rawfilter);
-            QGtkStylePrivate::gtk_file_chooser_add_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
+            gtk_file_chooser_add_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
             if (selectedFilter && (rawfilter == *selectedFilter))
-                QGtkStylePrivate::gtk_file_chooser_set_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
+                gtk_file_chooser_set_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
         }
     }
 
@@ -962,11 +701,11 @@ void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *p
     // parent
     QWidget *modalFor = parent ? parent->window() : qApp->activeWindow();
     if (modalFor) {
-        QGtkStylePrivate::gtk_widget_realize(gtkFileChooser); // Creates X window
-        XSetTransientForHint(QGtkStylePrivate::gdk_x11_drawable_get_xdisplay(gtkFileChooser->window),
-                             QGtkStylePrivate::gdk_x11_drawable_get_xid(gtkFileChooser->window),
+        gtk_widget_realize(gtkFileChooser); // Creates X window
+        XSetTransientForHint(gdk_x11_drawable_get_xdisplay(gtkFileChooser->window),
+                             gdk_x11_drawable_get_xid(gtkFileChooser->window),
                              modalFor->winId());
-        QGtkStylePrivate::gdk_x11_window_set_user_time (gtkFileChooser->window, QX11Info::appUserTime());
+        gdk_x11_window_set_user_time (gtkFileChooser->window, QX11Info::appUserTime());
 
     }
 
@@ -975,12 +714,12 @@ void QGtkStylePrivate::setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *p
         fileinfo.setFile(QDir::currentPath());
     fileinfo.makeAbsolute();
     if (fileinfo.isDir()) {
-        QGtkStylePrivate::gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
+        gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
     } else if (isSaveDialog) {
-        QGtkStylePrivate::gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.absolutePath()));
-        QGtkStylePrivate::gtk_file_chooser_set_current_name((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.fileName()));
+        gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.absolutePath()));
+        gtk_file_chooser_set_current_name((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.fileName()));
     } else {
-        QGtkStylePrivate::gtk_file_chooser_set_filename((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
+        gtk_file_chooser_set_filename((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
     }
 }
 
@@ -988,7 +727,7 @@ QString QGtkStylePrivate::openFilename(QWidget *parent, const QString &caption,
                             QString *selectedFilter, QFileDialog::Options options)
 {
     QMap<GtkFileFilter *, QString> filterMap;
-    GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
+    GtkWidget *gtkFileChooser = gtk_file_chooser_dialog_new (qPrintable(caption),
                                                              NULL,
                                                              GTK_FILE_CHOOSER_ACTION_OPEN,
                                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1003,12 +742,12 @@ QString QGtkStylePrivate::openFilename(QWidget *parent, const QString &caption,
     QApplicationPrivate::enterModal(&modal_widget);
 
     QString filename;
-    if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
-        char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
+    if (gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
+        char *gtk_filename = gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
         filename = QString::fromUtf8(gtk_filename);
         g_free (gtk_filename);
         if (selectedFilter) {
-            GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+            GtkFileFilter *gtkFilter = gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
             *selectedFilter = filterMap.value(gtkFilter);
         }
     }
@@ -1022,7 +761,7 @@ QString QGtkStylePrivate::openFilename(QWidget *parent, const QString &caption,
 QString QGtkStylePrivate::openDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
 {
     QMap<GtkFileFilter *, QString> filterMap;
-    GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
+    GtkWidget *gtkFileChooser = gtk_file_chooser_dialog_new (qPrintable(caption),
                                                              NULL,
                                                              GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
                                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1036,8 +775,8 @@ QString QGtkStylePrivate::openDirectory(QWidget *parent, const QString &caption,
     QApplicationPrivate::enterModal(&modal_widget);
 
     QString filename;
-    if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
-        char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
+    if (gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
+        char *gtk_filename = gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
         filename = QString::fromUtf8(gtk_filename);
         g_free (gtk_filename);
     }
@@ -1052,7 +791,7 @@ QStringList QGtkStylePrivate::openFilenames(QWidget *parent, const QString &capt
 {
     QStringList filenames;
     QMap<GtkFileFilter *, QString> filterMap;
-    GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
+    GtkWidget *gtkFileChooser = gtk_file_chooser_dialog_new (qPrintable(caption),
                                                              NULL,
                                                              GTK_FILE_CHOOSER_ACTION_OPEN,
                                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1068,12 +807,12 @@ QStringList QGtkStylePrivate::openFilenames(QWidget *parent, const QString &capt
     QApplicationPrivate::enterModal(&modal_widget);
 
     if (gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
-        GSList *gtk_file_names = QGtkStylePrivate::gtk_file_chooser_get_filenames((GtkFileChooser*)gtkFileChooser);
+        GSList *gtk_file_names = gtk_file_chooser_get_filenames((GtkFileChooser*)gtkFileChooser);
         for (GSList *iterator  = gtk_file_names ; iterator; iterator = iterator->next)
             filenames << QString::fromUtf8((const char*)iterator->data);
         g_slist_free(gtk_file_names);
         if (selectedFilter) {
-            GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+            GtkFileFilter *gtkFilter = gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
             *selectedFilter = filterMap.value(gtkFilter);
         }
     }
@@ -1087,7 +826,7 @@ QString QGtkStylePrivate::saveFilename(QWidget *parent, const QString &caption,
                            QString *selectedFilter, QFileDialog::Options options)
 {
     QMap<GtkFileFilter *, QString> filterMap;
-    GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
+    GtkWidget *gtkFileChooser = gtk_file_chooser_dialog_new (qPrintable(caption),
                                                              NULL,
                                                              GTK_FILE_CHOOSER_ACTION_SAVE,
                                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -1101,12 +840,12 @@ QString QGtkStylePrivate::saveFilename(QWidget *parent, const QString &caption,
     QApplicationPrivate::enterModal(&modal_widget);
 
     QString filename;
-    if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
-        char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
+    if (gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
+        char *gtk_filename = gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
         filename = QString::fromUtf8(gtk_filename);
         g_free (gtk_filename);
         if (selectedFilter) {
-            GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
+            GtkFileFilter *gtkFilter = gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
             *selectedFilter = filterMap.value(gtkFilter);
         }
     }
index 22c0d0a..27ab228 100644 (file)
@@ -72,7 +72,7 @@ typedef unsigned long XID;
 
 #undef GTK_OBJECT_FLAGS
 #define GTK_OBJECT_FLAGS(obj)(((GtkObject*)(obj))->flags)
-#define Q_GTK_IS_WIDGET(widget) widget && GTK_CHECK_TYPE ((widget), QGtkStylePrivate::gtk_widget_get_type())
+#define Q_GTK_IS_WIDGET(widget) widget && GTK_CHECK_TYPE ((widget), gtk_widget_get_type())
 
 #define QLS(x) QLatin1String(x)
 
@@ -127,140 +127,6 @@ bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &
 inline bool operator!=(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) { return !operator==(l1, l2); }
 uint qHash(const QHashableLatin1Literal &key);
 
-QT_END_NAMESPACE
-
-class GConf;
-class GConfClient;
-
-typedef GConfClient* (*Ptr_gconf_client_get_default)();
-typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, GError **);
-typedef bool (*Ptr_gconf_client_get_bool)(GConfClient*, const char*, GError **);
-
-typedef void (*Ptr_gtk_init)(int *, char ***);
-typedef GtkWidget* (*Ptr_gtk_window_new) (GtkWindowType);
-typedef GtkStyle* (*Ptr_gtk_style_attach)(GtkStyle *, GdkWindow *);
-typedef void (*Ptr_gtk_widget_destroy) (GtkWidget *);
-typedef void (*Ptr_gtk_widget_realize) (GtkWidget *);
-typedef void (*Ptr_gtk_widget_set_default_direction) (GtkTextDirection);
-typedef void (*Ptr_gtk_widget_modify_color)(GtkWidget *widget, GtkStateType state, const GdkColor *color);
-typedef GtkWidget* (*Ptr_gtk_arrow_new)(GtkArrowType, GtkShadowType);
-typedef GtkWidget* (*Ptr_gtk_menu_item_new_with_label)(const gchar *);
-typedef GtkWidget* (*Ptr_gtk_separator_menu_item_new)(void);
-typedef GtkWidget* (*Ptr_gtk_check_menu_item_new_with_label)(const gchar *);
-typedef GtkWidget* (*Ptr_gtk_menu_bar_new)(void);
-typedef GtkWidget* (*Ptr_gtk_menu_new)(void);
-typedef GtkWidget* (*Ptr_gtk_combo_box_entry_new)(void);
-typedef GtkWidget* (*Ptr_gtk_toolbar_new)(void);
-typedef GtkWidget* (*Ptr_gtk_spin_button_new)(GtkAdjustment*, double, int);
-typedef GtkWidget* (*Ptr_gtk_button_new)(void);
-typedef GtkWidget* (*Ptr_gtk_tool_button_new)(GtkWidget *, const gchar *);
-typedef GtkWidget* (*Ptr_gtk_hbutton_box_new)(void);
-typedef GtkWidget* (*Ptr_gtk_check_button_new)(void);
-typedef GtkWidget* (*Ptr_gtk_radio_button_new)(GSList *);
-typedef GtkWidget* (*Ptr_gtk_notebook_new)(void);
-typedef GtkWidget* (*Ptr_gtk_progress_bar_new)(void);
-typedef GtkWidget* (*Ptr_gtk_hscale_new)(GtkAdjustment*);
-typedef GtkWidget* (*Ptr_gtk_vscale_new)(GtkAdjustment*);
-typedef GtkWidget* (*Ptr_gtk_hscrollbar_new)(GtkAdjustment*);
-typedef GtkWidget* (*Ptr_gtk_vscrollbar_new)(GtkAdjustment*);
-typedef GtkWidget* (*Ptr_gtk_scrolled_window_new)(GtkAdjustment*, GtkAdjustment*);
-typedef gchar* (*Ptr_gtk_check_version)(guint, guint, guint);
-typedef GtkToolItem* (*Ptr_gtk_separator_tool_item_new) (void);
-typedef GtkWidget* (*Ptr_gtk_entry_new)(void);
-typedef GtkWidget* (*Ptr_gtk_tree_view_new)(void);
-typedef GtkTreeViewColumn* (*Ptr_gtk_tree_view_get_column)(GtkTreeView *, gint);
-typedef GtkWidget* (*Ptr_gtk_combo_box_new)(void);
-typedef GtkWidget* (*Ptr_gtk_frame_new)(const gchar *);
-typedef GtkWidget* (*Ptr_gtk_expander_new)(const gchar*);
-typedef GtkWidget* (*Ptr_gtk_statusbar_new)(void);
-typedef GtkSettings* (*Ptr_gtk_settings_get_default)(void);
-typedef GtkAdjustment* (*Ptr_gtk_range_get_adjustment)(GtkRange *);
-typedef void (*Ptr_gtk_range_set_adjustment)(GtkRange *, GtkAdjustment *);
-typedef void (*Ptr_gtk_progress_configure)(GtkProgress *, double, double, double);
-typedef void (*Ptr_gtk_range_set_inverted)(GtkRange*, bool);
-typedef void (*Ptr_gtk_container_add)(GtkContainer *container, GtkWidget *widget);
-typedef GtkIconSet* (*Ptr_gtk_icon_factory_lookup_default) (const gchar*);
-typedef GtkIconTheme* (*Ptr_gtk_icon_theme_get_default) (void);
-typedef void (*Ptr_gtk_widget_style_get)(GtkWidget *, const gchar *first_property_name, ...);
-typedef GtkTreeViewColumn* (*Ptr_gtk_tree_view_column_new)(void);
-typedef GtkWidget* (*Ptr_gtk_fixed_new)(void);
-typedef GdkPixbuf* (*Ptr_gtk_icon_set_render_icon)(GtkIconSet *, GtkStyle *, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget *,const char *);
-typedef void (*Ptr_gtk_tree_view_append_column) (GtkTreeView*, GtkTreeViewColumn*);
-typedef void  (*Ptr_gtk_paint_check) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_box) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_box_gap) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint , gint, GtkPositionType, gint gap_x, gint gap_width);
-typedef void  (*Ptr_gtk_paint_resize_grip) (GtkStyle*,GdkWindow*, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, GdkWindowEdge, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_focus) (GtkStyle*,GdkWindow*, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_shadow) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_slider) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint, GtkOrientation);
-typedef void  (*Ptr_gtk_paint_expander) (GtkStyle*,GdkWindow*, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , GtkExpanderStyle );
-typedef void  (*Ptr_gtk_paint_handle) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint, GtkOrientation);
-typedef void  (*Ptr_gtk_paint_arrow) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, GtkArrowType, gboolean, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_option) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void  (*Ptr_gtk_paint_flat_box) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
-typedef void (*Ptr_gtk_paint_extension) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType);
-typedef void (*Ptr_gtk_adjustment_configure) (GtkAdjustment *, double, double, double, double, double, double);
-typedef GtkObject* (*Ptr_gtk_adjustment_new) (double, double, double, double, double, double);
-typedef void   (*Ptr_gtk_paint_hline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint y);
-typedef void   (*Ptr_gtk_paint_vline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint);
-typedef void (*Ptr_gtk_menu_item_set_submenu) (GtkMenuItem *, GtkWidget *);
-typedef void (*Ptr_gtk_container_forall) (GtkContainer *, GtkCallback, gpointer);
-typedef void (*Ptr_gtk_widget_size_allocate) (GtkWidget *, GtkAllocation*);
-typedef void (*Ptr_gtk_widget_size_request) (GtkWidget *widget, GtkRequisition *requisition);
-typedef void (*Ptr_gtk_widget_set_direction) (GtkWidget *, GtkTextDirection);
-typedef void (*Ptr_gtk_widget_path) (GtkWidget *, guint *, gchar **, gchar**);
-
-typedef void (*Ptr_gtk_toolbar_insert) (GtkToolbar *toolbar, GtkToolItem *item, int pos);
-typedef void (*Ptr_gtk_menu_shell_append)(GtkMenuShell *, GtkWidget *);
-typedef GtkType (*Ptr_gtk_container_get_type) (void);
-typedef GtkType (*Ptr_gtk_window_get_type) (void);
-typedef GtkType (*Ptr_gtk_widget_get_type) (void);
-typedef GtkStyle* (*Ptr_gtk_rc_get_style_by_paths) (GtkSettings *, const char *, const char *, GType);
-typedef gint (*Ptr_pango_font_description_get_size) (const PangoFontDescription *);
-typedef PangoWeight (*Ptr_pango_font_description_get_weight) (const PangoFontDescription *);
-typedef const char* (*Ptr_pango_font_description_get_family) (const PangoFontDescription *);
-typedef PangoStyle (*Ptr_pango_font_description_get_style) (const PangoFontDescription *desc);
-typedef gboolean (*Ptr_gtk_file_chooser_set_current_folder)(GtkFileChooser *, const gchar *);
-typedef GtkFileFilter* (*Ptr_gtk_file_filter_new)(void);
-typedef void (*Ptr_gtk_file_filter_set_name)(GtkFileFilter *, const gchar *);
-typedef void (*Ptr_gtk_file_filter_add_pattern)(GtkFileFilter *filter, const gchar *pattern);
-typedef void (*Ptr_gtk_file_chooser_add_filter)(GtkFileChooser *chooser, GtkFileFilter *filter);
-typedef void (*Ptr_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, GtkFileFilter *filter);
-typedef GtkFileFilter* (*Ptr_gtk_file_chooser_get_filter)(GtkFileChooser *chooser);
-typedef gchar*  (*Ptr_gtk_file_chooser_get_filename)(GtkFileChooser *chooser);
-typedef GSList* (*Ptr_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
-typedef GtkWidget* (*Ptr_gtk_file_chooser_dialog_new)(const gchar *title,
-                                                GtkWindow *parent,
-                                                GtkFileChooserAction action,
-                                                const gchar *first_button_text,
-                                                ...);
-typedef void (*Ptr_gtk_file_chooser_set_current_name) (GtkFileChooser *, const gchar *);
-typedef gboolean (*Ptr_gtk_file_chooser_set_filename) (GtkFileChooser *chooser, const gchar *name);
-typedef gint (*Ptr_gtk_dialog_run) (GtkDialog*);
-typedef void (*Ptr_gtk_border_free)(GtkBorder *);
-
-typedef guchar* (*Ptr_gdk_pixbuf_get_pixels) (const GdkPixbuf *pixbuf);
-typedef int (*Ptr_gdk_pixbuf_get_width) (const GdkPixbuf *pixbuf);
-typedef void (*Ptr_gdk_color_free) (const GdkColor *);
-typedef int (*Ptr_gdk_pixbuf_get_height) (const GdkPixbuf *pixbuf);
-typedef GdkPixbuf* (*Ptr_gdk_pixbuf_get_from_drawable) (GdkPixbuf *dest, GdkDrawable *src,
-                                                         GdkColormap *cmap, int src_x,
-                                                         int src_y, int dest_x, int dest_y,
-                                                         int width, int height);
-typedef GdkPixmap* (*Ptr_gdk_pixmap_new) (GdkDrawable *drawable, gint width, gint height, gint depth);
-typedef GdkPixbuf* (*Ptr_gdk_pixbuf_new) (GdkColorspace colorspace, gboolean has_alpha,
-                                         int bits_per_sample, int width, int height);
-typedef void (*Ptr_gdk_draw_rectangle) (GdkDrawable *drawable, GdkGC *gc,
-                                        gboolean filled, gint x, gint y, gint width, gint height);
-typedef void (*Ptr_gdk_pixbuf_unref)(GdkPixbuf *);
-typedef void (*Ptr_gdk_drawable_unref)(GdkDrawable *);
-typedef void (*Ptr_gdk_x11_window_set_user_time) (GdkWindow *window, guint32);
-typedef XID  (*Ptr_gdk_x11_drawable_get_xid) (GdkDrawable *);
-typedef Display* (*Ptr_gdk_x11_drawable_get_xdisplay) ( GdkDrawable *);
-
-
-QT_BEGIN_NAMESPACE
-
 typedef QStringList (*_qt_filedialog_open_filenames_hook)(QWidget * parent, const QString &caption, const QString &dir,
                                                           const QString &filter, QString *selectedFilter, QFileDialog::Options options);
 typedef QString (*_qt_filedialog_open_filename_hook)     (QWidget * parent, const QString &caption, const QString &dir,
@@ -322,7 +188,6 @@ public:
     static GtkWidget* gtkWidget(const QHashableLatin1Literal &path);
     static GtkStyle* gtkStyle(const QHashableLatin1Literal &path = QHashableLatin1Literal("GtkWindow"));
 
-    virtual void resolveGtk() const;
     virtual void initGtkMenu() const;
     virtual void initGtkTreeview() const;
     virtual void initGtkWidgets() const;
@@ -355,125 +220,6 @@ public:
                                     QString *selectedFilter, QFileDialog::Options options);
     static QIcon getFilesystemIcon(const QFileInfo &);
 
-    static Ptr_gtk_container_forall gtk_container_forall;
-    static Ptr_gtk_init gtk_init;
-    static Ptr_gtk_style_attach gtk_style_attach;
-    static Ptr_gtk_window_new gtk_window_new;
-    static Ptr_gtk_widget_destroy gtk_widget_destroy;
-    static Ptr_gtk_widget_realize gtk_widget_realize;
-    static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction;
-    static Ptr_gtk_widget_modify_color gtk_widget_modify_fg;
-    static Ptr_gtk_widget_modify_color gtk_widget_modify_bg;
-    static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label;
-    static Ptr_gtk_arrow_new gtk_arrow_new;
-    static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label;
-    static Ptr_gtk_menu_bar_new gtk_menu_bar_new;
-    static Ptr_gtk_menu_new gtk_menu_new;
-    static Ptr_gtk_expander_new gtk_expander_new;
-    static Ptr_gtk_button_new gtk_button_new;
-    static Ptr_gtk_tool_button_new gtk_tool_button_new;
-    static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new;
-    static Ptr_gtk_check_button_new gtk_check_button_new;
-    static Ptr_gtk_radio_button_new gtk_radio_button_new;
-    static Ptr_gtk_spin_button_new gtk_spin_button_new;
-    static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new;
-    static Ptr_gtk_toolbar_insert gtk_toolbar_insert;
-    static Ptr_gtk_frame_new gtk_frame_new;
-    static Ptr_gtk_statusbar_new gtk_statusbar_new;
-    static Ptr_gtk_entry_new gtk_entry_new;
-    static Ptr_gtk_hscale_new gtk_hscale_new;
-    static Ptr_gtk_vscale_new gtk_vscale_new;
-    static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new;
-    static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new;
-    static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new;
-    static Ptr_gtk_notebook_new gtk_notebook_new;
-    static Ptr_gtk_toolbar_new gtk_toolbar_new;
-    static Ptr_gtk_tree_view_new gtk_tree_view_new;
-    static Ptr_gtk_tree_view_get_column gtk_tree_view_get_column;
-    static Ptr_gtk_combo_box_new gtk_combo_box_new;
-    static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new;
-    static Ptr_gtk_progress_bar_new gtk_progress_bar_new;
-    static Ptr_gtk_container_add gtk_container_add;
-    static Ptr_gtk_menu_shell_append gtk_menu_shell_append;
-    static Ptr_gtk_progress_configure gtk_progress_configure;
-    static Ptr_gtk_range_get_adjustment gtk_range_get_adjustment;
-    static Ptr_gtk_range_set_adjustment gtk_range_set_adjustment;
-    static Ptr_gtk_range_set_inverted gtk_range_set_inverted;
-    static Ptr_gtk_icon_factory_lookup_default gtk_icon_factory_lookup_default;
-    static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default;
-    static Ptr_gtk_widget_style_get gtk_widget_style_get;
-    static Ptr_gtk_icon_set_render_icon gtk_icon_set_render_icon;
-    static Ptr_gtk_fixed_new gtk_fixed_new;
-    static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new;
-    static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column;
-    static Ptr_gtk_paint_check gtk_paint_check;
-    static Ptr_gtk_paint_box gtk_paint_box;
-    static Ptr_gtk_paint_box_gap gtk_paint_box_gap;
-    static Ptr_gtk_paint_flat_box gtk_paint_flat_box;
-    static Ptr_gtk_paint_option gtk_paint_option;
-    static Ptr_gtk_paint_extension gtk_paint_extension;
-    static Ptr_gtk_paint_slider gtk_paint_slider;
-    static Ptr_gtk_paint_shadow gtk_paint_shadow;
-    static Ptr_gtk_paint_resize_grip gtk_paint_resize_grip;
-    static Ptr_gtk_paint_focus gtk_paint_focus;
-    static Ptr_gtk_paint_arrow gtk_paint_arrow;
-    static Ptr_gtk_paint_handle gtk_paint_handle;
-    static Ptr_gtk_paint_expander gtk_paint_expander;
-    static Ptr_gtk_adjustment_configure gtk_adjustment_configure;
-    static Ptr_gtk_adjustment_new gtk_adjustment_new;
-    static Ptr_gtk_paint_vline gtk_paint_vline;
-    static Ptr_gtk_paint_hline gtk_paint_hline;
-    static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu;
-    static Ptr_gtk_settings_get_default gtk_settings_get_default;
-    static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new;
-    static Ptr_gtk_widget_size_allocate gtk_widget_size_allocate;
-    static Ptr_gtk_widget_size_request gtk_widget_size_request;
-    static Ptr_gtk_widget_set_direction gtk_widget_set_direction;
-    static Ptr_gtk_widget_path gtk_widget_path;
-    static Ptr_gtk_container_get_type gtk_container_get_type;
-    static Ptr_gtk_window_get_type gtk_window_get_type;
-    static Ptr_gtk_widget_get_type gtk_widget_get_type;
-    static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths;
-    static Ptr_gtk_check_version gtk_check_version;
-    static Ptr_gtk_border_free gtk_border_free;
-
-    static Ptr_pango_font_description_get_size pango_font_description_get_size;
-    static Ptr_pango_font_description_get_weight pango_font_description_get_weight;
-    static Ptr_pango_font_description_get_family pango_font_description_get_family;
-    static Ptr_pango_font_description_get_style pango_font_description_get_style;
-
-    static Ptr_gtk_file_filter_new gtk_file_filter_new;
-    static Ptr_gtk_file_filter_set_name gtk_file_filter_set_name;
-    static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern;
-    static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter;
-    static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter;
-    static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter;
-    static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new;
-    static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder;
-    static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename;
-    static Ptr_gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames;
-    static Ptr_gtk_file_chooser_set_current_name gtk_file_chooser_set_current_name;
-    static Ptr_gtk_dialog_run gtk_dialog_run;
-    static Ptr_gtk_file_chooser_set_filename gtk_file_chooser_set_filename;
-
-    static Ptr_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels;
-    static Ptr_gdk_pixbuf_get_width gdk_pixbuf_get_width;
-    static Ptr_gdk_pixbuf_get_height gdk_pixbuf_get_height;
-    static Ptr_gdk_pixmap_new gdk_pixmap_new;
-    static Ptr_gdk_pixbuf_new gdk_pixbuf_new;
-    static Ptr_gdk_pixbuf_get_from_drawable gdk_pixbuf_get_from_drawable;
-    static Ptr_gdk_draw_rectangle gdk_draw_rectangle;
-    static Ptr_gdk_pixbuf_unref gdk_pixbuf_unref;
-    static Ptr_gdk_drawable_unref gdk_drawable_unref;
-    static Ptr_gdk_color_free gdk_color_free;
-    static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time;
-    static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid;
-    static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay;
-
-    static Ptr_gconf_client_get_default gconf_client_get_default;
-    static Ptr_gconf_client_get_string gconf_client_get_string;
-    static Ptr_gconf_client_get_bool gconf_client_get_bool;
-
     static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync;
     static Ptr_gnome_vfs_init gnome_vfs_init;
 
index 8622d6f..d202b20 100644 (file)
@@ -56,6 +56,14 @@ if(WITH_GTK2 AND GTK2_FOUND)
     )
     add_definitions(-DQT_STYLE_CLEANLOOKS ${GTK2_DEFINITIONS})
     include_directories(${GTK2_INCLUDE_DIRS})
+
+    if(WITH_GCONF2 AND GCONF2_FOUND)
+        set(EXTRA_GUI_LIBS
+            ${EXTRA_GUI_LIBS}
+            ${GCONF2_LIBRARIES}
+        )
+        include_directories(${GCONF2_INCLUDES})
+    endif()
 else()
     add_definitions(-DQT_NO_STYLE_GTK -DQT_NO_STYLE_CLEANLOOKS)
 endif()