diff -ru svtools.orig/inc/svtools/svtools.hrc svtools/inc/svtools/svtools.hrc
--- svtools/inc/svtools/svtools.hrc	2009-01-14 15:52:54.000000000 +0000
+++ svtools/inc/svtools/svtools.hrc	2009-01-14 15:53:18.000000000 +0000
@@ -73,6 +73,7 @@
 #define RID_FILEOPEN_INVALIDFOLDER		(RID_SVTOOLS_START + 34)
 #define RID_FILEOPEN_NOTEXISTENTFILE	(RID_SVTOOLS_START + 35)
 #define STR_SVT_NOREMOVABLEDEVICE       (RID_SVTOOLS_START + 36)
+#define STR_SVT_ALLFORMATS				(RID_SVTOOLS_START + 37)
 
 // doc template dialog
 #define DLG_DOCTEMPLATE					(RID_SVTOOLS_START+50)
diff -ru fpicker.orig/source/office/iodlg.src fpicker/source/office/iodlg.src
--- fpicker/source/office/iodlg.src	2009-01-14 11:56:02.000000000 +0000
+++ fpicker/source/office/iodlg.src	2009-01-14 15:59:44.000000000 +0000
@@ -317,5 +312,10 @@
     Text [ en-US ] = "No removable storage device detected.\nMake sure it is plugged in properly and try again." ;
 };
 
+String STR_SVT_ALLFORMATS
+{
+	Text [ en-US ] = "All Formats" ;
+};
+
 //******************************************************************** EOF
 
diff -ru fpicker.orig/source/unx/gnome/resourceprovider.cxx fpicker/source/unx/gnome/resourceprovider.cxx
--- fpicker/source/unx/gnome/resourceprovider.cxx	2009-01-14 11:56:02.000000000 +0000
+++ fpicker/source/unx/gnome/resourceprovider.cxx	2009-01-14 15:42:26.000000000 +0000
@@ -85,7 +85,8 @@
     { CHECKBOX_SELECTION,                       STR_SVT_FILEPICKER_SELECTION },
     { FOLDERPICKER_TITLE,                       STR_SVT_FOLDERPICKER_DEFAULT_TITLE },
     { FOLDER_PICKER_DEF_DESCRIPTION,            STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION },
-    { FILE_PICKER_OVERWRITE,                    STR_SVT_ALREADYEXISTOVERWRITE }
+    { FILE_PICKER_OVERWRITE,                    STR_SVT_ALREADYEXISTOVERWRITE },
+    { FILE_PICKER_ALLFORMATS,                   STR_SVT_ALLFORMATS }
 };
 
 _Entry OtherCtrlIdToResIdTable[] = {
diff -ru fpicker.orig/source/unx/gnome/resourceprovider.hxx fpicker/source/unx/gnome/resourceprovider.hxx
--- fpicker/source/unx/gnome/resourceprovider.hxx	2009-01-14 11:56:02.000000000 +0000
+++ fpicker/source/unx/gnome/resourceprovider.hxx	2009-01-14 15:40:34.000000000 +0000
@@ -48,6 +48,7 @@
 #define FILE_PICKER_TITLE_SAVE        503
 #define FILE_PICKER_FILE_TYPE         504
 #define FILE_PICKER_OVERWRITE         505
+#define FILE_PICKER_ALLFORMATS        506
 
 //------------------------------------------------------------------------
 // deklarations
diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.cxx fpicker/source/unx/gnome/SalGtkFilePicker.cxx
--- fpicker/source/unx/gnome/SalGtkFilePicker.cxx	2009-01-14 11:56:02.000000000 +0000
+++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx	2009-01-14 15:42:05.000000000 +0000
@@ -52,6 +52,7 @@
 
 #include <iostream>
 #include <algorithm>
+#include <set>
 #include "resourceprovider.hxx"
 #ifndef _SV_RC_H
 #include <tools/rc.hxx>
@@ -181,6 +182,7 @@
     mbPreviewState( sal_False ),
     mHID_Preview( 0 ),
 	m_pPreview( NULL ),
+    m_pPseudoFilter( NULL ),
 	m_PreviewImageWidth( 256 ),
     m_PreviewImageHeight( 256 )
 {
@@ -692,7 +694,7 @@
 		m_pFilterList = new FilterList;
 
 		// set the first filter to the current filter
-		if( ( !m_aCurrentFilter ) || ( !m_aCurrentFilter.getLength() ) )
+		if ( !m_aCurrentFilter.getLength() )
 			m_aCurrentFilter = _rInitialCurrentFilter;
 	}
 }
@@ -715,7 +717,6 @@
 
 	// append the filter
 	m_pFilterList->insert( m_pFilterList->end(), FilterEntry( aTitle, aFilter ) );
-	// implAddFilter( aTitle, aFilter );
 }
 
 //-----------------------------------------------------------------------------------------
@@ -782,7 +783,10 @@
     }
     else if( GtkFileFilter *filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_pDialog)))
     {
-        updateCurrentFilterFromName(gtk_file_filter_get_name( filter ));
+		if (m_pPseudoFilter != filter)
+        	updateCurrentFilterFromName(gtk_file_filter_get_name( filter ));
+		else
+        	updateCurrentFilterFromName(OUStringToOString( m_aInitialFilter, RTL_TEXTENCODING_UTF8 ).getStr());
     }
 }
 
@@ -950,9 +954,15 @@
                     }
                 }
 
-			    const gchar* filtername = 
-				    gtk_file_filter_get_name( gtk_file_chooser_get_filter( GTK_FILE_CHOOSER( m_pDialog ) ) );
-                sFilterName = OUString( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
+				GtkFileFilter *filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_pDialog));
+        		if (m_pPseudoFilter != filter)
+				{
+			    	const gchar* filtername = 
+				    	gtk_file_filter_get_name( filter );
+                	sFilterName = OUString( filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8 );
+				}
+				else
+					sFilterName = m_aInitialFilter;
             }
 
 			OSL_TRACE( "2: current filter is %s\n", 
@@ -1917,7 +1927,7 @@
 }
 }
 
-int SalGtkFilePicker::implAddFilter( const OUString& rFilter, const OUString& rType )
+GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const OUString& rType )
 {
     GdkThreadLock aLock;
 
@@ -1968,7 +1978,6 @@
 
 	gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( m_pDialog ), filter );
 
-    int nAdded = 0;
     if (!bAllGlob)
     {
         GtkTreeIter iter;
@@ -1979,30 +1988,67 @@
             2, aFilterName.getStr(),
             3, OUStringToOString(rType, RTL_TEXTENCODING_UTF8).getStr(),
             -1);
-        nAdded = 1;
     }
-    return nAdded;
+    return filter;
 }
 
-int SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const Sequence< StringPair >& _rFilters )
+void SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const Sequence< StringPair >& _rFilters )
 {
 	// Gtk+ has no filter group concept I think so ...
 	// implAddFilter( _rFilter, String() );
-    int nAdded = 0;
 	const StringPair* pSubFilters	= _rFilters.getConstArray();
 	const StringPair* pSubFiltersEnd = pSubFilters + _rFilters.getLength();
 	for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
-		nAdded += implAddFilter( pSubFilters->First, pSubFilters->Second );
-    return nAdded;
+		implAddFilter( pSubFilters->First, pSubFilters->Second );
 }
 
 void SalGtkFilePicker::SetFilters()
 {
-	OSL_TRACE( "start setting filters\n");
-
     GdkThreadLock aLock;
 
-    int nAdded = 0;
+	if (!m_aInitialFilter.getLength())
+		m_aInitialFilter = m_aCurrentFilter;
+
+	rtl::OUString sPseudoFilter;
+    if( GTK_FILE_CHOOSER_ACTION_SAVE == gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) ) )
+    {
+		std::set<OUString> aAllFormats;
+		if( m_pFilterList && !m_pFilterList->empty() )
+		{
+			for	(	FilterList::iterator aListIter = m_pFilterList->begin();
+					aListIter != m_pFilterList->end();
+					++aListIter
+				)
+			{
+				if( aListIter->hasSubFilters() )
+				{	// it's a filter group
+					UnoFilterList aSubFilters;
+					aListIter->getSubFilters( aSubFilters );
+					const StringPair* pSubFilters   = aSubFilters.getConstArray();
+					const StringPair* pSubFiltersEnd = pSubFilters + aSubFilters.getLength();
+					for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
+						aAllFormats.insert(pSubFilters->Second);
+				}
+				else
+					aAllFormats.insert(aListIter->getFilter());
+			}
+		}
+		if (aAllFormats.size() > 1)
+		{
+			rtl::OUString sAllFilter;
+			std::set<OUString>::const_iterator aEnd = aAllFormats.end();
+			for (std::set<OUString>::const_iterator aIter = aAllFormats.begin(); aIter != aEnd; ++aIter)
+			{
+				if (sAllFilter.getLength())
+					sAllFilter += OUString(sal_Unicode(';'));
+				sAllFilter += *aIter;
+			}
+			CResourceProvider aResProvider;
+			sPseudoFilter = aResProvider.getResString(FILE_PICKER_ALLFORMATS);
+			m_pPseudoFilter = implAddFilter( sPseudoFilter, sAllFilter );
+		}
+    }
+
 	if( m_pFilterList && !m_pFilterList->empty() )
 	{
 		for	(	FilterList::iterator aListIter = m_pFilterList->begin();
@@ -2016,30 +2062,27 @@
 				UnoFilterList aSubFilters;
 				aListIter->getSubFilters( aSubFilters );
 
-				nAdded += implAddFilterGroup( aListIter->getTitle(), aSubFilters );
+				implAddFilterGroup( aListIter->getTitle(), aSubFilters );
 			}
 			else
 			{
 				// it's a single filter
 
-				nAdded += implAddFilter( aListIter->getTitle(), aListIter->getFilter() );
+				implAddFilter( aListIter->getTitle(), aListIter->getFilter() );
 			}
 		}
 	}
 
-    if (nAdded)
+    if (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(m_pFilterStore), NULL)) //If m_pFilterStore is not empty
         gtk_widget_show( m_pFilterExpander );
     else
         gtk_widget_hide( m_pFilterExpander );
 
 	// set the default filter
-	if( m_aCurrentFilter && (m_aCurrentFilter.getLength() > 0) )
-	{
-		OSL_TRACE( "Setting current filter to %s\n", 
-			OUStringToOString( m_aCurrentFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
-
+	if (sPseudoFilter.getLength())
+		SetCurFilter( sPseudoFilter );
+	else if(m_aCurrentFilter.getLength())
 		SetCurFilter( m_aCurrentFilter );
-	}
 
 	OSL_TRACE( "end setting filters\n");
 }
diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.hxx fpicker/source/unx/gnome/SalGtkFilePicker.hxx
--- fpicker/source/unx/gnome/SalGtkFilePicker.hxx	2009-01-14 11:56:02.000000000 +0000
+++ fpicker/source/unx/gnome/SalGtkFilePicker.hxx	2009-01-14 15:34:41.000000000 +0000
@@ -317,11 +317,13 @@
         gulong mnHID_SelectionChange;
 
 		::rtl::OUString	m_aCurrentFilter;
+		::rtl::OUString	m_aInitialFilter;
 
         bool bVersionWidthUnset;
         sal_Bool mbPreviewState;
         gulong mHID_Preview;
         GtkWidget* m_pPreview;
+		GtkFileFilter* m_pPseudoFilter;
         sal_Int32 m_PreviewImageWidth;
         sal_Int32 m_PreviewImageHeight;
         
@@ -332,8 +334,8 @@
         void UpdateFilterfromUI();
 
         void implChangeType( GtkTreeSelection *selection );
-		int implAddFilter( const OUString& rFilter, const OUString& rType);
-		int implAddFilterGroup( const OUString& rFilter, 
+		GtkFileFilter * implAddFilter( const OUString& rFilter, const OUString& rType );
+		void implAddFilterGroup( const OUString& rFilter, 
 					 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair>& _rFilters );
         void updateCurrentFilterFromName(const gchar* filtername);
         void unselect_type();
--- vcl.orig/unx/gtk/window/gtkframe.cxx	2010-05-29 11:29:16.000000000 +0100
+++ vcl/unx/gtk/window/gtkframe.cxx	2010-05-29 12:02:19.000000000 +0100
@@ -79,6 +79,14 @@
 #define GDK_META_MASK       (1 << 28)
 #endif
 
+#if GTK_CHECK_VERSION(2,90,0)
+#define IS_WIDGET_REALIZED gtk_widget_get_realized
+#define IS_WIDGET_MAPPED   gtk_widget_get_mapped
+#else
+#define IS_WIDGET_REALIZED GTK_WIDGET_REALIZED
+#define IS_WIDGET_MAPPED   GTK_WIDGET_MAPPED
+#endif
+
 using namespace com::sun::star;
 
 int GtkSalFrame::m_nFloats = 0;
@@ -428,12 +436,12 @@
 	getDisplay()->deregisterFrame( this );
     
     if( m_pRegion )
-        gdk_region_destroy( m_pRegion );
+        gdk_region_destroy( m_pRegion );
 
     if( m_hBackgroundPixmap )
     {
         XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
-                                    GDK_WINDOW_XWINDOW(m_pWindow->window),
+                                    GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                                     None );
         XFreePixmap( getDisplay()->GetDisplay(), m_hBackgroundPixmap );
     }
@@ -592,7 +600,7 @@
     SalDisplay* pDisp = GetX11SalData()->GetDisplay();
     m_aSystemData.nSize 		= sizeof( SystemChildData );
     m_aSystemData.pDisplay		= pDisp->GetDisplay();
-    m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pWindow->window);
+    m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow));
     m_aSystemData.pSalFrame		= this;
     m_aSystemData.pWidget		= m_pWindow;
     m_aSystemData.pVisual		= pDisp->GetVisual( m_nScreen ).GetVisual();
@@ -644,7 +652,7 @@
     *  some paint issues
     */
     XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
-                                GDK_WINDOW_XWINDOW(m_pWindow->window),
+                                GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                                 m_hBackgroundPixmap );
 }
 
@@ -678,7 +686,7 @@
     else if( ! bBeforeRealize )
     {
         Display* pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
-        XLIB_Window aWindow = GDK_WINDOW_XWINDOW( GTK_WIDGET(pWindow)->window );
+        XLIB_Window aWindow = GDK_WINDOW_XWINDOW( widget_get_window(GTK_WIDGET(pWindow)) );
         XWMHints* pHints = XGetWMHints( pDisplay, aWindow );
         if( ! pHints )
         {
@@ -863,7 +871,7 @@
             nUserTime= getDisplay()->GetLastUserEventTime( true );
             // nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
         }
-        lcl_set_user_time(GTK_WIDGET(m_pWindow)->window, nUserTime);
+        lcl_set_user_time(widget_get_window(GTK_WIDGET(m_pWindow)), nUserTime);
     }
 
     if( bDecoHandling )
@@ -917,7 +925,8 @@
     {
         m_pWindow = gtk_plug_new( pSysData->aWindow );
         m_bWindowIsGtkPlug  = true;
-        GTK_WIDGET_SET_FLAGS( m_pWindow, GTK_CAN_FOCUS | GTK_SENSITIVE | GTK_CAN_DEFAULT );
+        widget_set_can_default( m_pWindow, true );
+        widget_set_can_focus( m_pWindow, true );
         gtk_widget_set_sensitive( m_pWindow, true );
     }
     else
@@ -942,7 +951,7 @@
     if( ! m_bWindowIsGtkPlug )
     {
         XReparentWindow( getDisplay()->GetDisplay(),
-                         GDK_WINDOW_XWINDOW(m_pWindow->window),
+                         GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                          (XLIB_Window)pSysData->aWindow,
                          0, 0 );
     }
@@ -976,14 +985,14 @@
     if( nStyle != m_nExtStyle && ! isChild() )
     {
         m_nExtStyle = nStyle;
-        if( GTK_WIDGET_REALIZED( m_pWindow ) )
+        if( IS_WIDGET_REALIZED( m_pWindow ) )
         {
             XClassHint* pClass = XAllocClassHint();
             rtl::OString aResHint = X11SalData::getFrameResName( m_nExtStyle );
             pClass->res_name  = const_cast<char*>(aResHint.getStr());
             pClass->res_class = const_cast<char*>(X11SalData::getFrameClassName());
             XSetClassHint( getDisplay()->GetDisplay(),
-                           GDK_WINDOW_XWINDOW(m_pWindow->window),
+                           GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                            pClass );
             XFree( pClass );
         }
@@ -1007,7 +1016,7 @@
                 if( ! m_aGraphics[i].pGraphics )
                 {
                     m_aGraphics[i].pGraphics = new GtkSalGraphics( m_pWindow );
-                    m_aGraphics[i].pGraphics->Init( this, GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
+                    m_aGraphics[i].pGraphics->Init( this, GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
                 }
                 return m_aGraphics[i].pGraphics;
             }
@@ -1308,7 +1317,7 @@
             setMinMaxSize();
             
             // #i45160# switch to desktop where a dialog with parent will appear
-            if( m_pParent && m_pParent->m_nWorkArea != m_nWorkArea && GTK_WIDGET_MAPPED(m_pParent->m_pWindow) )
+            if( m_pParent && m_pParent->m_nWorkArea != m_nWorkArea && IS_WIDGET_MAPPED(m_pParent->m_pWindow) )
                 getDisplay()->getWMAdaptor()->switchToWorkArea( m_pParent->m_nWorkArea );
             
             if( isFloatGrabWindow() &&
@@ -1363,7 +1372,7 @@
                 nUserTime= getDisplay()->GetLastUserEventTime( true );
                 //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
             }
-            lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime );
+            lcl_set_user_time( widget_get_window(GTK_WIDGET(m_pWindow)), nUserTime );
             
             if( bHack && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
                 m_bSetFocusOnMap = true;
@@ -1472,7 +1481,7 @@
     {
         m_aMaxSize = Size( nWidth, nHeight );
         // Show does a setMinMaxSize
-        if( GTK_WIDGET_MAPPED( m_pWindow ) )
+        if( IS_WIDGET_MAPPED( m_pWindow ) )
             setMinMaxSize();
     }
 }
@@ -1485,7 +1494,7 @@
         {
             gtk_widget_set_size_request( m_pWindow, nWidth, nHeight );
             // Show does a setMinMaxSize
-            if( GTK_WIDGET_MAPPED( m_pWindow ) )
+            if( IS_WIDGET_MAPPED( m_pWindow ) )
                 setMinMaxSize();
         }
     }
@@ -1737,7 +1746,7 @@
         gtk_widget_realize( m_pWindow );
         // update system data
         GtkSalDisplay* pDisp = getDisplay();
-        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pWindow->window);
+        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow));
         m_aSystemData.pVisual		= pDisp->GetVisual( m_nScreen ).GetVisual();
         m_aSystemData.nScreen		= nScreen;
         m_aSystemData.nDepth		= pDisp->GetVisual( m_nScreen ).GetDepth();
@@ -1748,7 +1757,7 @@
         for( unsigned int i = 0; i < sizeof(m_aGraphics)/sizeof(m_aGraphics[0]); i++ )
         {
             if( m_aGraphics[i].bInUse )
-                m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
+                m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
         }
         updateScreenNumber();
     }
@@ -1777,7 +1786,7 @@
             
             Rectangle aOldScreenRect( pDisp->GetXineramaScreens()[maGeometry.nScreenNumber] );
             Rectangle aNewScreenRect( pDisp->GetXineramaScreens()[nNewScreen] );
-            bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
+            bool bVisible = IS_WIDGET_MAPPED(m_pWindow);
             if( bVisible )
                 Show( FALSE );
             maGeometry.nX = aNewScreenRect.Left() + (maGeometry.nX - aOldScreenRect.Left());
@@ -1809,7 +1818,7 @@
             {
                 m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ),
                                                Size( maGeometry.nWidth, maGeometry.nHeight ) );
-                bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
+                bool bVisible = IS_WIDGET_MAPPED(m_pWindow);
                 if( bVisible )
                     Show( FALSE );
                 m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
@@ -1838,7 +1847,7 @@
             }
             else
             {
-                bool bVisible = GTK_WIDGET_MAPPED(m_pWindow);
+                bool bVisible = IS_WIDGET_MAPPED(m_pWindow);
                 if( ! getDisplay()->getWMAdaptor()->isLegacyPartialFullscreen() )
                     gtk_window_unfullscreen( GTK_WINDOW(m_pWindow) );
                 if( bVisible )
@@ -2052,7 +2061,7 @@
 		}
 #ifdef ENABLE_DBUS
 		m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation", 
-                    GDK_WINDOW_XID(m_pWindow->window));
+                    GDK_WINDOW_XID(widget_get_window(m_pWindow)));
 #endif
 	}
 	else
@@ -2078,7 +2087,7 @@
     {
         if( isChild( false, true ) )
             gtk_widget_grab_focus( m_pWindow );
-        else if( GTK_WIDGET_MAPPED( m_pWindow ) )
+        else if( IS_WIDGET_MAPPED( m_pWindow ) )
         {
             if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) )
                 gtk_window_present( GTK_WINDOW(m_pWindow) );
@@ -2087,7 +2096,7 @@
                 // gdk_window_focus( m_pWindow->window, gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window) );
                 /* #i99360# ugly workaround an X11 library bug */
                 guint32 nUserTime= getDisplay()->GetLastUserEventTime( true );
-                gdk_window_focus( m_pWindow->window, nUserTime );
+                gdk_window_focus( widget_get_window(m_pWindow), nUserTime );
             }
             /*  need to do an XSetInputFocus here because
              *  gdk_window_focus will ask a EWMH compliant WM to put the focus
@@ -2099,7 +2108,7 @@
                 // sad but true: this can cause an XError, we need to catch that
                 // to do this we need to synchronize with the XServer
                 getDisplay()->GetXLib()->PushXErrorLevel( true );
-                XSetInputFocus( getDisplay()->GetDisplay(), GDK_WINDOW_XWINDOW( m_pWindow->window ), RevertToParent, CurrentTime );
+                XSetInputFocus( getDisplay()->GetDisplay(), GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow) ), RevertToParent, CurrentTime );
                 XSync( getDisplay()->GetDisplay(), False );
                 getDisplay()->GetXLib()->PopXErrorLevel();
             }
@@ -2118,7 +2127,7 @@
     {
         m_ePointerStyle = ePointerStyle;
         GdkCursor *pCursor = getDisplay()->getCursor( ePointerStyle );
-        gdk_window_set_cursor( m_pWindow->window, pCursor );
+        gdk_window_set_cursor( widget_get_window(m_pWindow), pCursor );
         m_pCurrentCursor = pCursor;
         
         // #i80791# use grabPointer the same way as CaptureMouse, respective float grab
@@ -2153,7 +2162,7 @@
             {
                 const int nMask = ( GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
     
-                gdk_pointer_grab( m_pWindow->window, bOwnerEvents,
+                gdk_pointer_grab( widget_get_window(m_pWindow), bOwnerEvents,
                                   (GdkEventMask) nMask, NULL, m_pCurrentCursor,
                                   GDK_CURRENT_TIME );
             }
@@ -2166,7 +2175,7 @@
                 // this is of course a bad hack, especially as we cannot
                 // set the right cursor this way
                 XGrabPointer( getDisplay()->GetDisplay(),
-                              GDK_WINDOW_XWINDOW( m_pWindow->window),
+                              GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow)),
                               bOwnerEvents,
                               PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
                               GrabModeAsync,
@@ -2214,7 +2223,7 @@
     // #i38648# ask for the next motion hint
     gint x, y;
     GdkModifierType mask;
-    gdk_window_get_pointer( pFrame->m_pWindow->window, &x, &y, &mask );
+    gdk_window_get_pointer( widget_get_window(pFrame->m_pWindow) , &x, &y, &mask );
 }
 
 void GtkSalFrame::Flush()
@@ -2300,7 +2309,7 @@
 		return NULL;
 
 	X11SalBitmap *pBmp = new X11SalBitmap;
-	GdkWindow *pWin = m_pWindow->window;
+	GdkWindow *pWin = widget_get_window(m_pWindow);
 	if( pBmp->SnapShot( GDK_DISPLAY_XDISPLAY( getGdkDisplay() ),
 						GDK_WINDOW_XID( pWin ) ) )
 		return pBmp;
@@ -2362,7 +2371,7 @@
 
 void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nScreen )
 {
-    bool bWasVisible = GTK_WIDGET_MAPPED(m_pWindow);
+    bool bWasVisible = IS_WIDGET_MAPPED(m_pWindow);
     if( bWasVisible )
         Show( FALSE );
     
@@ -2407,7 +2416,7 @@
         m_pIMHandler = NULL;
     }
     if( m_pRegion )
-        gdk_region_destroy( m_pRegion );
+        gdk_region_destroy( m_pRegion );
     if( m_pFixedContainer )
         gtk_widget_destroy( GTK_WIDGET(m_pFixedContainer) );
     if( m_pWindow )
@@ -2435,7 +2444,7 @@
     {
         if( m_aGraphics[i].bInUse )
         {
-            m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(m_pWindow->window), m_nScreen );
+            m_aGraphics[i].pGraphics->SetDrawable( GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)), m_nScreen );
             m_aGraphics[i].pGraphics->SetWindow( m_pWindow );
         }
     }
@@ -2465,14 +2474,14 @@
 void GtkSalFrame::ResetClipRegion()
 {
     if( m_pWindow )
-        gdk_window_shape_combine_region( m_pWindow->window, NULL, 0, 0 );
+        gdk_window_shape_combine_region( widget_get_window(m_pWindow), NULL, 0, 0 );
 }
 
 void GtkSalFrame::BeginSetClipRegion( ULONG )
 {
     if( m_pRegion )
-        gdk_region_destroy( m_pRegion );
-    m_pRegion = gdk_region_new();
+        gdk_region_destroy( m_pRegion );
+    m_pRegion = gdk_region_new();
 }
 
 void GtkSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
@@ -2485,14 +2494,14 @@
         aRect.width		= nWidth;
         aRect.height	= nHeight;
         
-        gdk_region_union_with_rect( m_pRegion, &aRect );
+        gdk_region_union_with_rect( m_pRegion, &aRect );
     }
 }
 
 void GtkSalFrame::EndSetClipRegion()
 {
     if( m_pWindow && m_pRegion )
-        gdk_window_shape_combine_region( m_pWindow->window, m_pRegion, 0, 0 );
+        gdk_window_shape_combine_region( widget_get_window(m_pWindow), m_pRegion, 0, 0 );
 }
 
 bool GtkSalFrame::Dispatch( const XEvent* pEvent )
@@ -2506,7 +2515,7 @@
         if( pEvent->xproperty.atom == nDesktopAtom &&
             pEvent->xproperty.state == PropertyNewValue )
         {
-            m_nWorkArea = pAdaptor->getWindowWorkArea( GDK_WINDOW_XWINDOW( m_pWindow->window) );
+            m_nWorkArea = pAdaptor->getWindowWorkArea( GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow)) );
         }
     }
     else if( pEvent->type == ConfigureNotify )
@@ -2533,7 +2542,7 @@
             int x = 0, y = 0;
             XLIB_Window aChild;
             XTranslateCoordinates( getDisplay()->GetDisplay(),
-                                   GDK_WINDOW_XWINDOW( m_pWindow->window),
+                                   GDK_WINDOW_XWINDOW( widget_get_window(m_pWindow) ),
                                    getDisplay()->GetRootWindow( getDisplay()->GetDefaultScreenNumber() ),
                                    0, 0,
                                    &x, &y,
@@ -2548,7 +2557,7 @@
     }
     else if( pEvent->type == ClientMessage &&
              pEvent->xclient.message_type == getDisplay()->getWMAdaptor()->getAtom( vcl_sal::WMAdaptor::XEMBED ) &&
-             pEvent->xclient.window == GDK_WINDOW_XWINDOW(m_pWindow->window) &&
+             pEvent->xclient.window == GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)) &&
              m_bWindowIsGtkPlug
              )
     {
@@ -2560,7 +2569,7 @@
         {
             GdkEventFocus aEvent;
             aEvent.type = GDK_FOCUS_CHANGE;
-            aEvent.window = m_pWindow->window;
+            aEvent.window = widget_get_window(m_pWindow);
             aEvent.send_event = TRUE;
             aEvent.in = (pEvent->xclient.data.l[1] == 1);
             signalFocus( m_pWindow, &aEvent, this );
@@ -2575,7 +2584,7 @@
     if( m_hBackgroundPixmap )
     {
         XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
-                                    GDK_WINDOW_XWINDOW(m_pWindow->window),
+                                    GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                                     None );
         XFreePixmap( getDisplay()->GetDisplay(), m_hBackgroundPixmap );
         m_hBackgroundPixmap = None;
@@ -2588,7 +2597,7 @@
         {
             m_hBackgroundPixmap =
                 XCreatePixmap( getDisplay()->GetDisplay(),
-                               GDK_WINDOW_XWINDOW(m_pWindow->window),
+                               GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                                aSize.Width(),
                                aSize.Height(),
                                getDisplay()->GetVisual(m_nScreen).GetDepth() );
@@ -2604,7 +2613,7 @@
                                aTwoRect,
                                getDisplay()->GetCopyGC(m_nScreen) );
                 XSetWindowBackgroundPixmap( getDisplay()->GetDisplay(),
-                                            GDK_WINDOW_XWINDOW(m_pWindow->window),
+                                            GDK_WINDOW_XWINDOW(widget_get_window(m_pWindow)),
                                             m_hBackgroundPixmap );
             }
         }
@@ -2777,7 +2786,7 @@
 			// ask for the next hint
 			gint x, y;
 			GdkModifierType mask;
-			gdk_window_get_pointer( GTK_WIDGET(pThis->m_pWindow)->window, &x, &y, &mask );
+			gdk_window_get_pointer( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &x, &y, &mask );
 		}
 	}
 
@@ -2872,7 +2881,7 @@
     if( bSetFocus )
     {
         XSetInputFocus( pThis->getDisplay()->GetDisplay(),
-                        GDK_WINDOW_XWINDOW( GTK_WIDGET(pThis->m_pWindow)->window),
+                        GDK_WINDOW_XWINDOW( widget_get_window(GTK_WIDGET(pThis->m_pWindow))),
                         RevertToParent, CurrentTime );
     }
     
@@ -2920,7 +2929,7 @@
      */
     XLIB_Window aChild;
     XTranslateCoordinates( pThis->getDisplay()->GetDisplay(),
-                           GDK_WINDOW_XWINDOW(GTK_WIDGET(pThis->m_pWindow)->window),
+                           GDK_WINDOW_XWINDOW(widget_get_window(GTK_WIDGET(pThis->m_pWindow))),
                            pThis->getDisplay()->GetRootWindow( pThis->getDisplay()->GetDefaultScreenNumber() ),
                            0, 0,
                            &x, &y,
@@ -2954,7 +2963,7 @@
     if( ! (pThis->m_nStyle & SAL_FRAME_STYLE_PLUG) )
     {
         GdkRectangle aRect;
-        gdk_window_get_frame_extents( GTK_WIDGET(pThis->m_pWindow)->window, &aRect );
+        gdk_window_get_frame_extents( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &aRect );
         pThis->maGeometry.nTopDecoration	= y - aRect.y;
         pThis->maGeometry.nBottomDecoration	= aRect.y + aRect.height - y - pEvent->height;
         pThis->maGeometry.nLeftDecoration	= x - aRect.x;
@@ -3165,7 +3174,7 @@
     *  some time on the Xserver as well as prevent
     *  some paint issues
     */
-    GdkWindow* pWin = GTK_WIDGET(pThis->getWindow())->window;
+    GdkWindow* pWin = widget_get_window(GTK_WIDGET(pThis->getWindow()));
     if( pWin )
     {
         XLIB_Window aWin = GDK_WINDOW_XWINDOW(pWin);
@@ -3269,7 +3278,7 @@
                           G_CALLBACK (signalIMPreeditEnd), this );
 
         m_pFrame->getDisplay()->GetXLib()->PushXErrorLevel( true );
-        gtk_im_context_set_client_window( m_pIMContext, GTK_WIDGET(m_pFrame->m_pWindow)->window );
+        gtk_im_context_set_client_window( m_pIMContext, widget_get_window(GTK_WIDGET(m_pFrame->m_pWindow)) );
 		gtk_im_context_focus_in( m_pIMContext );
         m_pFrame->getDisplay()->GetXLib()->PopXErrorLevel();
         m_bFocused = true;
--- fpicker.orig/source/unx/gnome/SalGtkFilePicker.cxx	2010-05-29 21:22:49.000000000 +0100
+++ fpicker/source/unx/gnome/SalGtkFilePicker.cxx	2010-05-29 21:26:05.000000000 +0100
@@ -602,7 +602,11 @@
     g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
 
     GList *pChildren = 
+#if GTK_CHECK_VERSION(2,90,0)
+        gtk_container_get_children( GTK_CONTAINER( gtk_dialog_get_action_area(pDialog) ) );
+#else
         gtk_container_get_children( GTK_CONTAINER( pDialog->action_area ) );
+#endif
 
     for( GList *p = pChildren; p; p = p->next )
         gtk_widget_destroy( GTK_WIDGET( p->data ) );
@@ -1600,7 +1604,7 @@
     
 		gtk_image_set_from_pixbuf( GTK_IMAGE( preview ), pixbuf );
 		if( pixbuf )
-			gdk_pixbuf_unref( pixbuf );
+			g_object_unref( pixbuf );
 
 	}
 
--- libegg.orig/source/eggtrayicon.c	2010-05-29 21:27:29.000000000 +0100
+++ libegg/source/eggtrayicon.c	2010-05-30 12:53:27.000000000 +0100
@@ -230,6 +230,7 @@
 {
   EggTrayIcon *icon = user_data;
   XEvent *xev = (XEvent *)xevent;
+  (void)event;
 
   if (xev->xany.type == ClientMessage &&
       xev->xclient.message_type == icon->manager_atom &&
@@ -280,6 +281,36 @@
 #endif
 }
 
+static gboolean
+gtk_widget_is_has_window(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_get_has_window(widget);
+#else
+    return GTK_WIDGET_NO_WINDOW(widget);
+#endif
+}
+
+static gboolean
+gtk_widget_is_app_paintable(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_get_app_paintable(widget);
+#else
+    return GTK_WIDGET_APP_PAINTABLE(widget);
+#endif
+}
+
+static GdkWindow *
+gtk_widget_window(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_get_window(widget);
+#else
+    return widget->window;
+#endif
+}
+
 #ifdef GDK_WINDOWING_X11
 
 static void
@@ -297,7 +328,7 @@
   ev.window = window;
   ev.message_type = icon->system_tray_opcode_atom;
   ev.format = 32;
-  ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
+  ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_window(GTK_WIDGET(icon)));
   ev.data.l[1] = message;
   ev.data.l[2] = data1;
   ev.data.l[3] = data2;
@@ -322,6 +353,16 @@
 				      0, 0);
 }
 
+static gboolean
+gtk_widget_is_realized(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_get_realized(widget);
+#else
+    return GTK_WIDGET_REALIZED(widget);
+#endif
+}
+
 static void
 egg_tray_icon_update_manager_window (EggTrayIcon *icon,
 				     gboolean     dock_if_realized)
@@ -354,7 +395,7 @@
       
       gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
 
-      if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
+      if (dock_if_realized && gtk_widget_is_realized (GTK_WIDGET (icon)))
 	egg_tray_icon_send_dock_request (icon);
 
       egg_tray_icon_get_orientation_property (icon);
@@ -383,7 +424,8 @@
 static gboolean
 transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 {
-  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+  (void)user_data;
+  gdk_window_clear_area (gtk_widget_window(widget), event->area.x, event->area.y,
 			 event->area.width, event->area.height);
   return FALSE;
 }
@@ -392,18 +434,21 @@
 make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
 			gpointer user_data)
 {
-  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+  (void)previous_style;
+  (void)user_data;
+  gdk_window_set_back_pixmap (gtk_widget_window(widget), NULL, TRUE);
 }
 
 static void
 make_transparent (GtkWidget *widget, gpointer user_data)
 {
-  if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+  if (gtk_widget_is_has_window (widget) || gtk_widget_is_app_paintable (widget))
     return;
 
+  (void)user_data;
   gtk_widget_set_app_paintable (widget, TRUE);
   gtk_widget_set_double_buffered (widget, FALSE);
-  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+  gdk_window_set_back_pixmap (gtk_widget_window(widget), NULL, TRUE);
   g_signal_connect (widget, "expose_event",
 		    G_CALLBACK (transparent_expose_event), NULL);
   g_signal_connect_after (widget, "style_set",
--- libegg.orig/source/eggtrayicon-impl.h	2010-05-29 21:27:29.000000000 +0100
+++ libegg/source/eggtrayicon-impl.h	2010-05-30 12:46:49.000000000 +0100
@@ -21,7 +21,7 @@
 #ifndef __EGG_TRAY_ICON_IMPL_H__
 #define __EGG_TRAY_ICON_IMPL_H__
 
-#include <gtk/gtkplug.h>
+#include <gtk/gtk.h>
 #ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
 #endif
--- sfx2.orig/source/appl/shutdowniconunx.cxx	2010-05-29 21:22:29.000000000 +0100
+++ sfx2/source/appl/shutdowniconunx.cxx	2010-05-30 12:59:35.000000000 +0100
@@ -302,18 +302,34 @@
 			 gpointer )
 {
 	GtkRequisition req;
-	GtkWidget *ebox = GTK_BIN( pTrayIcon )->child;
+	GtkWidget *ebox = gtk_bin_get_child(GTK_BIN( pTrayIcon ));
 
 	gtk_widget_size_request( GTK_WIDGET( menu ), &req );
+#if GTK_CHECK_VERSION(2,90,0)
+	gdk_window_get_origin( gtk_widget_get_window(ebox), x, y );
+
+	GtkAllocation allocation;
+	gtk_widget_get_allocation(ebox, &allocation);
+
+	(*x) += allocation.x;
+	(*y) += allocation.y;
+#else
 	gdk_window_get_origin( ebox->window, x, y );
 
 	(*x) += ebox->allocation.x;
 	(*y) += ebox->allocation.y;
+#endif
 
 	if (*y >= gdk_screen_get_height (gtk_widget_get_screen (ebox)) / 2)
 		(*y) -= req.height;
 	else
+	{
+#if GTK_CHECK_VERSION(2,90,0)
+		(*y) += allocation.height;
+#else
 		(*y) += ebox->allocation.height;
+#endif
+	}
 
 	*push_in = TRUE;
 }
@@ -372,8 +388,12 @@
 	pTrayIcon = egg_tray_icon_new( aLabel );
 
 	GtkWidget *pParent = gtk_event_box_new();
+#if GTK_CHECK_VERSION(2,90,0)
+	gtk_widget_set_tooltip_text (pParent, aLabel );
+#else
 	GtkTooltips *pTooltips = gtk_tooltips_new();
 	gtk_tooltips_set_tip( GTK_TOOLTIPS( pTooltips ), pParent, aLabel, NULL );
+#endif
 
 	GtkWidget *pIconImage = gtk_image_new();
 	gtk_container_add( GTK_CONTAINER( pParent ), pIconImage );
--- vcl.orig/unx/gtk/app/gtkdata.cxx	2010-06-14 19:51:39.500810695 +0100
+++ vcl/unx/gtk/app/gtkdata.cxx	2010-06-15 10:07:16.669799057 +0100
@@ -217,11 +217,12 @@
             {
                 gint nMonitors = gdk_screen_get_n_monitors(pScreen);
                 m_aXineramaScreens = std::vector<Rectangle>();
+                m_aXineramaScreenIndexMap = std::vector<int>(nMonitors);
                 for (gint i = 0; i < nMonitors; ++i)
                 {
                     GdkRectangle dest;
                     gdk_screen_get_monitor_geometry(pScreen, i, &dest);
-                    addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
+                    addXineramaScreenUnique( i, dest.x, dest.y, dest.width, dest.height );
                 }
                 m_bXinerama = m_aXineramaScreens.size() > 1;
                 if( ! m_aFrames.empty() )
@@ -235,6 +236,35 @@
     }
 }
 
+extern "C"
+{
+    typedef gint(* screen_get_primary_monitor)(GdkScreen *screen);
+}
+
+int GtkSalDisplay::GetDefaultMonitorNumber() const
+{
+	fprintf(stderr, "GtkSalDisplay::GetDefaultMonitorNumber\n");
+
+    GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
+#if GTK_CHECK_VERSION(2,20,0)
+    return m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)];
+#else
+    static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor =
+        (screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
+    if (sym_gdk_screen_get_primary_monitor)
+        return m_aXineramaScreenIndexMap[sym_gdk_screen_get_primary_monitor(pScreen)];
+    //gdk_screen_get_primary_monitor unavailable, take the first laptop monitor as the default
+    gint nMonitors = gdk_screen_get_n_monitors(pScreen);
+    for (gint i = 0; i < nMonitors; ++i)
+    {
+        fprintf(stderr, "name is %s\n", gdk_screen_get_monitor_plug_name(pScreen, i));
+        if (g_ascii_strncasecmp (gdk_screen_get_monitor_plug_name(pScreen, i), "LVDS", 4) == 0)
+            return m_aXineramaScreenIndexMap[i];
+    }
+    return 0;
+#endif
+}
+
 void GtkSalDisplay::initScreen( int nScreen ) const
 {
     if( nScreen < 0 || nScreen >= static_cast<int>(m_aScreens.size()) )
--- vcl.orig/unx/inc/saldisp.hxx	2010-06-14 19:51:39.548798785 +0100
+++ vcl/unx/inc/saldisp.hxx	2010-06-15 10:06:53.031798755 +0100
@@ -389,6 +389,7 @@
 
     bool			m_bXinerama;
     std::vector< Rectangle > m_aXineramaScreens;
+    std::vector< int > m_aXineramaScreenIndexMap;
     std::list<SalFrame*> m_aFrames;
     std::list<SalObject*> m_aSalObjects;
     
@@ -404,7 +405,7 @@
     int             processRandREvent( XEvent* );
 
     void			doDestruct();
-    void            addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
+    void            addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight );
 public:
 	static	SalDisplay	   *GetSalDisplay( Display* display );
 	static	BOOL			BestVisual( Display     *pDisp,
@@ -474,6 +475,7 @@
 	XLIB_Window		GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
 	Display		   *GetDisplay() const { return pDisp_; }
 	int				GetDefaultScreenNumber() const { return m_nDefaultScreen; }
+	virtual int		GetDefaultMonitorNumber() const { return 0; }
     const Size&     GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
 	srv_vendor_t	GetServerVendor() const { return meServerVendor; }
 	void			SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
--- vcl.orig/unx/source/app/saldisp.cxx	2010-06-14 19:51:39.516798973 +0100
+++ vcl/unx/source/app/saldisp.cxx	2010-06-15 10:12:39.627798619 +0100
@@ -2682,7 +2682,7 @@ void SalDisplay::PrintInfo() const
              sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) );
 }
 
-void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
+void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight )
 {
     // see if any frame buffers are at the same coordinates
     // this can happen with weird configuration e.g. on
@@ -2696,11 +2696,13 @@ void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, l
             if( m_aXineramaScreens[n].GetWidth() < i_nWidth ||
                 m_aXineramaScreens[n].GetHeight() < i_nHeight )
             {
+                m_aXineramaScreenIndexMap[i] = n;
                 m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
             }
             return;
         }
     }
+    m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size();
     m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
 }
 
@@ -2727,8 +2729,9 @@ void SalDisplay::InitXinerama()
         {
             m_bXinerama = true;
             m_aXineramaScreens = std::vector<Rectangle>();
+            m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
             for( int i = 0; i < nFramebuffers; i++ )
-                addXineramaScreenUnique( pFramebuffers[i].x,
+                addXineramaScreenUnique( i, pFramebuffers[i].x,
                                          pFramebuffers[i].y,
                                          pFramebuffers[i].width,
                                          pFramebuffers[i].height );
@@ -2744,9 +2747,10 @@ if( XineramaIsActive( pDisp_ ) )
         if( nFramebuffers > 1 )
         {
             m_aXineramaScreens = std::vector<Rectangle>();
+            m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers);
             for( int i = 0; i < nFramebuffers; i++ )
             {
-                addXineramaScreenUnique( pScreens[i].x_org,
+                addXineramaScreenUnique( i, pScreens[i].x_org,
                                          pScreens[i].y_org,
                                          pScreens[i].width,
                                          pScreens[i].height );
--- vcl.orig/unx/source/app/salsys.cxx	2010-06-14 19:51:39.515799413 +0100
+++ vcl/unx/source/app/salsys.cxx	2010-06-14 20:28:14.281799292 +0100
@@ -74,7 +74,7 @@
 unsigned int X11SalSystem::GetDefaultDisplayNumber()
 {
     SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
-    return pSalDisp->GetDefaultScreenNumber();
+    return  pSalDisp->IsXinerama() ? pSalDisp->GetDefaultMonitorNumber() : pSalDisp->GetDefaultScreenNumber();
 }
 
 Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
--- vcl.orig/unx/inc/plugins/gtk/gtkgdi.hxx	2010-06-21 12:34:41.000000000 +0100
+++ vcl/unx/inc/plugins/gtk/gtkgdi.hxx	2010-06-21 13:16:40.000000000 +0100
@@ -49,7 +49,7 @@
     virtual             ~GtkSalGraphics();
     
     inline GtkWidget*  GetGtkWidget() const { return m_pWindow; }
-    inline GdkWindow*  GetGdkWindow() const { return m_pWindow->window; }
+    inline GdkWindow*  GetGdkWindow() const { return widget_get_window(m_pWindow); }
     inline GtkSalFrame* GetGtkFrame() const { return static_cast<GtkSalFrame*>(m_pFrame); }
     void SetWindow( GtkWidget* window ) { m_pWindow = window; } 
     
@@ -127,7 +127,7 @@
                             const clipList& rClipList,
                             ControlState nState, const ImplControlValue& aValue,
 							const OUString& rCaption );
-    BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+    BOOL NWPaintGTKComboBoxEntry( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
 							 const Rectangle& rControlRectangle,
                              const clipList& rClipList,
                              ControlState nState, const ImplControlValue& aValue,
@@ -137,11 +137,13 @@
                             const clipList& rClipList,
                             ControlState nState, const ImplControlValue& aValue,
 							const OUString& rCaption );
-    BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
-							const Rectangle& rControlRectangle,
-                            const clipList& rClipList,
-                            ControlState nState, const ImplControlValue& aValue,
-							const OUString& rCaption );
+    BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
+                             ControlType nType, ControlPart nPart,
+                             const Rectangle& rControlRectangle,
+                             const clipList& rClipList,
+                             ControlState nState,
+                             const ImplControlValue& aValue,
+                             const OUString& rCaption );
     
     BOOL NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
 							const Rectangle& rControlRectangle,
--- vcl.orig/unx/gtk/gdi/salnativewidgets-gtk.cxx	2010-06-21 12:34:41.000000000 +0100
+++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx	2010-06-21 13:19:37.000000000 +0100
@@ -68,39 +68,45 @@
 class NWPixmapCache;
 struct NWFWidgetData
 {
-    GtkWidget *	gCacheWindow;
-    GtkWidget *	gDumbContainer;
+    GtkWidget * gCacheWindow;
+    GtkWidget * gDumbContainer;
 
-    GtkWidget *	gBtnWidget;
-    GtkWidget *	gRadioWidget;
-    GtkWidget *	gRadioWidgetSibling;
-    GtkWidget *	gCheckWidget;
-    GtkWidget *	gScrollHorizWidget;
-    GtkWidget *	gScrollVertWidget;
-    GtkWidget *	gArrowWidget;
-    GtkWidget *	gDropdownWidget;
-    GtkWidget *	gEditBoxWidget;
-    GtkWidget *	gSpinButtonWidget;
-    GtkWidget *	gNotebookWidget;
-    GtkWidget *	gOptionMenuWidget;
-    GtkWidget *	gComboWidget;
-    GtkWidget *	gScrolledWindowWidget;
-    GtkWidget *  gToolbarWidget;
-    GtkWidget *  gToolbarButtonWidget;
-    GtkWidget *  gToolbarToggleWidget;
-    GtkWidget *  gHandleBoxWidget;
-    GtkWidget *  gMenubarWidget;
-    GtkWidget *  gMenuItemMenubarWidget;
-    GtkWidget *  gMenuWidget;
-    GtkWidget *  gMenuItemMenuWidget;
-    GtkWidget *  gMenuItemCheckMenuWidget;
-    GtkWidget *  gMenuItemRadioMenuWidget;
-    GtkWidget *  gImageMenuItem;
-    GtkWidget *  gTooltipPopup;
-    GtkWidget *  gProgressBar;
-    GtkWidget *  gTreeView;
-    GtkWidget *  gHScale;
-    GtkWidget *  gVScale;
+    GtkWidget * gBtnWidget;
+    GtkWidget * gRadioWidget;
+    GtkWidget * gRadioWidgetSibling;
+    GtkWidget * gCheckWidget;
+    GtkWidget * gScrollHorizWidget;
+    GtkWidget * gScrollVertWidget;
+    GtkWidget * gArrowWidget;
+    GtkWidget * gDropdownWidget;
+    GtkWidget * gEditBoxWidget;
+    GtkWidget * gSpinButtonWidget;
+    GtkWidget * gNotebookWidget;
+    GtkWidget * gComboBoxEntryWidget;
+    GtkWidget * gComboBoxEntry_EntryWidget;
+    GtkWidget * gComboBoxEntry_ButtonWidget;
+    GtkWidget * gComboBoxEntry_ArrowWidget;
+    GtkWidget * gComboBoxWidget;
+    GtkWidget * gComboBox_ButtonWidget;
+    GtkWidget * gComboBox_SeparatorWidget;
+    GtkWidget * gComboBox_ArrowWidget;
+    GtkWidget * gScrolledWindowWidget;
+    GtkWidget * gToolbarWidget;
+    GtkWidget * gToolbarButtonWidget;
+    GtkWidget * gToolbarToggleWidget;
+    GtkWidget * gHandleBoxWidget;
+    GtkWidget * gMenubarWidget;
+    GtkWidget * gMenuItemMenubarWidget;
+    GtkWidget * gMenuWidget;
+    GtkWidget * gMenuItemMenuWidget;
+    GtkWidget * gMenuItemCheckMenuWidget;
+    GtkWidget * gMenuItemRadioMenuWidget;
+    GtkWidget * gImageMenuItem;
+    GtkWidget * gTooltipPopup;
+    GtkWidget * gProgressBar;
+    GtkWidget * gTreeView;
+    GtkWidget * gHScale;
+    GtkWidget * gVScale;
 
     NWPixmapCacheList* gNWPixmapCacheList;
     NWPixmapCache* gCacheTabItems;
@@ -120,8 +126,14 @@
         gEditBoxWidget( NULL ),
         gSpinButtonWidget( NULL ),
         gNotebookWidget( NULL ),
-        gOptionMenuWidget( NULL ),
-        gComboWidget( NULL ),
+        gComboBoxEntryWidget( NULL ),
+        gComboBoxEntry_EntryWidget( NULL ),
+        gComboBoxEntry_ButtonWidget( NULL ),
+        gComboBoxEntry_ArrowWidget( NULL ),
+        gComboBoxWidget( NULL ),
+        gComboBox_ButtonWidget( NULL ),
+        gComboBox_SeparatorWidget( NULL ),
+        gComboBox_ArrowWidget( NULL ),
         gScrolledWindowWidget( NULL ),
         gToolbarWidget( NULL ),
         gToolbarButtonWidget( NULL ),
@@ -148,29 +160,29 @@
 // Keep a hash table of Widgets->default flags so that we can
 // easily and quickly reset each to a default state before using
 // them
-static std::hash_map<long, guint>	gWidgetDefaultFlags;
+static std::hash_map<long, guint>   gWidgetDefaultFlags;
 static std::vector<NWFWidgetData>   gWidgetData;
 
-static const GtkBorder aDefDefBorder		= { 1, 1, 1, 1 };
+static const GtkBorder aDefDefBorder        = { 1, 1, 1, 1 };
 
 // Some GTK defaults
-#define MIN_ARROW_SIZE					11
-#define BTN_CHILD_SPACING				1
-#define MIN_SPIN_ARROW_WIDTH				6
-
-
-static void NWEnsureGTKRadio			( int nScreen );
-static void NWEnsureGTKButton			( int nScreen );
-static void NWEnsureGTKCheck			( int nScreen );
-static void NWEnsureGTKScrollbars		( int nScreen );
-static void NWEnsureGTKArrow			( int nScreen );
-static void NWEnsureGTKEditBox			( int nScreen );
-static void NWEnsureGTKSpinButton		( int nScreen );
-static void NWEnsureGTKNotebook			( int nScreen );
-static void NWEnsureGTKOptionMenu		( int nScreen );
-static void NWEnsureGTKCombo			( int nScreen );
-static void NWEnsureGTKScrolledWindow	( int nScreen );
-static void NWEnsureGTKToolbar			( int nScreen );
+#define MIN_ARROW_SIZE                  11
+#define BTN_CHILD_SPACING               1
+#define MIN_SPIN_ARROW_WIDTH                6
+
+
+static void NWEnsureGTKRadio            ( int nScreen );
+static void NWEnsureGTKButton           ( int nScreen );
+static void NWEnsureGTKCheck            ( int nScreen );
+static void NWEnsureGTKScrollbars       ( int nScreen );
+static void NWEnsureGTKArrow            ( int nScreen );
+static void NWEnsureGTKEditBox          ( int nScreen );
+static void NWEnsureGTKSpinButton       ( int nScreen );
+static void NWEnsureGTKNotebook         ( int nScreen );
+static void NWEnsureGTKComboBoxEntry    ( int nScreen );
+static void NWEnsureGTKComboBox         ( int nScreen );
+static void NWEnsureGTKScrolledWindow   ( int nScreen );
+static void NWEnsureGTKToolbar          ( int nScreen );
 static void NWEnsureGTKMenubar          ( int nScreen );
 static void NWEnsureGTKMenu             ( int nScreen );
 static void NWEnsureGTKTooltip          ( int nScreen );
@@ -210,14 +222,10 @@
 							ControlState nState, const ImplControlValue& aValue,
 							const OUString& rCaption );
 //---
-static Rectangle NWGetComboBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
-							const ImplControlValue& aValue, const OUString& rCaption );
-
-//---
-static Rectangle NWGetListBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
-							const ImplControlValue& aValue, const OUString& rCaption );
+static Rectangle NWGetComboBoxEntryButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+                            const ImplControlValue& aValue, const OUString& rCaption );
 
-static Rectangle NWGetListBoxIndicatorRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+static Rectangle NWGetComboBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
 							const ImplControlValue& aValue, const OUString& rCaption );
 
 static Rectangle NWGetToolbarRect( int nScreen,
@@ -229,9 +237,9 @@
                                    const OUString& rCaption );
 //---
 
-static Rectangle NWGetScrollButtonRect(	int nScreen, ControlPart nPart, Rectangle aAreaRect );
+static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect );
 //---
-								
+                                
 /*********************************************************
  * PixmapCache
  *********************************************************/
@@ -298,7 +306,6 @@
         g_object_ref( m_pixmap );
 }
 
-
 NWPixmapCache::NWPixmapCache( int nScreen )
 {
     m_idx = 0;
@@ -308,25 +315,25 @@
     if( gWidgetData[m_screen].gNWPixmapCacheList )
         gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
 } 
+
 NWPixmapCache::~NWPixmapCache()
 {
     if( gWidgetData[m_screen].gNWPixmapCacheList )
         gWidgetData[m_screen].gNWPixmapCacheList->RemoveCache(this);
     delete[] pData;
 }
+
 void NWPixmapCache::ThemeChanged()
 {
     // throw away cached pixmaps
-    int i;
-    for(i=0; i<m_size; i++)
+    for(int i=0; i<m_size; i++)
         pData[i].SetPixmap( NULL );
 }
 
-BOOL  NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap )
+BOOL NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap )
 {
     aState &= ~CTRL_CACHING_ALLOWED; // mask clipping flag
-    int i;
-    for(i=0; i<m_size; i++)
+    for(int i=0; i<m_size; i++)
     {
         if( pData[i].m_nType == aType &&
             pData[i].m_nState == aState &&    
@@ -354,11 +361,11 @@
     pData[m_idx].SetPixmap( pPixmap );
 }
 
-
 void NWPixmapCacheList::AddCache( NWPixmapCache* pCache )
 {
     mCaches.push_back( pCache );
 }
+
 void NWPixmapCacheList::RemoveCache( NWPixmapCache* pCache )
 {
     ::std::vector< NWPixmapCache* >::iterator p;
@@ -366,6 +373,7 @@
     if( p != mCaches.end() )
         mCaches.erase( p );
 }
+
 void NWPixmapCacheList::ThemeChanged( )
 {
     ::std::vector< NWPixmapCache* >::iterator p = mCaches.begin();
@@ -382,10 +390,10 @@
  *********************************************************/
 inline void NW_gtk_border_set_from_border( GtkBorder& aDst, const GtkBorder * pSrc )
 {
-	aDst.left		= pSrc->left;
-	aDst.top		= pSrc->top;
-	aDst.right	= pSrc->right;
-	aDst.bottom	= pSrc->bottom;
+    aDst.left       = pSrc->left;
+    aDst.top        = pSrc->top;
+    aDst.right  = pSrc->right;
+    aDst.bottom = pSrc->bottom;
 }
 
 
@@ -535,41 +543,41 @@
  */
 BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
 {
-	if (
-		((nType==CTRL_PUSHBUTTON)  && (nPart==PART_ENTIRE_CONTROL)) 	||
- 		((nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL))		||
-		((nType==CTRL_CHECKBOX)    && (nPart==PART_ENTIRE_CONTROL))		||
-		((nType==CTRL_SCROLLBAR) &&
-				(  (nPart==PART_DRAW_BACKGROUND_HORZ)
-				|| (nPart==PART_DRAW_BACKGROUND_VERT)
-				|| (nPart==PART_ENTIRE_CONTROL)
-                || (nPart==HAS_THREE_BUTTONS) )  				)	||
-		((nType==CTRL_EDITBOX) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==HAS_BACKGROUND_TEXTURE) ) 			)	||
-		((nType==CTRL_MULTILINE_EDITBOX) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==HAS_BACKGROUND_TEXTURE) ) 			)	||
-		((nType==CTRL_SPINBOX) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==PART_ALL_BUTTONS)
-				|| (nPart==HAS_BACKGROUND_TEXTURE) )			)	||
-		((nType==CTRL_SPINBUTTONS) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==PART_ALL_BUTTONS)	)				)	||
-		((nType==CTRL_COMBOBOX) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==HAS_BACKGROUND_TEXTURE)	)			)	||
-		(((nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) ||
-		  (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER)) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==PART_TABS_DRAW_RTL) )				)	||
-		((nType==CTRL_LISTBOX) &&
-				(  (nPart==PART_ENTIRE_CONTROL)
-				|| (nPart==PART_WINDOW)
-				|| (nPart==HAS_BACKGROUND_TEXTURE) )			)   ||
+    if (
+        ((nType==CTRL_PUSHBUTTON)  && (nPart==PART_ENTIRE_CONTROL))     ||
+        ((nType==CTRL_RADIOBUTTON) && (nPart==PART_ENTIRE_CONTROL))     ||
+        ((nType==CTRL_CHECKBOX)    && (nPart==PART_ENTIRE_CONTROL))     ||
+        ((nType==CTRL_SCROLLBAR) &&
+                (  (nPart==PART_DRAW_BACKGROUND_HORZ)
+                || (nPart==PART_DRAW_BACKGROUND_VERT)
+                || (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==HAS_THREE_BUTTONS) )                 )   ||
+        ((nType==CTRL_EDITBOX) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==HAS_BACKGROUND_TEXTURE) )            )   ||
+        ((nType==CTRL_MULTILINE_EDITBOX) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==HAS_BACKGROUND_TEXTURE) )            )   ||
+        ((nType==CTRL_SPINBOX) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==PART_ALL_BUTTONS)
+                || (nPart==HAS_BACKGROUND_TEXTURE) )            )   ||
+        ((nType==CTRL_SPINBUTTONS) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==PART_ALL_BUTTONS)    )               )   ||
+        ((nType==CTRL_COMBOBOX) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==HAS_BACKGROUND_TEXTURE)  )           )   ||
+        (((nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) ||
+          (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER)) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==PART_TABS_DRAW_RTL) )                )   ||
+        ((nType==CTRL_LISTBOX) &&
+                (  (nPart==PART_ENTIRE_CONTROL)
+                || (nPart==PART_WINDOW)
+                || (nPart==HAS_BACKGROUND_TEXTURE) )            )   ||
         ((nType == CTRL_TOOLBAR) &&
-         		(	(nPart==PART_ENTIRE_CONTROL)
+                (   (nPart==PART_ENTIRE_CONTROL)
                 ||  (nPart==PART_DRAW_BACKGROUND_HORZ)
                 ||  (nPart==PART_DRAW_BACKGROUND_VERT)
                 ||  (nPart==PART_THUMB_HORZ)
@@ -600,9 +608,9 @@
                 )
         )
         )
-		return( TRUE );
+        return( TRUE );
 
-	return( FALSE );
+    return( FALSE );
 }
 
 
@@ -635,10 +643,10 @@
         gboolean has_backward;
         gboolean has_backward2;
         
-	    gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
-									    "has-secondary-forward-stepper", &has_forward2,
-									    "has-backward-stepper", &has_backward,
-	   								    "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
+        gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
+                                        "has-secondary-forward-stepper", &has_forward2,
+                                        "has-backward-stepper", &has_backward,
+                                        "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
         Rectangle aForward;
         Rectangle aBackward;
 
@@ -705,14 +713,14 @@
     }
 
     if( IsNativeControlSupported(nType, nPart) )
-	{
-		rIsInside = rControlRegion.IsInside( aPos );
-		return( TRUE );
-	}
-	else
-	{
-		return( FALSE );
-	}
+    {
+        rIsInside = rControlRegion.IsInside( aPos );
+        return( TRUE );
+    }
+    else
+    {
+        return( FALSE );
+    }
 }
 
 
@@ -738,8 +746,8 @@
         return drawNativeMixedStateCheck( nType, nPart, rControlRegion, nState, aValue, rCaption );
     }
 
-	BOOL			returnVal = FALSE;
-	// get a GC with current clipping region set
+    BOOL            returnVal = FALSE;
+    // get a GC with current clipping region set
     SelectFont();
     
     
@@ -828,12 +836,9 @@
     {
         returnVal = NWPaintGTKSpinBox( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
-    else if ( (nType == CTRL_COMBOBOX) &&
-        ( (nPart==PART_ENTIRE_CONTROL)
-        ||(nPart==PART_BUTTON_DOWN)
-        ) )
+    else if ( (nType == CTRL_COMBOBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_BUTTON_DOWN)) )
     {
-        returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
+        returnVal = NWPaintGTKComboBoxEntry( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
     else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
     {
@@ -844,7 +849,7 @@
     }
     else if ( (nType==CTRL_LISTBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_WINDOW)) )
     {
-        returnVal = NWPaintGTKListBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
+        returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
     }
     else if ( (nType== CTRL_TOOLBAR) )
     {
@@ -961,7 +966,7 @@
 								const ImplControlValue&,
 								const OUString& )
 {
-	return( FALSE );
+    return( FALSE );
 }
 
 
@@ -1001,7 +1006,7 @@
     }
     if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
     {
-        rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
+        rNativeBoundingRegion = NWGetComboBoxEntryButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
         aValue, rCaption );
         rNativeContentRegion = rNativeBoundingRegion;
         
@@ -1018,7 +1023,7 @@
     }
     if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
     {
-        rNativeBoundingRegion = NWGetListBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
+        rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
         aValue, rCaption );
         rNativeContentRegion = rNativeBoundingRegion;
         
@@ -1134,7 +1139,7 @@
         returnVal = TRUE;
     }
         
-	return( returnVal );
+    return( returnVal );
 }
 
 
@@ -1144,67 +1149,67 @@
 BOOL GtkSalGraphics::NWPaintGTKButton(
             GdkDrawable* gdkDrawable,
             ControlType, ControlPart,
-			const Rectangle& rControlRectangle,            
+            const Rectangle& rControlRectangle,            
             const clipList& rClipList,
             ControlState nState, const ImplControlValue&,
 			const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	gboolean		interiorFocus;
-	gint			focusWidth;
-	gint			focusPad;
-	BOOL			bDrawFocus = TRUE;
-	gint			x, y, w, h;
-	GtkBorder		aDefBorder;
-	GtkBorder*		pBorder;
-    GdkRectangle	clipRect;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    gboolean        interiorFocus;
+    gint            focusWidth;
+    gint            focusPad;
+    BOOL            bDrawFocus = TRUE;
+    gint            x, y, w, h;
+    GtkBorder       aDefBorder;
+    GtkBorder*      pBorder;
+    GdkRectangle    clipRect;
     
-	NWEnsureGTKButton( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWEnsureGTKButton( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
 
-	x = rControlRectangle.Left();
+    x = rControlRectangle.Left();
     y = rControlRectangle.Top();
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
-	// Grab some button style attributes
-	gtk_widget_style_get( gWidgetData[m_nScreen].gBtnWidget,	"focus-line-width",	&focusWidth,
-								"focus-padding", 	&focusPad,
-					 			"interior_focus",	&interiorFocus,
-								"default_border",	&pBorder,
-								(char *)NULL );
+    // Grab some button style attributes
+    gtk_widget_style_get( gWidgetData[m_nScreen].gBtnWidget,    "focus-line-width", &focusWidth,
+                                "focus-padding",    &focusPad,
+                                "interior_focus",   &interiorFocus,
+                                "default_border",   &pBorder,
+                                (char *)NULL );
 
-	// Make sure the border values exist, otherwise use some defaults
-	if ( pBorder )
-	{
-		NW_gtk_border_set_from_border( aDefBorder, pBorder );
-		gtk_border_free( pBorder );
-	}
-	else NW_gtk_border_set_from_border( aDefBorder, &aDefDefBorder );
+    // Make sure the border values exist, otherwise use some defaults
+    if ( pBorder )
+    {
+        NW_gtk_border_set_from_border( aDefBorder, pBorder );
+        gtk_border_free( pBorder );
+    }
+    else NW_gtk_border_set_from_border( aDefBorder, &aDefDefBorder );
 
-	// If the button is too small, don't ever draw focus or grab more space
-	if ( (w < 16) || (h < 16) )
-		bDrawFocus = FALSE;
+    // If the button is too small, don't ever draw focus or grab more space
+    if ( (w < 16) || (h < 16) )
+        bDrawFocus = FALSE;
 
-	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
 
     gint xi = x, yi = y, wi = w, hi = h;
-	if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus )
-	{
-		xi += aDefBorder.left;
-		yi += aDefBorder.top;
-		wi -= aDefBorder.left + aDefBorder.right;
-		hi -= aDefBorder.top + aDefBorder.bottom;
-	}
+    if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus )
+    {
+        xi += aDefBorder.left;
+        yi += aDefBorder.top;
+        wi -= aDefBorder.left + aDefBorder.right;
+        hi -= aDefBorder.top + aDefBorder.bottom;
+    }
 
-	if ( !interiorFocus && bDrawFocus )
-	{
-		xi += focusWidth + focusPad;
-		yi += focusWidth + focusPad;
-		wi -= 2 * (focusWidth + focusPad);
-		hi -= 2 * (focusWidth + focusPad);
-	}
+    if ( !interiorFocus && bDrawFocus )
+    {
+        xi += focusWidth + focusPad;
+        yi += focusWidth + focusPad;
+        wi -= 2 * (focusWidth + focusPad);
+        hi -= 2 * (focusWidth + focusPad);
+    }
 
     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it)
     {
@@ -1225,88 +1230,88 @@
         
         if ( (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief != GTK_RELIEF_NONE)
             || (nState & CTRL_STATE_PRESSED)
-		    || (nState & CTRL_STATE_ROLLOVER) )
+            || (nState & CTRL_STATE_ROLLOVER) )
         {
             gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, stateType, shadowType,
                            &clipRect, gWidgetData[m_nScreen].gBtnWidget, "button", xi, yi, wi, hi );
         }
     }
 #if 0 // VCL draws focus rects
-	// Draw focus rect
-	if ( (nState & CTRL_STATE_FOCUSED) && (nState & CTRL_STATE_ENABLED) && bDrawFocus )
-	{
-		if (interiorFocus)
-		{
-			x += gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad;
-			y += gWidgetData[m_nScreen].gBtnWidget->style->ythickness + focusPad;
-			w -= 2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
-			h -=  2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
-		}
-		else
-		{
-			x -= focusWidth + focusPad;
-			y -= focusWidth + focusPad;
-			w += 2 * (focusWidth + focusPad);
-			h += 2 * (focusWidth + focusPad);
-		}
-		if ( !interiorFocus )
-			gtk_paint_focus( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, stateType, &clipRect,
+    // Draw focus rect
+    if ( (nState & CTRL_STATE_FOCUSED) && (nState & CTRL_STATE_ENABLED) && bDrawFocus )
+    {
+        if (interiorFocus)
+        {
+            x += gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad;
+            y += gWidgetData[m_nScreen].gBtnWidget->style->ythickness + focusPad;
+            w -= 2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
+            h -=  2 * (gWidgetData[m_nScreen].gBtnWidget->style->xthickness + focusPad);
+        }
+        else
+        {
+            x -= focusWidth + focusPad;
+            y -= focusWidth + focusPad;
+            w += 2 * (focusWidth + focusPad);
+            h += 2 * (focusWidth + focusPad);
+        }
+        if ( !interiorFocus )
+            gtk_paint_focus( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, stateType, &clipRect,
                              gWidgetData[m_nScreen].gBtnWidget, "button", x, y, w, h );
-	}
+    }
 #endif
 
-	return( TRUE );
+    return( TRUE );
 }
 
 static Rectangle NWGetButtonArea( int nScreen,
                                   ControlType, ControlPart, Rectangle aAreaRect, ControlState nState,
 							      const ImplControlValue&, const OUString& )
 {
-	gboolean		interiorFocus;
-	gint			focusWidth;
-	gint			focusPad;
-	GtkBorder		aDefBorder;
-	GtkBorder *	pBorder;
-	BOOL			bDrawFocus = TRUE;
-	Rectangle		aRect;
-	gint			x, y, w, h;
-
-	NWEnsureGTKButton( nScreen );
-	gtk_widget_style_get( gWidgetData[nScreen].gBtnWidget,
-                            	"focus-line-width",	&focusWidth,
-								"focus-padding", 	&focusPad,
-					 			"interior_focus",	&interiorFocus,
-								"default_border",	&pBorder,
-								(char *)NULL );
-
-	// Make sure the border values exist, otherwise use some defaults
-	if ( pBorder )
-	{
-		NW_gtk_border_set_from_border( aDefBorder, pBorder );
-		gtk_border_free( pBorder );
-	}
-	else NW_gtk_border_set_from_border( aDefBorder, &aDefDefBorder );
-
-	x = aAreaRect.Left();
-	y = aAreaRect.Top();
-	w = aAreaRect.GetWidth();
-	h = aAreaRect.GetHeight();
-
-	// If the button is too small, don't ever draw focus or grab more space
-	if ( (w < 16) || (h < 16) )
-		bDrawFocus = FALSE;
-
-	if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus )
-	{
-		x -= aDefBorder.left;
-		y -= aDefBorder.top;
-		w += aDefBorder.left + aDefBorder.right;
-		h += aDefBorder.top + aDefBorder.bottom;
-	}
+    gboolean        interiorFocus;
+    gint            focusWidth;
+    gint            focusPad;
+    GtkBorder       aDefBorder;
+    GtkBorder * pBorder;
+    BOOL            bDrawFocus = TRUE;
+    Rectangle       aRect;
+    gint            x, y, w, h;
+
+    NWEnsureGTKButton( nScreen );
+    gtk_widget_style_get( gWidgetData[nScreen].gBtnWidget,
+                                "focus-line-width", &focusWidth,
+                                "focus-padding",    &focusPad,
+                                "interior_focus",   &interiorFocus,
+                                "default_border",   &pBorder,
+                                (char *)NULL );
+
+    // Make sure the border values exist, otherwise use some defaults
+    if ( pBorder )
+    {
+        NW_gtk_border_set_from_border( aDefBorder, pBorder );
+        gtk_border_free( pBorder );
+    }
+    else NW_gtk_border_set_from_border( aDefBorder, &aDefDefBorder );
+
+    x = aAreaRect.Left();
+    y = aAreaRect.Top();
+    w = aAreaRect.GetWidth();
+    h = aAreaRect.GetHeight();
+
+    // If the button is too small, don't ever draw focus or grab more space
+    if ( (w < 16) || (h < 16) )
+        bDrawFocus = FALSE;
+
+    if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus )
+    {
+        x -= aDefBorder.left;
+        y -= aDefBorder.top;
+        w += aDefBorder.left + aDefBorder.right;
+        h += aDefBorder.top + aDefBorder.bottom;
+    }
 
     aRect = Rectangle( Point( x, y ), Size( w, h ) );
 
-	return( aRect );
+    return( aRect );
 }
 
 //-------------------------------------
@@ -1319,15 +1324,15 @@
                                       const ImplControlValue& aValue,
                                       const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	BOOL			isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    BOOL            isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
     gint            x, y;
-    GdkRectangle	clipRect;
+    GdkRectangle    clipRect;
    
-	NWEnsureGTKButton( m_nScreen );
-	NWEnsureGTKRadio( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWEnsureGTKButton( m_nScreen );
+    NWEnsureGTKRadio( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
 
     gint indicator_size;
     gtk_widget_style_get( gWidgetData[m_nScreen].gRadioWidget, "indicator_size", &indicator_size, (char *)NULL);
@@ -1335,22 +1340,22 @@
     x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
     y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
     
-	// Set the shadow based on if checked or not so we get a freakin checkmark.
-	shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
-	NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidget, nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidgetSibling, nState, stateType );
+    // Set the shadow based on if checked or not so we get a freakin checkmark.
+    shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
+    NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidgetSibling, nState, stateType );
 
-	// GTK enforces radio groups, so that if we don't have 2 buttons in the group,
-	// the single button will always be active.  So we have to have 2 buttons.
+    // GTK enforces radio groups, so that if we don't have 2 buttons in the group,
+    // the single button will always be active.  So we have to have 2 buttons.
     
     // #i59666# set the members directly where we should use
     // gtk_toggle_button_set_active. reason: there are animated themes
     // which are in active state only after a while leading to painting
     // intermediate states between active/inactive. Let's hope that
     // GtkToggleButtone stays binary compatible.
-	if (!isChecked)
-		GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling)->active = TRUE;
-	GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidget)->active = isChecked;
+    if (!isChecked)
+        GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidgetSibling)->active = TRUE;
+    GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gRadioWidget)->active = isChecked;
 
     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
     {
@@ -1364,7 +1369,7 @@
                           x, y, indicator_size, indicator_size );
     }
     
-	return( TRUE );
+    return( TRUE );
 }
 
 //-------------------------------------
@@ -1377,15 +1382,15 @@
                                       const ImplControlValue& aValue,
                                       const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	BOOL			isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON) ? TRUE : FALSE;
-    GdkRectangle	clipRect;
-    gint			x,y;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    BOOL            isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON) ? TRUE : FALSE;
+    GdkRectangle    clipRect;
+    gint            x,y;
 
-	NWEnsureGTKButton( m_nScreen );
-	NWEnsureGTKCheck( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWEnsureGTKButton( m_nScreen );
+    NWEnsureGTKCheck( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
 
     gint indicator_size;
     gtk_widget_style_get( gWidgetData[m_nScreen].gCheckWidget, "indicator_size", &indicator_size, (char *)NULL);
@@ -1393,10 +1398,10 @@
     x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
     y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
     
-	// Set the shadow based on if checked or not so we get a checkmark.
-	shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
-	NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
-	GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gCheckWidget)->active = isChecked;
+    // Set the shadow based on if checked or not so we get a checkmark.
+    shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
+    NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
+    GTK_TOGGLE_BUTTON(gWidgetData[m_nScreen].gCheckWidget)->active = isChecked;
 
     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
     {
@@ -1410,17 +1415,17 @@
                          x, y, indicator_size, indicator_size );
     }
 
-	return( TRUE );
+    return( TRUE );
 }
 
 //-------------------------------------
 static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow )
 {
-	// Size the arrow appropriately
+    // Size the arrow appropriately
     Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 );
     rArrow.SetSize( aSize );
 
-	rArrow.SetPos( Point(
+    rArrow.SetPos( Point(
         rButton.Left() + ( rButton.GetWidth()  - rArrow.GetWidth()  ) / 2,
         rButton.Top() + ( rButton.GetHeight() - rArrow.GetHeight() ) / 2
         ) );
@@ -1470,54 +1475,54 @@
     button12BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
     button21BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
 
-	NWEnsureGTKButton( m_nScreen );
-	NWEnsureGTKScrollbars( m_nScreen );
-	NWEnsureGTKArrow( m_nScreen );
+    NWEnsureGTKButton( m_nScreen );
+    NWEnsureGTKScrollbars( m_nScreen );
+    NWEnsureGTKArrow( m_nScreen );
  
-	// Find the overall bounding rect of the control
-	pixmapRect = rControlRectangle;
+    // Find the overall bounding rect of the control
+    pixmapRect = rControlRectangle;
     pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 1,
                               pixmapRect.GetHeight() + 1 ) );
-	scrollbarRect = pixmapRect;
+    scrollbarRect = pixmapRect;
 
-	if ( (scrollbarRect.GetWidth() <= 1) || (scrollbarRect.GetHeight() <= 1) )
-		return( TRUE );
+    if ( (scrollbarRect.GetWidth() <= 1) || (scrollbarRect.GetHeight() <= 1) )
+        return( TRUE );
 
-	// Grab some button style attributes
-	gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget,
+    // Grab some button style attributes
+    gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget,
                                       "slider_width", &slider_width,
-									  "stepper_size", &stepper_size,
-									  "trough_border", &trough_border,
-									  "stepper_spacing", &stepper_spacing,
-									  "min_slider_length", &min_slider_length, (char *)NULL );
+                                      "stepper_size", &stepper_size,
+                                      "trough_border", &trough_border,
+                                      "stepper_spacing", &stepper_spacing,
+                                      "min_slider_length", &min_slider_length, (char *)NULL );
     gboolean has_forward;
     gboolean has_forward2;
     gboolean has_backward;
     gboolean has_backward2;
     
-	gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
-									  "has-secondary-forward-stepper", &has_forward2,
-									  "has-backward-stepper", &has_backward,
-	   								  "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
-	gint magic = trough_border ? 1 : 0;
+    gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
+                                      "has-secondary-forward-stepper", &has_forward2,
+                                      "has-backward-stepper", &has_backward,
+                                      "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
+    gint magic = trough_border ? 1 : 0;
     gint nFirst = 0;
 
     if ( has_backward )  nFirst  += 1;
     if ( has_forward2 )  nFirst  += 1;
 
-	if ( nPart == PART_DRAW_BACKGROUND_HORZ )
-	{
-		unsigned int sliderHeight = slider_width + (trough_border * 2);
-		vShim = (pixmapRect.GetHeight() - sliderHeight) / 2;
+    if ( nPart == PART_DRAW_BACKGROUND_HORZ )
+    {
+        unsigned int sliderHeight = slider_width + (trough_border * 2);
+        vShim = (pixmapRect.GetHeight() - sliderHeight) / 2;
 
-		scrollbarRect.Move( 0, vShim );
-		scrollbarRect.SetSize( Size( scrollbarRect.GetWidth(), sliderHeight ) );
+        scrollbarRect.Move( 0, vShim );
+        scrollbarRect.SetSize( Size( scrollbarRect.GetWidth(), sliderHeight ) );
 
-		scrollbarWidget = GTK_SCROLLBAR( gWidgetData[m_nScreen].gScrollHorizWidget );
-		scrollbarOrientation = GTK_ORIENTATION_HORIZONTAL;
-		scrollbarTag = scrollbarTagH;
-		button1Type = GTK_ARROW_LEFT;
-		button2Type = GTK_ARROW_RIGHT;
+        scrollbarWidget = GTK_SCROLLBAR( gWidgetData[m_nScreen].gScrollHorizWidget );
+        scrollbarOrientation = GTK_ORIENTATION_HORIZONTAL;
+        scrollbarTag = scrollbarTagH;
+        button1Type = GTK_ARROW_LEFT;
+        button2Type = GTK_ARROW_RIGHT;
 
         if ( has_backward )
         {
@@ -1542,33 +1547,33 @@
         button21BoundRect.SetSize( Size( stepper_size, slider_width ) );
         button22BoundRect.SetSize( Size( stepper_size, slider_width ) );
 
-		thumbRect.Bottom() = thumbRect.Top() + slider_width - 1;
-		// Make sure the thumb is at least the default width (so we don't get tiny thumbs),
-		// but if the VCL gives us a size smaller than the theme's default thumb size,
-		// honor the VCL size
+        thumbRect.Bottom() = thumbRect.Top() + slider_width - 1;
+        // Make sure the thumb is at least the default width (so we don't get tiny thumbs),
+        // but if the VCL gives us a size smaller than the theme's default thumb size,
+        // honor the VCL size
 #if 0
-		if ( (thumbRect.GetWidth() < min_slider_length)
-			&& ((scrollbarRect.GetWidth()-button1BoundRect.GetWidth()-button2BoundRect.GetWidth()) > min_slider_length) )
-			thumbRect.SetSize( Size( min_slider_length, thumbRect.GetHeight() ) );
+        if ( (thumbRect.GetWidth() < min_slider_length)
+            && ((scrollbarRect.GetWidth()-button1BoundRect.GetWidth()-button2BoundRect.GetWidth()) > min_slider_length) )
+            thumbRect.SetSize( Size( min_slider_length, thumbRect.GetHeight() ) );
 #endif
 
         thumbRect.Right() += magic;
-		// Center vertically in the track
-		thumbRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 );
-	}
-	else
-	{
-		unsigned int sliderWidth = slider_width + (trough_border * 2);
-		hShim = (pixmapRect.GetWidth() - sliderWidth) / 2;
+        // Center vertically in the track
+        thumbRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 );
+    }
+    else
+    {
+        unsigned int sliderWidth = slider_width + (trough_border * 2);
+        hShim = (pixmapRect.GetWidth() - sliderWidth) / 2;
 
-		scrollbarRect.Move( hShim, 0 );
-		scrollbarRect.SetSize( Size( sliderWidth, scrollbarRect.GetHeight() ) );
+        scrollbarRect.Move( hShim, 0 );
+        scrollbarRect.SetSize( Size( sliderWidth, scrollbarRect.GetHeight() ) );
 
-		scrollbarWidget = GTK_SCROLLBAR( gWidgetData[m_nScreen].gScrollVertWidget );
-		scrollbarOrientation = GTK_ORIENTATION_VERTICAL;
-		scrollbarTag = scrollbarTagV;
-		button1Type = GTK_ARROW_UP;
-		button2Type = GTK_ARROW_DOWN;
+        scrollbarWidget = GTK_SCROLLBAR( gWidgetData[m_nScreen].gScrollVertWidget );
+        scrollbarOrientation = GTK_ORIENTATION_VERTICAL;
+        scrollbarTag = scrollbarTagV;
+        button1Type = GTK_ARROW_UP;
+        button2Type = GTK_ARROW_DOWN;
 
         if ( has_backward )
         {
@@ -1577,7 +1582,7 @@
         }
         button11BoundRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, trough_border );
         button11BoundRect.SetSize( Size( slider_width, stepper_size ) );
-		button12BoundRect.SetSize( Size( slider_width, stepper_size ) );
+        button12BoundRect.SetSize( Size( slider_width, stepper_size ) );
 
         if ( has_backward2 )
         {
@@ -1592,41 +1597,41 @@
         button21BoundRect.SetSize( Size( slider_width, stepper_size ) );
         button22BoundRect.SetSize( Size( slider_width, stepper_size ) );
 
-		thumbRect.Right() = thumbRect.Left() + slider_width - 1;
+        thumbRect.Right() = thumbRect.Left() + slider_width - 1;
 #if 0
-		// Make sure the thumb is at least the default width (so we don't get tiny thumbs),
-		// but if the VCL gives us a size smaller than the theme's default thumb size,
-		// honor the VCL size
-		if ( (thumbRect.GetHeight() < min_slider_length)
-			&& ((scrollbarRect.GetHeight()-button1BoundRect.GetHeight()-button2BoundRect.GetHeight()) > min_slider_length) )
-			thumbRect.SetSize( Size( thumbRect.GetWidth(), min_slider_length ) );
+        // Make sure the thumb is at least the default width (so we don't get tiny thumbs),
+        // but if the VCL gives us a size smaller than the theme's default thumb size,
+        // honor the VCL size
+        if ( (thumbRect.GetHeight() < min_slider_length)
+            && ((scrollbarRect.GetHeight()-button1BoundRect.GetHeight()-button2BoundRect.GetHeight()) > min_slider_length) )
+            thumbRect.SetSize( Size( thumbRect.GetWidth(), min_slider_length ) );
 #endif
 
         thumbRect.Bottom() += magic;
-		// Center horizontally in the track
-		thumbRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 );
-	}
+        // Center horizontally in the track
+        thumbRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 );
+    }
 
     BOOL has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
 
-	scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
-	if ( scrollbarValues == NULL )
-		scrollbarValues = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
-	if ( nPart == PART_DRAW_BACKGROUND_HORZ )
-	{
-		scrollbarValues->lower = pScrollbarVal->mnMin;
-		scrollbarValues->upper = pScrollbarVal->mnMax;
-		scrollbarValues->value = pScrollbarVal->mnCur;
-		scrollbarValues->page_size = scrollbarRect.GetWidth() / 2;
-	}
-	else
-	{
-		scrollbarValues->lower = pScrollbarVal->mnMin;
-		scrollbarValues->upper = pScrollbarVal->mnMax;
-		scrollbarValues->value = pScrollbarVal->mnCur;
-		scrollbarValues->page_size = scrollbarRect.GetHeight() / 2;
-	}
-	gtk_adjustment_changed( scrollbarValues );
+    scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
+    if ( scrollbarValues == NULL )
+        scrollbarValues = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
+    if ( nPart == PART_DRAW_BACKGROUND_HORZ )
+    {
+        scrollbarValues->lower = pScrollbarVal->mnMin;
+        scrollbarValues->upper = pScrollbarVal->mnMax;
+        scrollbarValues->value = pScrollbarVal->mnCur;
+        scrollbarValues->page_size = scrollbarRect.GetWidth() / 2;
+    }
+    else
+    {
+        scrollbarValues->lower = pScrollbarVal->mnMin;
+        scrollbarValues->upper = pScrollbarVal->mnMax;
+        scrollbarValues->value = pScrollbarVal->mnCur;
+        scrollbarValues->page_size = scrollbarRect.GetHeight() / 2;
+    }
+    gtk_adjustment_changed( scrollbarValues );
     
     // as multiple paints are required for the scrollbar
     // painting them directly to the window flickers
@@ -1641,81 +1646,81 @@
     GdkDrawable* const &gdkDrawable = GDK_DRAWABLE( pixmap );
     GdkRectangle* gdkRect = NULL; 
 
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
-	NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
-	style = GTK_WIDGET( scrollbarWidget )->style;
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
+    style = GTK_WIDGET( scrollbarWidget )->style;
 
-	// ----------------- TROUGH
-	gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, 
+    // ----------------- TROUGH
+    gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, 
                         GTK_STATE_NORMAL, GTK_SHADOW_NONE, gdkRect,
                         m_pWindow, "base", x, y, 
                         w, h );
-	gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, 
+    gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, 
                    gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
                    x, y,
                    scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
 
-	if ( nState & CTRL_STATE_FOCUSED )
-	{
-		gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE, 
+    if ( nState & CTRL_STATE_FOCUSED )
+    {
+        gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE, 
                          gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
                          x, y,
                          scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
-	}
+    }
 
-	// ----------------- THUMB
+    // ----------------- THUMB
     if ( has_slider )
     {
-	    NWConvertVCLStateToGTKState( pScrollbarVal->mnThumbState, &stateType, &shadowType );
-	    if ( pScrollbarVal->mnThumbState & CTRL_STATE_PRESSED )  stateType = GTK_STATE_PRELIGHT;
-	    gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT, 
+        NWConvertVCLStateToGTKState( pScrollbarVal->mnThumbState, &stateType, &shadowType );
+        if ( pScrollbarVal->mnThumbState & CTRL_STATE_PRESSED )  stateType = GTK_STATE_PRELIGHT;
+        gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT, 
                         gdkRect, GTK_WIDGET(scrollbarWidget), "slider",
                         x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(), 
                         thumbRect.GetWidth(), thumbRect.GetHeight(), scrollbarOrientation );
     }
-	// ----------------- BUTTON 1 //
-	if ( has_backward )
-	{
+    // ----------------- BUTTON 1 //
+    if ( has_backward )
+    {
         NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
-        if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
+        if ( stateType == GTK_STATE_INSENSITIVE )   stateType = GTK_STATE_NORMAL;
         gtk_paint_box( style, gdkDrawable, stateType, shadowType, 
                        gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
                        x+hShim+button11BoundRect.Left(), y+vShim+button11BoundRect.Top(), 
                        button11BoundRect.GetWidth(), button11BoundRect.GetHeight() );
         // ----------------- ARROW 1
-    	NWCalcArrowRect( button11BoundRect, arrowRect );
-    	gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
+        NWCalcArrowRect( button11BoundRect, arrowRect );
+        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
                          gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
                          x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
                          arrowRect.GetWidth(), arrowRect.GetHeight() );
     }
-	if ( has_forward2 )
-	{
+    if ( has_forward2 )
+    {
         NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
-        if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
+        if ( stateType == GTK_STATE_INSENSITIVE )   stateType = GTK_STATE_NORMAL;
         gtk_paint_box( style, gdkDrawable, stateType, shadowType, 
                        gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
                        x+hShim+button12BoundRect.Left(), y+vShim+button12BoundRect.Top(), 
                        button12BoundRect.GetWidth(), button12BoundRect.GetHeight() );
         // ----------------- ARROW 1
-    	NWCalcArrowRect( button12BoundRect, arrowRect );
-    	gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
+        NWCalcArrowRect( button12BoundRect, arrowRect );
+        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
                          gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
                          x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
                          arrowRect.GetWidth(), arrowRect.GetHeight() );
     }
-	// ----------------- BUTTON 2
+    // ----------------- BUTTON 2
     if ( has_backward2 )
     {
         NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
-        if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
+        if ( stateType == GTK_STATE_INSENSITIVE )   stateType = GTK_STATE_NORMAL;
         gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect, 
                        GTK_WIDGET(scrollbarWidget), "stepper",
                        x+hShim+button21BoundRect.Left(), y+vShim+button21BoundRect.Top(), 
                        button21BoundRect.GetWidth(), button21BoundRect.GetHeight() );
-    	// ----------------- ARROW 2
-    	NWCalcArrowRect( button21BoundRect, arrowRect );
+        // ----------------- ARROW 2
+        NWCalcArrowRect( button21BoundRect, arrowRect );
         gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
                          gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
                          x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
@@ -1724,13 +1729,13 @@
     if ( has_forward )
     {
         NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
-        if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
+        if ( stateType == GTK_STATE_INSENSITIVE )   stateType = GTK_STATE_NORMAL;
         gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect, 
                        GTK_WIDGET(scrollbarWidget), "stepper",
                        x+hShim+button22BoundRect.Left(), y+vShim+button22BoundRect.Top(), 
                        button22BoundRect.GetWidth(), button22BoundRect.GetHeight() );
-    	// ----------------- ARROW 2
-    	NWCalcArrowRect( button22BoundRect, arrowRect );
+        // ----------------- ARROW 2
+        NWCalcArrowRect( button22BoundRect, arrowRect );
         gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
                          gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
                          x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
@@ -1744,12 +1749,12 @@
     }
     g_object_unref( pixmap );
  
-	return( TRUE );
+    return( TRUE );
 }
 
 //---
 
-static Rectangle NWGetScrollButtonRect(	int nScreen, ControlPart nPart, Rectangle aAreaRect )
+static Rectangle NWGetScrollButtonRect( int nScreen, ControlPart nPart, Rectangle aAreaRect )
 {
     gint slider_width;
     gint stepper_size;
@@ -1758,26 +1763,26 @@
 
     NWEnsureGTKScrollbars( nScreen );
 
-	// Grab some button style attributes
-	gtk_widget_style_get( gWidgetData[nScreen].gScrollHorizWidget,
+    // Grab some button style attributes
+    gtk_widget_style_get( gWidgetData[nScreen].gScrollHorizWidget,
                                       "slider-width", &slider_width,
-									  "stepper-size", &stepper_size,
-									  "trough-border", &trough_border,
-	   								  "stepper-spacing", &stepper_spacing, (char *)NULL );
+                                      "stepper-size", &stepper_size,
+                                      "trough-border", &trough_border,
+                                      "stepper-spacing", &stepper_spacing, (char *)NULL );
 
     gboolean has_forward;
     gboolean has_forward2;
     gboolean has_backward;
     gboolean has_backward2;
 
-	gtk_widget_style_get( gWidgetData[nScreen].gScrollHorizWidget,
+    gtk_widget_style_get( gWidgetData[nScreen].gScrollHorizWidget,
                                       "has-forward-stepper", &has_forward,
-									  "has-secondary-forward-stepper", &has_forward2,
-									  "has-backward-stepper", &has_backward,
-	   								  "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
-	gint       buttonWidth;
-	gint       buttonHeight;
-	Rectangle  buttonRect;
+                                      "has-secondary-forward-stepper", &has_forward2,
+                                      "has-backward-stepper", &has_backward,
+                                      "has-secondary-backward-stepper", &has_backward2, (char *)NULL );
+    gint       buttonWidth;
+    gint       buttonHeight;
+    Rectangle  buttonRect;
 
     gint nFirst = 0;
     gint nSecond = 0;
@@ -1827,7 +1832,7 @@
 
     buttonRect.SetSize( Size( buttonWidth, buttonHeight ) );
 
-	return( buttonRect );
+    return( buttonRect );
 }
 
 //-------------------------------------
@@ -1840,7 +1845,7 @@
                                         const ImplControlValue& aValue,
                                         const OUString& rCaption )
 {
-	Rectangle		pixmapRect;
+    Rectangle       pixmapRect;
     GdkRectangle    clipRect;
     
 	// Find the overall bounding rect of the buttons's drawing area,
@@ -1857,7 +1862,7 @@
         NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption );
     }
 
-	return( TRUE );
+    return( TRUE );
 }
 
 
@@ -1867,31 +1872,31 @@
  */
 static Rectangle NWGetEditBoxPixmapRect(int nScreen,
                                         ControlType,
-								        ControlPart,
+                                        ControlPart,
                                         Rectangle aAreaRect,
                                         ControlState,
                                         const ImplControlValue&,
                                         const OUString& )
 {
-	Rectangle		pixmapRect = aAreaRect;
-	gboolean		interiorFocus;
-	gint			focusWidth;
-
-	NWEnsureGTKEditBox( nScreen );
-
-	// Grab some entry style attributes
-	gtk_widget_style_get( gWidgetData[nScreen].gEditBoxWidget,
-                                	"focus-line-width",	&focusWidth,
-					 				"interior-focus",	&interiorFocus, (char *)NULL );
+    Rectangle       pixmapRect = aAreaRect;
+    gboolean        interiorFocus;
+    gint            focusWidth;
 
-	if ( !interiorFocus )
-	{
-		pixmapRect.Move( -(focusWidth), -(focusWidth) );
+    NWEnsureGTKEditBox( nScreen );
+
+    // Grab some entry style attributes
+    gtk_widget_style_get( gWidgetData[nScreen].gEditBoxWidget,
+                                    "focus-line-width", &focusWidth,
+                                    "interior-focus",   &interiorFocus, (char *)NULL );
+
+    if ( !interiorFocus )
+    {
+        pixmapRect.Move( -(focusWidth), -(focusWidth) );
         pixmapRect.SetSize( Size( pixmapRect.GetWidth() + (2*(focusWidth)),
                                   pixmapRect.GetHeight() + (2*(focusWidth)) ) );
-	}
+    }
 
-	return( pixmapRect );
+    return( pixmapRect );
 }
 
 
@@ -1899,67 +1904,66 @@
  * All coordinates should be local to the Pixmap, NOT
  * screen/window coordinates.
  */
-static void NWPaintOneEditBox(	int nScreen,
+static void NWPaintOneEditBox(  int nScreen,
                                 GdkDrawable * gdkDrawable,
-                                GdkRectangle *	gdkRect,
-                                ControlType			nType,
+                                GdkRectangle *  gdkRect,
+                                ControlType         nType,
                                 ControlPart,
-                                Rectangle				aEditBoxRect,
-                                ControlState			nState,
+                                Rectangle               aEditBoxRect,
+                                ControlState            nState,
                                 const ImplControlValue&,
                                 const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	GtkWidget      *widget;
-
-	NWEnsureGTKButton( nScreen );
-	NWEnsureGTKEditBox( nScreen );
-	NWEnsureGTKSpinButton( nScreen );
-	NWEnsureGTKCombo( nScreen );
-	NWEnsureGTKScrolledWindow( nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    GtkWidget      *widget;
+
+    NWEnsureGTKButton( nScreen );
+    NWEnsureGTKEditBox( nScreen );
+    NWEnsureGTKSpinButton( nScreen );
+    NWEnsureGTKComboBoxEntry( nScreen );
+    NWEnsureGTKScrolledWindow( nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
 
     /* border's shadowType for gtk entries is always GTK_SHADOW_IN (see gtkentry.c)
     shadowType = GTK_SHADOW_IN;
     */
     
-	switch ( nType )
-	{
-		case CTRL_SPINBOX:
-			widget = gWidgetData[nScreen].gSpinButtonWidget;
-			break;
-
+    switch ( nType )
+    {
+        case CTRL_SPINBOX:
+            widget = gWidgetData[nScreen].gSpinButtonWidget;
+            break;
         case CTRL_MULTILINE_EDITBOX:
             widget = gWidgetData[nScreen].gScrolledWindowWidget;
             break;
-		case CTRL_COMBOBOX:
-			widget = GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry;
-			break;
-
-		default:
-			widget = gWidgetData[nScreen].gEditBoxWidget;
-			break;
-	}
+        case CTRL_LISTBOX:
+        case CTRL_COMBOBOX:
+            widget = gWidgetData[nScreen].gComboBoxEntry_EntryWidget;
+            break;
+        default:
+            widget = gWidgetData[nScreen].gEditBoxWidget;
+            break;
+    }
 
-	if ( stateType == GTK_STATE_PRELIGHT )
-		stateType = GTK_STATE_NORMAL;
+    if ( stateType == GTK_STATE_PRELIGHT )
+        stateType = GTK_STATE_NORMAL;
 
-	// Blueprint needs to paint entry_bg with a Button widget, not an Entry widget to get
-	// a nice white (or whatever default color) background
+    // Blueprint needs to paint entry_bg with a Button widget, not an Entry widget to get
+    // a nice white (or whatever default color) background
     GtkWidget* pBGWidget = widget;
     if( GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround )
     {
         NWSetWidgetState( gWidgetData[nScreen].gBtnWidget, nState, stateType );
         pBGWidget = gWidgetData[nScreen].gBtnWidget;
     }
-	NWSetWidgetState( widget, nState, stateType );
+    NWSetWidgetState( widget, nState, stateType );
 
-	gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE, 
+    gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE, 
                         gdkRect, pBGWidget, "entry_bg",
                         aEditBoxRect.Left(), aEditBoxRect.Top(), 
                         aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
-	gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
+    gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
                       gdkRect, widget, "entry",
                       aEditBoxRect.Left(), aEditBoxRect.Top(), 
                       aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
@@ -2068,33 +2072,33 @@
 
 static Rectangle NWGetSpinButtonRect( int nScreen,
                                       ControlType,
-								      ControlPart			nPart,
-                                      Rectangle 			aAreaRect,
+                                      ControlPart           nPart,
+                                      Rectangle             aAreaRect,
                                       ControlState,
                                       const ImplControlValue&,
                                       const OUString& )
 {
-	gint			buttonSize;
-	Rectangle		buttonRect;
+    gint            buttonSize;
+    Rectangle       buttonRect;
 
-	NWEnsureGTKSpinButton( nScreen );
+    NWEnsureGTKSpinButton( nScreen );
 
-	buttonSize = MAX( PANGO_PIXELS( pango_font_description_get_size(GTK_WIDGET(gWidgetData[nScreen].gSpinButtonWidget)->style->font_desc) ),
-				   MIN_SPIN_ARROW_WIDTH );
-	buttonSize -= buttonSize % 2 - 1; /* force odd */
-	buttonRect.SetSize( Size( buttonSize + 2 * gWidgetData[nScreen].gSpinButtonWidget->style->xthickness,
+    buttonSize = MAX( PANGO_PIXELS( pango_font_description_get_size(GTK_WIDGET(gWidgetData[nScreen].gSpinButtonWidget)->style->font_desc) ),
+                   MIN_SPIN_ARROW_WIDTH );
+    buttonSize -= buttonSize % 2 - 1; /* force odd */
+    buttonRect.SetSize( Size( buttonSize + 2 * gWidgetData[nScreen].gSpinButtonWidget->style->xthickness,
                               buttonRect.GetHeight() ) );
-	buttonRect.setX( aAreaRect.Left() + (aAreaRect.GetWidth() - buttonRect.GetWidth()) );
-	if ( nPart == PART_BUTTON_UP )
-	{
-		buttonRect.setY( aAreaRect.Top() );
-		buttonRect.Bottom() = buttonRect.Top() + (aAreaRect.GetHeight() / 2);
-	}
-	else if( nPart == PART_BUTTON_DOWN )
-	{
-		buttonRect.setY( aAreaRect.Top() + (aAreaRect.GetHeight() / 2) );
-		buttonRect.Bottom() = aAreaRect.Bottom(); // cover area completely
-	}
+    buttonRect.setX( aAreaRect.Left() + (aAreaRect.GetWidth() - buttonRect.GetWidth()) );
+    if ( nPart == PART_BUTTON_UP )
+    {
+        buttonRect.setY( aAreaRect.Top() );
+        buttonRect.Bottom() = buttonRect.Top() + (aAreaRect.GetHeight() / 2);
+    }
+    else if( nPart == PART_BUTTON_DOWN )
+    {
+        buttonRect.setY( aAreaRect.Top() + (aAreaRect.GetHeight() / 2) );
+        buttonRect.Bottom() = aAreaRect.Bottom(); // cover area completely
+    }
     else
     {
         buttonRect.Right()  = buttonRect.Left()-1;
@@ -2103,7 +2107,7 @@
         buttonRect.Bottom() = aAreaRect.Bottom();
     }
 
-	return( buttonRect );
+    return( buttonRect );
 }
 
 //---
@@ -2137,22 +2141,24 @@
 	arrowSize = (buttonRect.GetWidth() - (2 * gWidgetData[nScreen].gSpinButtonWidget->style->xthickness)) - 4;
 	arrowSize -= arrowSize % 2 - 1; /* force odd */
     arrowRect.SetSize( Size( arrowSize, arrowSize ) );
-	arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 );
-	if ( nPart == PART_BUTTON_UP )
-		arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 + 1);
-	else
-		arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
+    arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 );
+    if ( nPart == PART_BUTTON_UP )
+        arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 + 1);
+    else
+        arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
 
-	gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
-			"spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, TRUE,
-			(arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
-			arrowRect.GetWidth(), arrowRect.GetHeight() );
+    gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+            "spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, TRUE,
+            (arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
+            arrowRect.GetWidth(), arrowRect.GetHeight() );
 }
 
 
 //-------------------------------------
 
-BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
+#define ARROW_EXTENT        0.7
+
+BOOL GtkSalGraphics::NWPaintGTKComboBoxEntry( GdkDrawable* gdkDrawable,
                                          ControlType nType, ControlPart nPart,
                                          const Rectangle& rControlRectangle,
                                          const clipList& rClipList,
@@ -2160,40 +2166,37 @@
                                          const ImplControlValue& aValue,
                                          const OUString& rCaption )
 {
-	Rectangle		pixmapRect;
-	Rectangle		buttonRect;
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	Rectangle		arrowRect;
-    gint			x,y;
-    GdkRectangle	clipRect;
-
-	NWEnsureGTKButton( m_nScreen );
-	NWEnsureGTKArrow( m_nScreen );
-	NWEnsureGTKCombo( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    Rectangle       pixmapRect;
+    Rectangle       buttonRect;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    Rectangle       arrowRect;
+    gint            x,y;
+    GdkRectangle    clipRect;
 
-	// Find the overall bounding rect of the buttons's drawing area,
-	// plus its actual draw rect excluding adornment
-	pixmapRect = rControlRectangle;
+    NWEnsureGTKButton( m_nScreen );
+    NWEnsureGTKComboBoxEntry( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+
+    // Find the overall bounding rect of the buttons's drawing area,
+    // plus its actual draw rect excluding adornment
+    pixmapRect = rControlRectangle;
     x = rControlRectangle.Left();
     y = rControlRectangle.Top();
 
-	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gComboWidget, nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gArrowWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gComboBoxEntryWidget, nState, stateType );
 
-    buttonRect = NWGetComboBoxButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rCaption );
+    buttonRect = NWGetComboBoxEntryButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rCaption );
     if( nPart == PART_BUTTON_DOWN )
         buttonRect.Left() += 1;
 
-	Rectangle		aEditBoxRect( pixmapRect );
-	aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
+    Rectangle       aEditBoxRect( pixmapRect );
+    aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
 
-    #define ARROW_EXTENT		0.7
-	arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
-	                         (gint)(MIN_ARROW_SIZE * ARROW_EXTENT) ) );
-	arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
+    arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
+                             (gint)(MIN_ARROW_SIZE * ARROW_EXTENT) ) );
+    arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
                              buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) );
 
     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
@@ -2213,48 +2216,163 @@
                             x+(buttonRect.Left() - pixmapRect.Left()), 
                             y+(buttonRect.Top() - pixmapRect.Top()),
                             buttonRect.GetWidth(), buttonRect.GetHeight() );
-        gtk_paint_box( GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button->style, gdkDrawable, stateType, shadowType,
-                       &clipRect, GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button, "button",
+        gtk_paint_box( gWidgetData[m_nScreen].gComboBoxEntry_ButtonWidget->style, gdkDrawable, stateType, shadowType,
+                       &clipRect, gWidgetData[m_nScreen].gComboBoxEntry_ButtonWidget, "button",
                        x+(buttonRect.Left() - pixmapRect.Left()), 
                        y+(buttonRect.Top() - pixmapRect.Top()),
                        buttonRect.GetWidth(), buttonRect.GetHeight() );
 
-        gtk_paint_arrow( gWidgetData[m_nScreen].gArrowWidget->style, gdkDrawable, stateType, shadowType,
-                         &clipRect, gWidgetData[m_nScreen].gArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+        gtk_paint_arrow( gWidgetData[m_nScreen].gComboBoxEntry_ArrowWidget->style, gdkDrawable, stateType, shadowType,
+                         &clipRect, gWidgetData[m_nScreen].gComboBoxEntry_ArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
                          x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
                          arrowRect.GetWidth(), arrowRect.GetHeight() );
     }
     
-	return( TRUE );
+    return( TRUE );
+}
+
+BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
+                                         ControlType nType, ControlPart nPart,
+                                         const Rectangle& rControlRectangle,
+                                         const clipList& rClipList,
+                                         ControlState nState, 
+                                         const ImplControlValue& aValue,
+                                         const OUString& rCaption )
+{
+    Rectangle       pixmapRect;
+    Rectangle       buttonRect;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    Rectangle       arrowRect;
+    gint            x,y;
+    GdkRectangle    clipRect;
+
+    NWEnsureGTKButton( m_nScreen );
+    NWEnsureGTKComboBox( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+
+    // Find the overall bounding rect of the buttons's drawing area,
+    // plus its actual draw rect excluding adornment
+    pixmapRect = rControlRectangle;
+    if ( nPart == PART_WINDOW )
+    {
+        // Make the widget a _bit_ bigger
+        pixmapRect.SetPos( Point( pixmapRect.Left() - 1,
+                                  pixmapRect.Top() - 1 ) );
+        pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 2,
+                                  pixmapRect.GetHeight() + 2 ) );
+    }
+    x = pixmapRect.Left();
+    y = pixmapRect.Top();
+
+    NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gComboBoxWidget, nState, stateType );
+
+    buttonRect = NWGetComboBoxButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rCaption );
+    if( nPart == PART_BUTTON_DOWN )
+        buttonRect.Left() += 1;
+
+    arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
+                             (gint)(MIN_ARROW_SIZE * ARROW_EXTENT) ) );
+    arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2),
+                             buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) );
+
+    for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
+    {
+        clipRect.x = it->Left();
+        clipRect.y = it->Top();
+        clipRect.width = it->GetWidth();
+        clipRect.height = it->GetHeight();
+        
+        if ( nPart != PART_WINDOW )
+        {
+            // Buttons must paint opaque since some themes have alpha-channel enabled buttons
+            gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
+                                &clipRect, m_pWindow, "base", 
+                                x+(pixmapRect.Left() - pixmapRect.Left()), 
+                                y+(pixmapRect.Top() - pixmapRect.Top()),
+                                pixmapRect.GetWidth(), pixmapRect.GetHeight() );
+
+            gtk_paint_box( gWidgetData[m_nScreen].gComboBox_ButtonWidget->style, gdkDrawable, stateType, shadowType,
+                           &clipRect, gWidgetData[m_nScreen].gComboBox_ButtonWidget, "button",
+                           x+(pixmapRect.Left() - pixmapRect.Left()), 
+                           y+(pixmapRect.Top() - pixmapRect.Top()),
+                           pixmapRect.GetWidth(), pixmapRect.GetHeight() );
+
+            gtk_paint_arrow( gWidgetData[m_nScreen].gComboBox_ArrowWidget->style, gdkDrawable, stateType, shadowType,
+                             &clipRect, gWidgetData[m_nScreen].gComboBox_ArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
+                             x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
+                             arrowRect.GetWidth(), arrowRect.GetHeight() );
+
+            if (gWidgetData[m_nScreen].gComboBox_SeparatorWidget)
+            {
+                gint nSeparatorWidth;
+                gboolean bWideSeparators;
+                gtk_widget_style_get(gWidgetData[m_nScreen].gComboBox_SeparatorWidget,
+                    "wide-separators", &bWideSeparators,
+                    "separator-width", &nSeparatorWidth,
+                    NULL);
+
+                if (bWideSeparators)
+                {
+                    gtk_paint_box(gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style,
+                        gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_ETCHED_OUT,
+                        &clipRect, gWidgetData[m_nScreen].gComboBox_SeparatorWidget,
+                        "vseparator", x+(arrowRect.Left() - pixmapRect.Left()-nSeparatorWidth),
+                        y+(arrowRect.Top() - pixmapRect.Top()), nSeparatorWidth, arrowRect.GetHeight());
+                }
+                else
+                {
+                    gtk_paint_vline(gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style,
+                        gdkDrawable, GTK_STATE_NORMAL, &clipRect,
+                        gWidgetData[m_nScreen].gComboBox_SeparatorWidget, "vseparator",
+                        y+(arrowRect.Top() - pixmapRect.Top()), y+(arrowRect.Top() - pixmapRect.Top()) + arrowRect.GetHeight(),
+                        x+(arrowRect.Left() - pixmapRect.Left())-
+                            gWidgetData[m_nScreen].gComboBox_SeparatorWidget->style->xthickness);
+                }
+            }
+        }
+        else
+        {
+            NWEnsureGTKScrolledWindow(m_nScreen);
+
+            gtk_paint_shadow( gWidgetData[m_nScreen].gScrolledWindowWidget->style, gdkDrawable,
+                GTK_STATE_NORMAL, GTK_SHADOW_IN, &clipRect,
+                gWidgetData[m_nScreen].gScrolledWindowWidget, "scrolled_window",
+                x, y, pixmapRect.GetWidth(), pixmapRect.GetHeight() );
+        }
+    }
+    
+    return( TRUE );
 }
 
 //----
 
-static Rectangle NWGetComboBoxButtonRect( int nScreen,
+static Rectangle NWGetComboBoxEntryButtonRect( int nScreen,
                                           ControlType,
-									      ControlPart nPart,
-                                          Rectangle				aAreaRect,
+                                          ControlPart nPart,
+                                          Rectangle             aAreaRect,
                                           ControlState,
                                           const ImplControlValue&,
                                           const OUString& )
 {
-	Rectangle	aButtonRect;
-	gint		nArrowWidth;
+    Rectangle   aButtonRect;
+    gint        nArrowWidth;
     gint        nButtonWidth;
-	gint		nFocusWidth;
-	gint		nFocusPad;
+    gint        nFocusWidth;
+    gint        nFocusPad;
 
-	NWEnsureGTKArrow( nScreen );
+    NWEnsureGTKComboBoxEntry ( nScreen );
 
-	// Grab some button style attributes
-	gtk_widget_style_get( gWidgetData[nScreen].gDropdownWidget,
-                                  	"focus-line-width",	&nFocusWidth,
-									"focus-padding", 	&nFocusPad, (char *)NULL );
+    // Grab some button style attributes
+    gtk_widget_style_get( gWidgetData[nScreen].gComboBoxEntry_ButtonWidget,
+                                    "focus-line-width", &nFocusWidth,
+                                    "focus-padding",    &nFocusPad, (char *)NULL );
 
-	nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gArrowWidget)->xpad * 2);
+    nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gComboBoxEntry_ArrowWidget)->xpad * 2);
     nButtonWidth = nArrowWidth +
-                   ((BTN_CHILD_SPACING + gWidgetData[nScreen].gDropdownWidget->style->xthickness) * 2)
-				   + (2 * (nFocusWidth+nFocusPad));
+                   ((BTN_CHILD_SPACING + gWidgetData[nScreen].gComboBoxEntry_ButtonWidget->style->xthickness) * 2)
+                   + (2 * (nFocusWidth+nFocusPad));
     if( nPart == PART_BUTTON_DOWN )
     {
         aButtonRect.SetSize( Size( nButtonWidth, aAreaRect.GetHeight() ) );
@@ -2263,13 +2381,11 @@
     }
     else if( nPart == PART_SUB_EDIT )
     {
-        NWEnsureGTKCombo( nScreen );
-        
-        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
+        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboBoxEntryWidget)->border_width +
                         nFocusWidth +
                         nFocusPad;
-        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboWidget->style->ythickness;
-        adjust_x     += gWidgetData[nScreen].gComboWidget->style->xthickness;
+        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboBoxEntryWidget->style->ythickness;
+        adjust_x     += gWidgetData[nScreen].gComboBoxEntryWidget->style->xthickness;
         aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
                                    aAreaRect.GetHeight() - 2 * adjust_y ) );
         Point aEditPos = aAreaRect.TopLeft();
@@ -2281,22 +2397,86 @@
 	return( aButtonRect );
 }
 
-//-------------------------------------
+static Rectangle NWGetComboBoxButtonRect( int nScreen,
+                                          ControlType,
+                                          ControlPart nPart,
+                                          Rectangle             aAreaRect,
+                                          ControlState,
+                                          const ImplControlValue&,
+                                          const OUString& )
+{
+    Rectangle   aButtonRect;
+    gint        nArrowWidth;
+    gint        nButtonWidth;
+    gint        nFocusWidth;
+    gint        nFocusPad;
 
+    NWEnsureGTKComboBox ( nScreen );
+    // Grab some button style attributes
+    gtk_widget_style_get( gWidgetData[nScreen].gComboBox_ButtonWidget,
+                                    "focus-line-width", &nFocusWidth,
+                                    "focus-padding",    &nFocusPad, (char *)NULL );
 
-    
-BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
-                                        const Rectangle& rControlRectangle,
-                                        const clipList&,
-                                        ControlState nState, 
-                                        const ImplControlValue& aValue,
-                                        const OUString& )
-{
-    OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
-	GdkPixmap *	pixmap;
-	Rectangle		pixmapRect;
-	Rectangle		tabRect;
-	GtkStateType	stateType;
+    nArrowWidth = MIN_ARROW_SIZE + (GTK_MISC(gWidgetData[nScreen].gComboBox_ArrowWidget)->xpad * 2);
+
+    gint nSeparatorWidth = 0;
+    if (gWidgetData[nScreen].gComboBox_SeparatorWidget)
+    {
+        gboolean bWideSeparators;
+        gtk_widget_style_get(gWidgetData[nScreen].gComboBox_SeparatorWidget,
+                             "wide-separators", &bWideSeparators,
+                             "separator-width", &nSeparatorWidth,
+                             NULL);
+
+        if (!bWideSeparators)
+            nSeparatorWidth = gWidgetData[nScreen].gComboBox_SeparatorWidget->style->xthickness;
+    }
+
+    nButtonWidth = nArrowWidth + nSeparatorWidth +
+                   + gWidgetData[nScreen].gComboBox_ButtonWidget->style->xthickness
+                   + (nFocusWidth+nFocusPad);
+
+    if( nPart == PART_BUTTON_DOWN )
+    {
+        aButtonRect.SetSize( Size( nButtonWidth, aAreaRect.GetHeight() ) );
+        aButtonRect.SetPos( Point( aAreaRect.Left() + aAreaRect.GetWidth() - nButtonWidth,
+                                   aAreaRect.Top() ) );
+    }
+    else if( nPart == PART_SUB_EDIT )
+    {
+        gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboBoxWidget)->border_width +
+                        nFocusWidth +
+                        nFocusPad;
+        gint adjust_y = adjust_x + gWidgetData[nScreen].gComboBoxWidget->style->ythickness;
+        adjust_x     += gWidgetData[nScreen].gComboBoxWidget->style->xthickness;
+        aButtonRect.SetSize( Size( aAreaRect.GetWidth() - nButtonWidth - 2 * adjust_x,
+                                   aAreaRect.GetHeight() - 2 * adjust_y ) );
+        Point aEditPos = aAreaRect.TopLeft();
+        aEditPos.X() += adjust_x;
+        aEditPos.Y() += adjust_y;
+        aButtonRect.SetPos( aEditPos );
+    }
+
+    return( aButtonRect );
+}
+
+
+//-------------------------------------
+
+
+    
+BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
+                                        const Rectangle& rControlRectangle,
+                                        const clipList&,
+                                        ControlState nState, 
+                                        const ImplControlValue& aValue,
+                                        const OUString& )
+{
+    OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
+	GdkPixmap *	pixmap;
+	Rectangle		pixmapRect;
+	Rectangle		tabRect;
+	GtkStateType	stateType;
 	GtkShadowType	shadowType;
     if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
     {
@@ -2366,7 +2546,7 @@
     }
 
         
-//	gtk_widget_set_state( gWidgetData[m_nScreen].gNotebookWidget, stateType );
+//  gtk_widget_set_state( gWidgetData[m_nScreen].gNotebookWidget, stateType );
 
     pixmap = gdk_pixmap_new( NULL, pixmapRect.GetWidth(), pixmapRect.GetHeight(), 
                              GetX11SalData()->GetDisplay()->GetVisual( m_nScreen ).GetDepth() );
@@ -2376,42 +2556,42 @@
     paintRect.height = pixmapRect.GetHeight();
                              
     gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL, 
-		                GTK_SHADOW_NONE, &paintRect, m_pWindow, "base", 0, 0, -1, -1);
+                        GTK_SHADOW_NONE, &paintRect, m_pWindow, "base", 0, 0, -1, -1);
 
-	NWSetWidgetState( gWidgetData[m_nScreen].gNotebookWidget, nState, stateType );
+    NWSetWidgetState( gWidgetData[m_nScreen].gNotebookWidget, nState, stateType );
     
-	switch( nType )
-	{
-		case CTRL_TAB_BODY:
-			break;
+    switch( nType )
+    {
+        case CTRL_TAB_BODY:
+            break;
 
-		case CTRL_FIXEDBORDER:
-		case CTRL_TAB_PANE:
-			gtk_paint_box_gap( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
-				(char *)"notebook", 0, 0, pixmapRect.GetWidth(), pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
-			break;
-
-		case CTRL_TAB_ITEM:
-			stateType = ( nState & CTRL_STATE_SELECTED ) ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE;
-
-			gtk_paint_extension( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
-				(char *)"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
-				tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
-
-			if ( nState & CTRL_STATE_SELECTED )
-			{
-				gtk_paint_flat_box( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
-					(char *)"base", 0, (pixmapRect.GetHeight() - 1), pixmapRect.GetWidth(), 1 );
-			}
-			break;
+        case CTRL_FIXEDBORDER:
+        case CTRL_TAB_PANE:
+            gtk_paint_box_gap( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
+                (char *)"notebook", 0, 0, pixmapRect.GetWidth(), pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
+            break;
 
-		default:
-			break;
-	}
+        case CTRL_TAB_ITEM:
+            stateType = ( nState & CTRL_STATE_SELECTED ) ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE;
+
+            gtk_paint_extension( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nScreen].gNotebookWidget,
+                (char *)"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
+                tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
+
+            if ( nState & CTRL_STATE_SELECTED )
+            {
+                gtk_paint_flat_box( gWidgetData[m_nScreen].gNotebookWidget->style, pixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
+                    (char *)"base", 0, (pixmapRect.GetHeight() - 1), pixmapRect.GetWidth(), 1 );
+            }
+            break;
+
+        default:
+            break;
+    }
 
-	// Crux seems to think it can make the pane without a left edge
-	if ( nType == CTRL_FIXEDBORDER )
-		pixmapRect.Move( 1, 0 );
+    // Crux seems to think it can make the pane without a left edge
+    if ( nType == CTRL_FIXEDBORDER )
+        pixmapRect.Move( 1, 0 );
 
     // cache data
     if( nType == CTRL_TAB_ITEM )
@@ -2419,152 +2599,65 @@
     else
         aCachePage.Fill( nType, nState, pixmapRect, pixmap );
         
-	BOOL bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
-	g_object_unref( pixmap );
-	return bSuccess;
+    BOOL bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
+    g_object_unref( pixmap );
+    return bSuccess;
 }
 
-//-------------------------------------
-
-BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
-                                        ControlType nType, ControlPart nPart,
-                                        const Rectangle& rControlRectangle,
-                                        const clipList& rClipList,
-                                        ControlState nState, 
-                                        const ImplControlValue& aValue,
-                                        const OUString& rCaption )
+static void set_widget_orientation(GtkWidget *widget, GtkOrientation orientation)
 {
-	Rectangle		pixmapRect;
-	Rectangle		widgetRect;
-	Rectangle		aIndicatorRect;
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	gint			bInteriorFocus;
-	gint			nFocusLineWidth;
-	gint			nFocusPadding;
-    gint			x,y;
-    GdkRectangle    clipRect;
-
-	NWEnsureGTKButton( m_nScreen );
-	NWEnsureGTKOptionMenu( m_nScreen );
-	NWEnsureGTKScrolledWindow( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
-
-	// Find the overall bounding rect of the buttons's drawing area,
-	// plus its actual draw rect excluding adornment
-	pixmapRect = rControlRectangle;
-	if ( nPart == PART_WINDOW )
-	{
-		// Make the widget a _bit_ bigger
-		pixmapRect.SetPos( Point( pixmapRect.Left() - 1,
-                                  pixmapRect.Top() - 1 ) );
-		pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 2,
-		                          pixmapRect.GetHeight() + 2 ) );
-	}
-
-	widgetRect = pixmapRect;
-    x = pixmapRect.Left();
-    y = pixmapRect.Top();
-
-    // set up references to correct drawable and cliprect
-	NWSetWidgetState( gWidgetData[m_nScreen].gBtnWidget, nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gOptionMenuWidget, nState, stateType );
-	NWSetWidgetState( gWidgetData[m_nScreen].gScrolledWindowWidget, nState, stateType );
-
-	if ( nPart != PART_WINDOW )
-	{
-		gtk_widget_style_get( gWidgetData[m_nScreen].gOptionMenuWidget,
-			"interior_focus",	&bInteriorFocus,
-			"focus_line_width",	&nFocusLineWidth,
-			"focus_padding",	&nFocusPadding,
-			(char *)NULL);
-    }
-    
-    for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
-    {
-        clipRect.x = it->Left();
-        clipRect.y = it->Top();
-        clipRect.width = it->GetWidth();
-        clipRect.height = it->GetHeight();
-    
-        if ( nPart != PART_WINDOW )
-        {
-            // Listboxes must paint opaque since some themes have alpha-channel enabled bodies
-            gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
-                                &clipRect, m_pWindow, "base", x, y, 
-                                pixmapRect.GetWidth(), pixmapRect.GetHeight() );
-            gtk_paint_box( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,
-                           gWidgetData[m_nScreen].gOptionMenuWidget, "optionmenu",
-                           x+(widgetRect.Left() - pixmapRect.Left()), 
-                           y+(widgetRect.Top() - pixmapRect.Top()),
-                           widgetRect.GetWidth(), widgetRect.GetHeight() );
-            aIndicatorRect = NWGetListBoxIndicatorRect( m_nScreen, nType, nPart, widgetRect, nState, 
-                                                        aValue, rCaption );
-            gtk_paint_tab( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,
-                           gWidgetData[m_nScreen].gOptionMenuWidget, "optionmenutab",
-                           x+(aIndicatorRect.Left() - pixmapRect.Left()), 
-                           y+(aIndicatorRect.Top() - pixmapRect.Top()),
-                           aIndicatorRect.GetWidth(), aIndicatorRect.GetHeight() );
-        }
-        else
-        {
-            shadowType = GTK_SHADOW_IN;
-        
-            gtk_paint_shadow( gWidgetData[m_nScreen].gScrolledWindowWidget->style, gdkDrawable, GTK_STATE_NORMAL, shadowType,
-                &clipRect, gWidgetData[m_nScreen].gScrolledWindowWidget, "scrolled_window",
-                x+(widgetRect.Left() - pixmapRect.Left()), y+(widgetRect.Top() - pixmapRect.Top()),
-                widgetRect.GetWidth(), widgetRect.GetHeight() );
-        }
-    }
-    
-	return( TRUE );
+#if GTK_CHECK_VERSION(2,90,0)
+    gtk_orientable_set_orientation( GTK_ORIENTABLE(widget), orientation );
+#else
+    gtk_toolbar_set_orientation( GTK_TOOLBAR(widget), orientation );
+#endif
 }
 
 BOOL GtkSalGraphics::NWPaintGTKToolbar(
             GdkDrawable* gdkDrawable,
             ControlType, ControlPart nPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList& rClipList,
             ControlState nState, const ImplControlValue& aValue,
 			const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	gint			x, y, w, h;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    gint            x, y, w, h;
     gint            g_x=0, g_y=0, g_w=10, g_h=10;
     bool            bPaintButton = true;
     GtkWidget*      pButtonWidget = gWidgetData[m_nScreen].gToolbarButtonWidget;
     const gchar*    pButtonDetail = "button";
-    GdkRectangle	clipRect;
+    GdkRectangle    clipRect;
     
-	NWEnsureGTKToolbar( m_nScreen );
+    NWEnsureGTKToolbar( m_nScreen );
     if( nPart == PART_BUTTON ) // toolbar buttons cannot focus in gtk
         nState &= ~CTRL_STATE_FOCUSED;
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
     
-	x = rControlRectangle.Left();
+    x = rControlRectangle.Left();
     y = rControlRectangle.Top();
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
     // handle toolbar
     if( nPart == PART_DRAW_BACKGROUND_HORZ || nPart == PART_DRAW_BACKGROUND_VERT )
     {
-	    NWSetWidgetState( gWidgetData[m_nScreen].gToolbarWidget, nState, stateType );
+        NWSetWidgetState( gWidgetData[m_nScreen].gToolbarWidget, nState, stateType );
 
         GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gToolbarWidget, GTK_SENSITIVE );
         if ( nState & CTRL_STATE_ENABLED )
             GTK_WIDGET_SET_FLAGS( gWidgetData[m_nScreen].gToolbarWidget, GTK_SENSITIVE );
 
         if( nPart == PART_DRAW_BACKGROUND_HORZ )
-            gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_HORIZONTAL );
+            set_widget_orientation( gWidgetData[m_nScreen].gToolbarWidget, GTK_ORIENTATION_HORIZONTAL );
         else
-            gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_VERTICAL );
+            set_widget_orientation( gWidgetData[m_nScreen].gToolbarWidget, GTK_ORIENTATION_VERTICAL );
     }        
     // handle grip
     else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
     {
-	    NWSetWidgetState( gWidgetData[m_nScreen].gHandleBoxWidget, nState, stateType );
+        NWSetWidgetState( gWidgetData[m_nScreen].gHandleBoxWidget, nState, stateType );
 
         GTK_WIDGET_UNSET_FLAGS( gWidgetData[m_nScreen].gHandleBoxWidget, GTK_SENSITIVE );
         if ( nState & CTRL_STATE_ENABLED )
@@ -2588,7 +2681,7 @@
         bPaintButton =
             (GTK_BUTTON(pButtonWidget)->relief != GTK_RELIEF_NONE)
             || (nState & CTRL_STATE_PRESSED)
-		    || (nState & CTRL_STATE_ROLLOVER); 
+            || (nState & CTRL_STATE_ROLLOVER); 
         if( aValue.getTristateVal() == BUTTONVALUE_ON )
         {
             pButtonWidget = gWidgetData[m_nScreen].gToolbarToggleWidget;
@@ -2662,7 +2755,7 @@
         }
     }
     
-	return( TRUE );
+    return( TRUE );
 }
 
 //----
@@ -2670,24 +2763,24 @@
 BOOL GtkSalGraphics::NWPaintGTKMenubar(
             GdkDrawable* gdkDrawable,
             ControlType, ControlPart nPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList& rClipList,
             ControlState nState, const ImplControlValue&,
 			const OUString& )
 {
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
     GtkShadowType   selected_shadow_type = GTK_SHADOW_OUT;
-	gint			x, y, w, h;
-    GdkRectangle	clipRect;
+    gint            x, y, w, h;
+    GdkRectangle    clipRect;
     
-	NWEnsureGTKMenubar( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWEnsureGTKMenubar( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
     
-	x = rControlRectangle.Left();
+    x = rControlRectangle.Left();
     y = rControlRectangle.Top();
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
     if( nPart == PART_MENU_ITEM )
     {
@@ -2749,13 +2842,13 @@
         }
     }
     
-	return( TRUE );
+    return( TRUE );
 }
 
 BOOL GtkSalGraphics::NWPaintGTKPopupMenu(
             GdkDrawable* gdkDrawable,
             ControlType, ControlPart nPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList& rClipList,
             ControlState nState, const ImplControlValue&,
 			const OUString& )
@@ -2765,19 +2858,19 @@
     if( nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) )
         return FALSE;
     
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
     GtkShadowType   selected_shadow_type = GTK_SHADOW_OUT;
-	gint			x, y, w, h;
-    GdkRectangle	clipRect;
+    gint            x, y, w, h;
+    GdkRectangle    clipRect;
     
-	NWEnsureGTKMenu( m_nScreen );
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    NWEnsureGTKMenu( m_nScreen );
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
     
-	x = rControlRectangle.Left();
+    x = rControlRectangle.Left();
     y = rControlRectangle.Top();
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
     if( nPart == PART_MENU_ITEM &&
         ( nState & (CTRL_STATE_SELECTED|CTRL_STATE_ROLLOVER) ) )
@@ -2879,26 +2972,26 @@
         }
     }
     
-	return( TRUE );
+    return( TRUE );
 }
 
 BOOL GtkSalGraphics::NWPaintGTKTooltip(
             GdkDrawable* gdkDrawable,
             ControlType, ControlPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList& rClipList,
             ControlState, const ImplControlValue&,
 			const OUString& )
 {
     NWEnsureGTKTooltip( m_nScreen );
     
-	gint			x, y, w, h;
-    GdkRectangle	clipRect;
+    gint            x, y, w, h;
+    GdkRectangle    clipRect;
     
-	x = rControlRectangle.Left();
+    x = rControlRectangle.Left();
     y = rControlRectangle.Top();
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
     for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
     {
@@ -2917,13 +3010,13 @@
                             x, y, w, h );
     }
     
-	return( TRUE );
+    return( TRUE );
 }
 
 BOOL GtkSalGraphics::NWPaintGTKListNode(
             GdkDrawable*,
             ControlType, ControlPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList&,
             ControlState nState, const ImplControlValue& rValue,
 			const OUString& )
@@ -2935,13 +3028,13 @@
     aRect.Right() += 2;
     aRect.Top() -= 2;
     aRect.Bottom() += 2;
-	gint			w, h;
-	w = aRect.GetWidth();
-	h = aRect.GetHeight();
-
-	GtkStateType	stateType;
-	GtkShadowType	shadowType;
-	NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+    gint            w, h;
+    w = aRect.GetWidth();
+    h = aRect.GetHeight();
+
+    GtkStateType    stateType;
+    GtkShadowType   shadowType;
+    NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
 
     ButtonValue aButtonValue = rValue.getTristateVal();
     GtkExpanderStyle eStyle = GTK_EXPANDER_EXPANDED;
@@ -2968,25 +3061,25 @@
                         w/2, h/2,
                         eStyle );
 
-	BOOL bRet = NWRenderPixmapToScreen( pixmap, aRect );
+    BOOL bRet = NWRenderPixmapToScreen( pixmap, aRect );
     g_object_unref( pixmap );
 
-	return bRet;
+    return bRet;
 }
 
 BOOL GtkSalGraphics::NWPaintGTKProgress(
             GdkDrawable*,
             ControlType, ControlPart,
-			const Rectangle& rControlRectangle,
+            const Rectangle& rControlRectangle,
             const clipList&,
             ControlState, const ImplControlValue& rValue,
 			const OUString& )
 {
     NWEnsureGTKProgressBar( m_nScreen );
     
-	gint			w, h;
-	w = rControlRectangle.GetWidth();
-	h = rControlRectangle.GetHeight();
+    gint            w, h;
+    w = rControlRectangle.GetWidth();
+    h = rControlRectangle.GetHeight();
 
     long nProgressWidth = rValue.getNumericVal();
     
@@ -3158,120 +3251,10 @@
     }
     #endif
 
-	BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
+    BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
     g_object_unref( pixmap );
 
-	return bRet;
-}
-
-//----
-
-static Rectangle NWGetListBoxButtonRect( int nScreen,
-                                         ControlType,
-                                         ControlPart    nPart,
-                                         Rectangle      aAreaRect,
-                                         ControlState,
-                                         const ImplControlValue&,
-                                         const OUString& )
-{
-	Rectangle       aPartRect;
-	GtkRequisition *pIndicatorSize = NULL;
-	GtkBorder      *pIndicatorSpacing = NULL;
-	gint            width = 13;	// GTK+ default
-	gint            right = 5;	// GTK+ default
-	gint            nButtonAreaWidth = 0;
-    gint            xthickness = 0;
-
-	NWEnsureGTKOptionMenu( nScreen );
-
-	gtk_widget_style_get( gWidgetData[nScreen].gOptionMenuWidget,
-			"indicator_size",	&pIndicatorSize,
-			"indicator_spacing",&pIndicatorSpacing, (char *)NULL);
-	
-	if ( pIndicatorSize )
-		width = pIndicatorSize->width;
-
-	if ( pIndicatorSpacing )
-		right = pIndicatorSpacing->right;
-
-    Size aPartSize( 0, aAreaRect.GetHeight() );
-    Point aPartPos ( 0, aAreaRect.Top() );
-
-    xthickness = gWidgetData[nScreen].gOptionMenuWidget->style->xthickness;
-	nButtonAreaWidth = width + right + (xthickness * 2);
-	switch( nPart )
-	{
-		case PART_BUTTON_DOWN:
-			aPartSize.Width() = nButtonAreaWidth;
-			aPartPos.X() = aAreaRect.Left() + aAreaRect.GetWidth() - aPartSize.Width();
-			break;
-
-		case PART_SUB_EDIT:
-			aPartSize.Width() = aAreaRect.GetWidth() - nButtonAreaWidth - xthickness;
-			aPartPos.X() = aAreaRect.Left() + xthickness;
-			break;
-
-		default:
-			aPartSize.Width() = aAreaRect.GetWidth();	
-			aPartPos.X() = aAreaRect.Left();
-			break;
-	}
-    aPartRect = Rectangle( aPartPos, aPartSize );
-
-	if ( pIndicatorSize )
-		gtk_requisition_free( pIndicatorSize );
-	if ( pIndicatorSpacing )
-		gtk_border_free( pIndicatorSpacing );
-
-	return( aPartRect );
-}
-
-//----
-
-static Rectangle NWGetListBoxIndicatorRect( int nScreen,
-                                            ControlType,
-                                            ControlPart,
-                                            Rectangle				aAreaRect,
-                                            ControlState,
-                                            const ImplControlValue&,
-                                            const OUString& )
-{
-	Rectangle       aIndicatorRect;
-	GtkRequisition *pIndicatorSize = NULL;
-	GtkBorder      *pIndicatorSpacing = NULL;
-	gint            width = 13;	// GTK+ default
-	gint            height = 13;	// GTK+ default
-	gint            right = 5;	// GTK+ default
-
-	NWEnsureGTKOptionMenu( nScreen );
-
-	gtk_widget_style_get( gWidgetData[nScreen].gOptionMenuWidget,
-			"indicator_size",	&pIndicatorSize,
-			"indicator_spacing",&pIndicatorSpacing, (char *)NULL);
-	
-	if ( pIndicatorSize )
-    {
-		width = pIndicatorSize->width;
-		height = pIndicatorSize->height;
-    }
-
-	if ( pIndicatorSpacing )
-		right = pIndicatorSpacing->right;
-
-    aIndicatorRect.SetSize( Size( width, height ) );
-	aIndicatorRect.SetPos( Point( aAreaRect.Left() + aAreaRect.GetWidth() - width - right - gWidgetData[nScreen].gOptionMenuWidget->style->xthickness,
-                                  aAreaRect.Top() + ((aAreaRect.GetHeight() - height) / 2) ) );
-
-	// If height is odd, move the indicator down 1 pixel
-	if ( aIndicatorRect.GetHeight() % 2 )
-		aIndicatorRect.Move( 0, 1 );
-
-	if ( pIndicatorSize )
-		gtk_requisition_free( pIndicatorSize );
-	if ( pIndicatorSpacing )
-		gtk_border_free( pIndicatorSpacing );
-
-	return( aIndicatorRect );
+    return bRet;
 }
 
 static Rectangle NWGetToolbarRect(  int nScreen,
@@ -3477,7 +3460,7 @@
     // make the "light" color lighter than the menu color and the "shadow"
     // color darker than it.
     if ( aStyleSet.GetMenuColor().GetLuminance() >= 32 &&
-	 aStyleSet.GetMenuColor().GetLuminance() <= aStyleSet.GetMenuTextColor().GetLuminance() )
+     aStyleSet.GetMenuColor().GetLuminance() <= aStyleSet.GetMenuTextColor().GetLuminance() )
     {
       Color temp = aStyleSet.GetMenuColor();
       temp.IncreaseLuminance( 8 );
@@ -3495,10 +3478,10 @@
     aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor );
     
     // UI font
-    OString	aFamily		= pango_font_description_get_family( pStyle->font_desc );
-    int nPangoHeight	= pango_font_description_get_size( pStyle->font_desc );
-    PangoStyle	eStyle	= pango_font_description_get_style( pStyle->font_desc );
-    PangoWeight	eWeight	= pango_font_description_get_weight( pStyle->font_desc );
+    OString aFamily     = pango_font_description_get_family( pStyle->font_desc );
+    int nPangoHeight    = pango_font_description_get_size( pStyle->font_desc );
+    PangoStyle  eStyle  = pango_font_description_get_style( pStyle->font_desc );
+    PangoWeight eWeight = pango_font_description_get_weight( pStyle->font_desc );
     PangoStretch eStretch = pango_font_description_get_stretch( pStyle->font_desc );
     
     psp::FastPrintFontInfo aInfo;
@@ -3507,9 +3490,9 @@
     // set italic
     switch( eStyle )
     {
-        case PANGO_STYLE_NORMAL:	aInfo.m_eItalic = psp::italic::Upright;break;
-        case PANGO_STYLE_ITALIC:	aInfo.m_eItalic = psp::italic::Italic;break;
-        case PANGO_STYLE_OBLIQUE:	aInfo.m_eItalic = psp::italic::Oblique;break;
+        case PANGO_STYLE_NORMAL:    aInfo.m_eItalic = psp::italic::Upright;break;
+        case PANGO_STYLE_ITALIC:    aInfo.m_eItalic = psp::italic::Italic;break;
+        case PANGO_STYLE_OBLIQUE:   aInfo.m_eItalic = psp::italic::Oblique;break;
     }
     // set weight
     if( eWeight <= PANGO_WEIGHT_ULTRALIGHT )
@@ -3525,15 +3508,15 @@
     // set width
     switch( eStretch )
     {
-        case PANGO_STRETCH_ULTRA_CONDENSED:	aInfo.m_eWidth = psp::width::UltraCondensed;break;
-        case PANGO_STRETCH_EXTRA_CONDENSED:	aInfo.m_eWidth = psp::width::ExtraCondensed;break;
-        case PANGO_STRETCH_CONDENSED:		aInfo.m_eWidth = psp::width::Condensed;break;
-        case PANGO_STRETCH_SEMI_CONDENSED:	aInfo.m_eWidth = psp::width::SemiCondensed;break;
-        case PANGO_STRETCH_NORMAL:			aInfo.m_eWidth = psp::width::Normal;break;
-        case PANGO_STRETCH_SEMI_EXPANDED:	aInfo.m_eWidth = psp::width::SemiExpanded;break;
-        case PANGO_STRETCH_EXPANDED:		aInfo.m_eWidth = psp::width::Expanded;break;
-        case PANGO_STRETCH_EXTRA_EXPANDED:	aInfo.m_eWidth = psp::width::ExtraExpanded;break;
-        case PANGO_STRETCH_ULTRA_EXPANDED:	aInfo.m_eWidth = psp::width::UltraExpanded;break;
+        case PANGO_STRETCH_ULTRA_CONDENSED: aInfo.m_eWidth = psp::width::UltraCondensed;break;
+        case PANGO_STRETCH_EXTRA_CONDENSED: aInfo.m_eWidth = psp::width::ExtraCondensed;break;
+        case PANGO_STRETCH_CONDENSED:       aInfo.m_eWidth = psp::width::Condensed;break;
+        case PANGO_STRETCH_SEMI_CONDENSED:  aInfo.m_eWidth = psp::width::SemiCondensed;break;
+        case PANGO_STRETCH_NORMAL:          aInfo.m_eWidth = psp::width::Normal;break;
+        case PANGO_STRETCH_SEMI_EXPANDED:   aInfo.m_eWidth = psp::width::SemiExpanded;break;
+        case PANGO_STRETCH_EXPANDED:        aInfo.m_eWidth = psp::width::Expanded;break;
+        case PANGO_STRETCH_EXTRA_EXPANDED:  aInfo.m_eWidth = psp::width::ExtraExpanded;break;
+        case PANGO_STRETCH_ULTRA_EXPANDED:  aInfo.m_eWidth = psp::width::UltraExpanded;break;
     }
 
 #if OSL_DEBUG_LEVEL > 1
@@ -3627,18 +3610,18 @@
     g_free( pIconThemeName );
 
     //  FIXME: need some way of fetching toolbar icon size.
-//	aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
+//  aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
 
     const cairo_font_options_t* pNewOptions = NULL;
     if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
     {
 //#if !GTK_CHECK_VERSION(2,8,1)
 #if !GTK_CHECK_VERSION(2,9,0)
-	static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) = 
-		(cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
+    static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) = 
+        (cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
     if( gdk_screen_get_font_options != NULL )
 #endif
-		pNewOptions = gdk_screen_get_font_options( pScreen );
+        pNewOptions = gdk_screen_get_font_options( pScreen );
     }
     aStyleSet.SetCairoFontOptions( pNewOptions );
 
@@ -3698,8 +3681,8 @@
 GdkPixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect )
 {
     // Create a new pixmap to hold the composite of the window background and the control
-    GdkPixmap * pPixmap		= gdk_pixmap_new( GDK_DRAWABLE(GetGdkWindow()), srcRect.GetWidth(), srcRect.GetHeight(), -1 ); 
-	GdkGC *	 pPixmapGC	= gdk_gc_new( pPixmap );
+    GdkPixmap * pPixmap     = gdk_pixmap_new( GDK_DRAWABLE(GetGdkWindow()), srcRect.GetWidth(), srcRect.GetHeight(), -1 ); 
+    GdkGC *  pPixmapGC  = gdk_gc_new( pPixmap );
 
     if( !pPixmap || !pPixmapGC )
     {
@@ -3760,29 +3743,29 @@
  * State conversion
  ************************************************************************/
 static void NWConvertVCLStateToGTKState( ControlState nVCLState,
-			GtkStateType* nGTKState, GtkShadowType* nGTKShadow )
+            GtkStateType* nGTKState, GtkShadowType* nGTKShadow )
 {
-	*nGTKShadow = GTK_SHADOW_OUT;
-	*nGTKState = GTK_STATE_INSENSITIVE;
+    *nGTKShadow = GTK_SHADOW_OUT;
+    *nGTKState = GTK_STATE_INSENSITIVE;
 
-	if ( nVCLState & CTRL_STATE_ENABLED )
-	{
-		if ( nVCLState & CTRL_STATE_PRESSED )
-		{
-			*nGTKState = GTK_STATE_ACTIVE;
-			*nGTKShadow = GTK_SHADOW_IN;
-		}
-		else if ( nVCLState & CTRL_STATE_ROLLOVER )
-		{
-			*nGTKState = GTK_STATE_PRELIGHT;
-			*nGTKShadow = GTK_SHADOW_OUT;
-		}
-		else
-		{
-			*nGTKState = GTK_STATE_NORMAL;
-			*nGTKShadow = GTK_SHADOW_OUT;
-		}
-	}
+    if ( nVCLState & CTRL_STATE_ENABLED )
+    {
+        if ( nVCLState & CTRL_STATE_PRESSED )
+        {
+            *nGTKState = GTK_STATE_ACTIVE;
+            *nGTKShadow = GTK_SHADOW_IN;
+        }
+        else if ( nVCLState & CTRL_STATE_ROLLOVER )
+        {
+            *nGTKState = GTK_STATE_PRELIGHT;
+            *nGTKShadow = GTK_SHADOW_OUT;
+        }
+        else
+        {
+            *nGTKState = GTK_STATE_NORMAL;
+            *nGTKShadow = GTK_SHADOW_OUT;
+        }
+    }
 }
 
 /************************************************************************
@@ -3790,19 +3773,19 @@
  ************************************************************************/
 static void NWSetWidgetState( GtkWidget* widget, ControlState nState, GtkStateType nGtkState )
 {
-	// Set to default state, then build up from there
-	GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_DEFAULT );
-	GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_FOCUS );
-	GTK_WIDGET_UNSET_FLAGS( widget, GTK_SENSITIVE );
-	GTK_WIDGET_SET_FLAGS( widget, gWidgetDefaultFlags[(long)widget] );
-
-	if ( nState & CTRL_STATE_DEFAULT )
-		GTK_WIDGET_SET_FLAGS( widget, GTK_HAS_DEFAULT );
-	if ( !GTK_IS_TOGGLE_BUTTON(widget) && (nState & CTRL_STATE_FOCUSED) )
-		GTK_WIDGET_SET_FLAGS( widget, GTK_HAS_FOCUS );
-	if ( nState & CTRL_STATE_ENABLED )
-		GTK_WIDGET_SET_FLAGS( widget, GTK_SENSITIVE );
-	gtk_widget_set_state( widget, nGtkState );
+    // Set to default state, then build up from there
+    GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_DEFAULT );
+    GTK_WIDGET_UNSET_FLAGS( widget, GTK_HAS_FOCUS );
+    GTK_WIDGET_UNSET_FLAGS( widget, GTK_SENSITIVE );
+    GTK_WIDGET_SET_FLAGS( widget, gWidgetDefaultFlags[(long)widget] );
+
+    if ( nState & CTRL_STATE_DEFAULT )
+        GTK_WIDGET_SET_FLAGS( widget, GTK_HAS_DEFAULT );
+    if ( !GTK_IS_TOGGLE_BUTTON(widget) && (nState & CTRL_STATE_FOCUSED) )
+        GTK_WIDGET_SET_FLAGS( widget, GTK_HAS_FOCUS );
+    if ( nState & CTRL_STATE_ENABLED )
+        GTK_WIDGET_SET_FLAGS( widget, GTK_SENSITIVE );
+    gtk_widget_set_state( widget, nGtkState );
 }
 
 /************************************************************************
@@ -3814,179 +3797,279 @@
 static void NWAddWidgetToCacheWindow( GtkWidget* widget, int nScreen )
 {
     NWFWidgetData& rData = gWidgetData[nScreen];
-	if ( !rData.gCacheWindow || !rData.gDumbContainer )
-	{
-		if ( !rData.gCacheWindow )
+    if ( !rData.gCacheWindow || !rData.gDumbContainer )
+    {
+        if ( !rData.gCacheWindow )
         {
-			rData.gCacheWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+            rData.gCacheWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
             GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), nScreen );
             if( pScreen )
                 gtk_window_set_screen( GTK_WINDOW(rData.gCacheWindow), pScreen );
         }
-		if ( !rData.gDumbContainer )
-			rData.gDumbContainer = gtk_fixed_new();
-		gtk_container_add( GTK_CONTAINER(rData.gCacheWindow), rData.gDumbContainer );
-		gtk_widget_realize( rData.gDumbContainer );
-		gtk_widget_realize( rData.gCacheWindow );
-	}
+        if ( !rData.gDumbContainer )
+            rData.gDumbContainer = gtk_fixed_new();
+        gtk_container_add( GTK_CONTAINER(rData.gCacheWindow), rData.gDumbContainer );
+        gtk_widget_realize( rData.gDumbContainer );
+        gtk_widget_realize( rData.gCacheWindow );
+    }
 
-	gtk_container_add( GTK_CONTAINER(rData.gDumbContainer), widget );
-	gtk_widget_realize( widget );
-	gtk_widget_ensure_style( widget );
+    gtk_container_add( GTK_CONTAINER(rData.gDumbContainer), widget );
+    gtk_widget_realize( widget );
+    gtk_widget_ensure_style( widget );
 
-	// Store widget's default flags
-	gWidgetDefaultFlags[ (long)widget ] = GTK_WIDGET_FLAGS( widget );
+    // Store widget's default flags
+    gWidgetDefaultFlags[ (long)widget ] = GTK_WIDGET_FLAGS( widget );
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKButton( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gBtnWidget )
-	{
-		gWidgetData[nScreen].gBtnWidget = gtk_button_new_with_label( "" );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gBtnWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gBtnWidget )
+    {
+        gWidgetData[nScreen].gBtnWidget = gtk_button_new_with_label( "" );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gBtnWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKRadio( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gRadioWidget || !gWidgetData[nScreen].gRadioWidgetSibling )
-	{
-		gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( NULL );
-		gWidgetData[nScreen].gRadioWidgetSibling = gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON(gWidgetData[nScreen].gRadioWidget) );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidget, nScreen );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidgetSibling, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gRadioWidget || !gWidgetData[nScreen].gRadioWidgetSibling )
+    {
+        gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( NULL );
+        gWidgetData[nScreen].gRadioWidgetSibling = gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON(gWidgetData[nScreen].gRadioWidget) );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidget, nScreen );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidgetSibling, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKCheck( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gCheckWidget )
-	{
-		gWidgetData[nScreen].gCheckWidget = gtk_check_button_new();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gCheckWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gCheckWidget )
+    {
+        gWidgetData[nScreen].gCheckWidget = gtk_check_button_new();
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gCheckWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKScrollbars( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gScrollHorizWidget )
-	{
-		gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( NULL );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollHorizWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gScrollHorizWidget )
+    {
+        gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( NULL );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollHorizWidget, nScreen );
+    }
 
-	if ( !gWidgetData[nScreen].gScrollVertWidget )
-	{
-		gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( NULL );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollVertWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gScrollVertWidget )
+    {
+        gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( NULL );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollVertWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKArrow( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gArrowWidget || !gWidgetData[nScreen].gDropdownWidget )
-	{
-		gWidgetData[nScreen].gDropdownWidget = gtk_toggle_button_new();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gDropdownWidget, nScreen );
-		gWidgetData[nScreen].gArrowWidget = gtk_arrow_new( GTK_ARROW_DOWN, GTK_SHADOW_OUT );
-		gtk_container_add( GTK_CONTAINER(gWidgetData[nScreen].gDropdownWidget), gWidgetData[nScreen].gArrowWidget );
-		gtk_widget_set_rc_style( gWidgetData[nScreen].gArrowWidget );
-		gtk_widget_realize( gWidgetData[nScreen].gArrowWidget );
-	}
+    if ( !gWidgetData[nScreen].gArrowWidget || !gWidgetData[nScreen].gDropdownWidget )
+    {
+        gWidgetData[nScreen].gDropdownWidget = gtk_toggle_button_new();
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gDropdownWidget, nScreen );
+        gWidgetData[nScreen].gArrowWidget = gtk_arrow_new( GTK_ARROW_DOWN, GTK_SHADOW_OUT );
+        gtk_container_add( GTK_CONTAINER(gWidgetData[nScreen].gDropdownWidget), gWidgetData[nScreen].gArrowWidget );
+        gtk_widget_set_style( gWidgetData[nScreen].gArrowWidget, NULL );
+        gtk_widget_realize( gWidgetData[nScreen].gArrowWidget );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKEditBox( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gEditBoxWidget )
-	{
-		gWidgetData[nScreen].gEditBoxWidget = gtk_entry_new();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gEditBoxWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gEditBoxWidget )
+    {
+        gWidgetData[nScreen].gEditBoxWidget = gtk_entry_new();
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gEditBoxWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKSpinButton( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gSpinButtonWidget )
-	{
-		GtkAdjustment *adj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 1, 1, 1, 0) );
-		gWidgetData[nScreen].gSpinButtonWidget = gtk_spin_button_new( adj, 1, 2 );
+    if ( !gWidgetData[nScreen].gSpinButtonWidget )
+    {
+        GtkAdjustment *adj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 1, 1, 1, 0) );
+        gWidgetData[nScreen].gSpinButtonWidget = gtk_spin_button_new( adj, 1, 2 );
 
-		//Setting non-editable means it doesn't blink, so there's no timeouts
-		//running around to nobble us
-		gtk_editable_set_editable(GTK_EDITABLE(gWidgetData[nScreen].gSpinButtonWidget), false);
+        //Setting non-editable means it doesn't blink, so there's no timeouts
+        //running around to nobble us
+        gtk_editable_set_editable(GTK_EDITABLE(gWidgetData[nScreen].gSpinButtonWidget), false);
 
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gSpinButtonWidget, nScreen );
-	}
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gSpinButtonWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKNotebook( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gNotebookWidget )
-	{
-		gWidgetData[nScreen].gNotebookWidget = gtk_notebook_new();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gNotebookWidget, nScreen );
-	}
+    if ( !gWidgetData[nScreen].gNotebookWidget )
+    {
+        gWidgetData[nScreen].gNotebookWidget = gtk_notebook_new();
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gNotebookWidget, nScreen );
+    }
 }
 
 //-------------------------------------
 
-static void NWEnsureGTKOptionMenu( int nScreen )
+G_BEGIN_DECLS
+static void get_combo_box_entry_inner_widgets(GtkWidget *widget, gpointer client_data);
+static void get_combo_box_entry_arrow(GtkWidget *widget, gpointer client_data);
+static void get_combo_box_inner_widgets(GtkWidget *widget, gpointer client_data);
+G_END_DECLS
+
+static void get_combo_box_entry_inner_widgets(GtkWidget *widget, gpointer client_data)
+{
+    int nScreen = GPOINTER_TO_INT(client_data);
+    if (GTK_IS_TOGGLE_BUTTON(widget))
+        gWidgetData[nScreen].gComboBoxEntry_ButtonWidget = widget;
+    else if (GTK_IS_ENTRY(widget))
+    {
+        // #i59129# Setting non-editable means it doesn't blink, so
+        // there are no timeouts running around to nobble us
+        gtk_editable_set_editable(GTK_EDITABLE(widget), false);
+        gWidgetData[nScreen].gComboBoxEntry_EntryWidget = widget;
+    }
+    else
+        return;
+    gtk_widget_realize(widget);
+}
+
+static void get_combo_box_entry_arrow(GtkWidget *widget, gpointer client_data)
 {
-	if ( !gWidgetData[nScreen].gOptionMenuWidget )
-	{
-		gWidgetData[nScreen].gOptionMenuWidget = gtk_option_menu_new();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gOptionMenuWidget, nScreen );
-	}
+    if (GTK_IS_ARROW(widget))
+    {
+        int nScreen = GPOINTER_TO_INT(client_data);
+        gWidgetData[nScreen].gComboBoxEntry_ArrowWidget = widget;
+        gtk_widget_realize(widget);
+    }
 }
 
-//-------------------------------------
+static void NWEnsureGTKComboBoxEntry( int nScreen )
+{
+    if ( !gWidgetData[nScreen].gComboBoxEntryWidget )
+    {
+        gWidgetData[nScreen].gComboBoxEntryWidget = gtk_combo_box_entry_new();
+
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboBoxEntryWidget, nScreen );
+
+        gtk_container_forall(GTK_CONTAINER(gWidgetData[nScreen].gComboBoxEntryWidget),
+            get_combo_box_entry_inner_widgets, GINT_TO_POINTER(nScreen) );
+
+        //If for some reason or other we couldn't find the expected children,
+        //alias them to some we know will definitely exist
+        if (!gWidgetData[nScreen].gComboBoxEntry_EntryWidget)
+        {
+            NWEnsureGTKEditBox( nScreen );
+            gWidgetData[nScreen].gComboBoxEntry_EntryWidget = gWidgetData[nScreen].gEditBoxWidget;
+        }
+        if (gWidgetData[nScreen].gComboBoxEntry_ButtonWidget)
+        {
+            //Dig around for the arrow
+            GtkWidget *child = GTK_BIN(gWidgetData[nScreen].gComboBoxEntry_ButtonWidget)->child;
+            if (GTK_IS_HBOX(child))
+            {
+                gtk_container_forall(GTK_CONTAINER(child), get_combo_box_entry_arrow,
+                    GINT_TO_POINTER(nScreen) );
+            }
+            else
+                get_combo_box_entry_arrow(child, GINT_TO_POINTER(nScreen));
+        }
+        else
+        {
+            NWEnsureGTKArrow( nScreen );
+            gWidgetData[nScreen].gComboBoxEntry_ButtonWidget = gWidgetData[nScreen].gDropdownWidget;
+        }
+        if (!gWidgetData[nScreen].gComboBoxEntry_ArrowWidget)
+        {
+            NWEnsureGTKArrow( nScreen );
+            gWidgetData[nScreen].gComboBoxEntry_ArrowWidget = gWidgetData[nScreen].gArrowWidget;
+        }
+    }
+}
 
-static void NWEnsureGTKCombo( int nScreen )
+static void get_combo_box_inner_widgets(GtkWidget *widget, gpointer client_data)
 {
-	if ( !gWidgetData[nScreen].gComboWidget )
-	{
-		gWidgetData[nScreen].gComboWidget = gtk_combo_new();
+    int nScreen = GPOINTER_TO_INT(client_data);
+    if (GTK_IS_TOGGLE_BUTTON(widget))
+        gWidgetData[nScreen].gComboBox_ButtonWidget = widget;
+    else if (GTK_IS_SEPARATOR(widget))
+        gWidgetData[nScreen].gComboBox_SeparatorWidget = widget;
+    else if (GTK_IS_ARROW(widget))
+        gWidgetData[nScreen].gComboBox_ArrowWidget = widget;
+    else
+        return;
+    gtk_widget_realize(widget);
+}
 
-		// #i59129# Setting non-editable means it doesn't blink, so
-        // there are no timeouts running around to nobble us
-		gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry), false);
+static void NWEnsureGTKComboBox( int nScreen )
+{
+    if ( !gWidgetData[nScreen].gComboBoxWidget )
+    {
+        gWidgetData[nScreen].gComboBoxWidget = gtk_combo_box_new();
 
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboWidget, nScreen );
-		// Must realize the ComboBox's children, since GTK
-		// does not do this for us in GtkCombo::gtk_widget_realize()
-		gtk_widget_realize( GTK_COMBO(gWidgetData[nScreen].gComboWidget)->button );
-		gtk_widget_realize( GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry );
-	}
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboBoxWidget, nScreen );
+
+        gtk_container_forall(GTK_CONTAINER(gWidgetData[nScreen].gComboBoxWidget),
+            get_combo_box_inner_widgets, GINT_TO_POINTER(nScreen) );
+
+        //If for some reason or other we couldn't find the expected children,
+        //alias them to some we know will definitely exist
+        if (gWidgetData[nScreen].gComboBox_ButtonWidget)
+        {
+            //Dig around for the arrow
+            GtkWidget *child = GTK_BIN(gWidgetData[nScreen].gComboBox_ButtonWidget)->child;
+            if (GTK_IS_HBOX(child))
+            {
+                gtk_container_forall(GTK_CONTAINER(child), get_combo_box_inner_widgets,
+                    GINT_TO_POINTER(nScreen) );
+            }
+            else
+                get_combo_box_inner_widgets(child, GINT_TO_POINTER(nScreen));
+        }
+        else
+        {
+            NWEnsureGTKArrow( nScreen );
+            gWidgetData[nScreen].gComboBox_ButtonWidget = gWidgetData[nScreen].gDropdownWidget;
+        }
+
+        if (!gWidgetData[nScreen].gComboBox_ArrowWidget)
+        {
+            NWEnsureGTKArrow( nScreen );
+            gWidgetData[nScreen].gComboBox_ArrowWidget = gWidgetData[nScreen].gArrowWidget;
+        }
+    }
 }
 
 //-------------------------------------
 
 static void NWEnsureGTKScrolledWindow( int nScreen )
 {
-	if ( !gWidgetData[nScreen].gScrolledWindowWidget )
-	{
-		GtkAdjustment *hadj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
-		GtkAdjustment *vadj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
+    if ( !gWidgetData[nScreen].gScrolledWindowWidget )
+    {
+        GtkAdjustment *hadj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
+        GtkAdjustment *vadj = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
 
-		gWidgetData[nScreen].gScrolledWindowWidget = gtk_scrolled_window_new( hadj, vadj );
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrolledWindowWidget, nScreen );
-	}
+        gWidgetData[nScreen].gScrolledWindowWidget = gtk_scrolled_window_new( hadj, vadj );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrolledWindowWidget, nScreen );
+    }
 }
 
 //-------------------------------------
@@ -4003,7 +4086,7 @@
         GtkReliefStyle aRelief = GTK_RELIEF_NORMAL;
         gtk_widget_ensure_style( gWidgetData[nScreen].gToolbarWidget );
         gtk_widget_style_get( gWidgetData[nScreen].gToolbarWidget,
-			                  "button_relief", &aRelief,
+                              "button_relief", &aRelief,
                               (char *)NULL);
                               
         gtk_button_set_relief( GTK_BUTTON(gWidgetData[nScreen].gToolbarButtonWidget), aRelief );
@@ -4102,7 +4185,7 @@
     if( !gWidgetData[nScreen].gProgressBar )
     {
         gWidgetData[nScreen].gProgressBar = gtk_progress_bar_new ();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gProgressBar, nScreen );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gProgressBar, nScreen );
     }
 }
 
@@ -4111,7 +4194,7 @@
     if( !gWidgetData[nScreen].gTreeView )
     {
         gWidgetData[nScreen].gTreeView = gtk_tree_view_new ();
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
     }
 }
 
@@ -4120,11 +4203,13 @@
     if( !gWidgetData[nScreen].gHScale )
     {
         gWidgetData[nScreen].gHScale = gtk_hscale_new_with_range(0, 10, 1);
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gHScale, nScreen );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gHScale, nScreen );
     }
     if( !gWidgetData[nScreen].gVScale )
     {
         gWidgetData[nScreen].gVScale = gtk_vscale_new_with_range(0, 10, 1);
-		NWAddWidgetToCacheWindow( gWidgetData[nScreen].gVScale, nScreen );
+        NWAddWidgetToCacheWindow( gWidgetData[nScreen].gVScale, nScreen );
     }
 }
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
--- vcl.orig/unx/gtk/window/gtkobject.cxx	2010-05-26 17:30:44.000000000 +0100
+++ vcl/unx/gtk/window/gtkobject.cxx	2010-07-01 10:45:41.000000000 +0100
@@ -32,6 +32,7 @@
 #include <plugins/gtk/gtkframe.hxx>
 #include <plugins/gtk/gtkdata.hxx>
 #include <plugins/gtk/gtkinst.hxx>
+#include <plugins/gtk/gtkgdi.hxx>
 
 GtkSalObject::GtkSalObject( GtkSalFrame* pParent, BOOL bShow ) 
         : m_pSocket( NULL ),
@@ -58,7 +59,7 @@
         SalDisplay* pDisp = GetX11SalData()->GetDisplay();
         m_aSystemData.nSize 		= sizeof( SystemChildData );
         m_aSystemData.pDisplay		= pDisp->GetDisplay();
-        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(m_pSocket->window);
+        m_aSystemData.aWindow		= GDK_WINDOW_XWINDOW(widget_get_window(m_pSocket));
         m_aSystemData.pSalFrame		= NULL;
         m_aSystemData.pWidget		= m_pSocket;
         m_aSystemData.pVisual		= pDisp->GetVisual(pParent->getScreenNumber()).GetVisual();
@@ -66,7 +67,7 @@
         m_aSystemData.nDepth		= pDisp->GetVisual(pParent->getScreenNumber()).GetDepth();
         m_aSystemData.aColormap		= pDisp->GetColormap(pParent->getScreenNumber()).GetXColormap();
         m_aSystemData.pAppContext	= NULL;
-        m_aSystemData.aShellWindow	= GDK_WINDOW_XWINDOW(GTK_WIDGET(pParent->getWindow())->window);
+        m_aSystemData.aShellWindow	= GDK_WINDOW_XWINDOW(widget_get_window(GTK_WIDGET(pParent->getWindow())));
         m_aSystemData.pShellWidget	= GTK_WIDGET(pParent->getWindow());
 
         g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
--- fpicker.orig/source/unx/gnome/SalGtkPicker.cxx	2010-05-26 17:30:44.000000000 +0100
+++ fpicker/source/unx/gnome/SalGtkPicker.cxx	2010-07-01 12:51:05.000000000 +0100
@@ -155,7 +157,11 @@
     if (pParent)
     {
         gtk_widget_realize(mpDialog);
+#if GTK_CHECK_VERSION(2,90,0)
+        gdk_window_set_transient_for(gtk_widget_get_window(mpDialog), pParent);
+#else
         gdk_window_set_transient_for(mpDialog->window, pParent);
+#endif
     }
 }
 
--- extensions.orig/source/plugin/unx/npnapi.cxx	2010-07-01 13:42:35.000000000 +0100
+++ extensions/source/plugin/unx/npnapi.cxx	2010-07-01 13:44:46.000000000 +0100
@@ -701,8 +701,11 @@
                         pInst->window.window = (void *)gtk_socket_get_id( GTK_SOCKET(pInst->pGtkWidget ) );
 
                         XSync( pAppDisplay, False );
-
+#if GTK_CHECK_VERSION(2,90,0)
+                        XMapWindow( pAppDisplay, GDK_WINDOW_XWINDOW(gtk_widget_get_window(pInst->pGtkWindow)) );
+#else
                         XMapWindow( pAppDisplay, GDK_WINDOW_XWINDOW(pInst->pGtkWindow->window) );
+#endif
 
                         XSync( pAppDisplay, False );
                     }
--- vcl.orig/unx/inc/plugins/gtk/gtkdata.hxx	2010-07-07 10:20:34.000000000 +0100
+++ vcl/unx/inc/plugins/gtk/gtkdata.hxx	2010-07-07 11:15:19.000000000 +0100
@@ -40,6 +40,39 @@
 
 #include <list>
 
+inline GdkWindow * widget_get_window(GtkWidget *widget)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_get_window(widget);
+#else
+    return widget->window;
+#endif
+}
+
+inline void widget_set_can_focus(GtkWidget *widget, gboolean can_focus)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_set_can_focus(widget, can_focus);
+#else
+    if (can_focus)
+        GTK_WIDGET_SET_FLAGS( widget, GTK_CAN_FOCUS );
+    else
+        GTK_WIDGET_UNSET_FLAGS( widget, GTK_CAN_FOCUS );
+#endif
+}
+
+inline void widget_set_can_default(GtkWidget *widget, gboolean can_default)
+{
+#if GTK_CHECK_VERSION(2,90,0)
+    return gtk_widget_set_can_default(widget, can_default);
+#else
+    if (can_default)
+        GTK_WIDGET_SET_FLAGS( widget, GTK_CAN_DEFAULT );
+    else
+        GTK_WIDGET_UNSET_FLAGS( widget, GTK_CAN_DEFAULT );
+#endif
+}
+
 class GtkData : public X11SalData
 {
 public:
@@ -73,6 +106,8 @@
     virtual long Dispatch( XEvent *pEvent );
     virtual void initScreen( int nScreen ) const;
 
+    virtual int GetDefaultMonitorNumber() const;
+
     static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event,
                                            GdkEvent* event,
                                            gpointer data );
