rpms/openoffice.org/devel openoffice.org.spec, 1.2253, 1.2254 workspace.gtk3.patch, 1.1, 1.2 workspace.vcl113.patch, 1.2, 1.3
Caolan McNamara
caolanm at fedoraproject.org
Mon Jun 21 12:25:46 UTC 2010
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv16640
Modified Files:
openoffice.org.spec workspace.gtk3.patch
workspace.vcl113.patch
Log Message:
adjust fix
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2253
retrieving revision 1.2254
diff -u -p -r1.2253 -r1.2254
--- openoffice.org.spec 21 Jun 2010 11:21:18 -0000 1.2253
+++ openoffice.org.spec 21 Jun 2010 12:25:45 -0000 1.2254
@@ -1,6 +1,6 @@
%define oootag OOO320
%define ooomilestone 19
-%define rh_rpm_release 17
+%define rh_rpm_release 16
# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
%define __jar_repack %{nil}
@@ -4212,10 +4212,8 @@ fi
%endif
%changelog
-* Mon Jun 21 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.17
-- Resolves: rhbz#606021 openoffice.org-3.3.0.ooo112567.vcl.embeddedbitmaps.patch
-
* Mon Jun 21 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.16
+- Resolves: rhbz#606021 openoffice.org-3.3.0.ooo112567.vcl.embeddedbitmaps.patch
- Build against gtk3
* Fri Jun 18 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.1-19.15
workspace.gtk3.patch:
configure.in | 6
source/appl/makefile.mk | 2
source/appl/shutdowniconunx.cxx | 4
source/eggtrayicon-impl.h | 2
source/eggtrayicon.c | 39 ++
source/makefile.mk | 2
source/nsplugin/source/makefile.mk | 2
source/ooo/makefile.mk | 4
source/plugin/util/makefile.pmk | 2
source/unx/gnome/SalGtkFilePicker.cxx | 2
source/unx/gnome/makefile.mk | 6
unx/gtk/a11y/makefile.mk | 2
unx/gtk/app/gtkdata.cxx | 32 +
unx/gtk/app/makefile.mk | 2
unx/gtk/gdi/makefile.mk | 2
unx/gtk/gdi/salnativewidgets-gtk.cxx | 628 +++++++++++++++++++---------------
unx/gtk/window/gtkframe.cxx | 36 +
unx/gtk/window/makefile.mk | 2
unx/inc/plugins/gtk/gtkdata.hxx | 2
unx/inc/plugins/gtk/gtkgdi.hxx | 4
unx/inc/saldisp.hxx | 4
unx/source/app/saldisp.cxx | 21 -
unx/source/app/salsys.cxx | 2
util/makefile.mk | 4
24 files changed, 499 insertions(+), 313 deletions(-)
Index: workspace.gtk3.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/workspace.gtk3.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- workspace.gtk3.patch 21 Jun 2010 08:42:18 -0000 1.1
+++ workspace.gtk3.patch 21 Jun 2010 12:25:46 -0000 1.2
@@ -1,4 +1,3 @@
-diff -ru vcl.orig/unx/gtk/a11y/makefile.mk vcl/unx/gtk/a11y/makefile.mk
--- vcl.orig/unx/gtk/a11y/makefile.mk 2010-05-29 11:29:16.000000000 +0100
+++ vcl/unx/gtk/a11y/makefile.mk 2010-05-29 11:30:47.000000000 +0100
@@ -50,7 +50,7 @@
@@ -10,7 +9,6 @@ diff -ru vcl.orig/unx/gtk/a11y/makefile.
.INCLUDE : pkg_config.mk
CFLAGS+=-DVERSION=$(EMQ)"$(UPD)$(LAST_MINOR)$(EMQ)"
-diff -ru vcl.orig/unx/gtk/app/makefile.mk vcl/unx/gtk/app/makefile.mk
--- vcl.orig/unx/gtk/app/makefile.mk 2010-05-29 11:29:17.000000000 +0100
+++ vcl/unx/gtk/app/makefile.mk 2010-05-29 11:30:40.000000000 +0100
@@ -50,7 +50,7 @@
@@ -22,7 +20,6 @@ diff -ru vcl.orig/unx/gtk/app/makefile.m
.INCLUDE : pkg_config.mk
SLOFILES=\
-diff -ru vcl.orig/unx/gtk/gdi/makefile.mk vcl/unx/gtk/gdi/makefile.mk
--- vcl.orig/unx/gtk/gdi/makefile.mk 2010-05-29 11:29:17.000000000 +0100
+++ vcl/unx/gtk/gdi/makefile.mk 2010-05-29 11:30:44.000000000 +0100
@@ -47,7 +47,7 @@
@@ -34,142 +31,6 @@ diff -ru vcl.orig/unx/gtk/gdi/makefile.m
.INCLUDE : pkg_config.mk
SLOFILES=$(SLO)$/salnativewidgets-gtk.obj
-diff -ru vcl.orig/unx/gtk/gdi/salnativewidgets-gtk.cxx vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
---- vcl.orig/unx/gtk/gdi/salnativewidgets-gtk.cxx 2010-05-29 11:29:16.000000000 +0100
-+++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 2010-05-29 21:07:21.000000000 +0100
-@@ -47,6 +47,16 @@
-
- #include "cairo/cairo.h"
-
-+
-+static void gtk_set_orientation(GtkWidget *widget, GtkOrientation orientation)
-+{
-+#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
-+}
-+
- // initialize statics
- BOOL GtkSalGraphics::bThemeChanged = TRUE;
- BOOL GtkSalGraphics::bNeedPixmapPaint = FALSE;
-@@ -84,6 +94,8 @@
- GtkWidget * gNotebookWidget;
- GtkWidget * gOptionMenuWidget;
- GtkWidget * gComboWidget;
-+ GtkWidget * gComboButtonWidget;
-+ GtkWidget * gComboEntryWidget;
- GtkWidget * gScrolledWindowWidget;
- GtkWidget * gToolbarWidget;
- GtkWidget * gToolbarButtonWidget;
-@@ -120,6 +132,8 @@
- gNotebookWidget( NULL ),
- gOptionMenuWidget( NULL ),
- gComboWidget( NULL ),
-+ gComboButtonWidget( NULL ),
-+ gComboEntryWidget( NULL ),
- gScrolledWindowWidget( NULL ),
- gToolbarWidget( NULL ),
- gToolbarButtonWidget( NULL ),
-@@ -1892,7 +1906,7 @@
- widget = gWidgetData[nScreen].gScrolledWindowWidget;
- break;
- case CTRL_COMBOBOX:
-- widget = GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry;
-+ widget = gWidgetData[nScreen].gComboEntryWidget;
- break;
-
- default:
-@@ -2173,8 +2187,8 @@
- 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].gComboButtonWidget->style, gdkDrawable, stateType, shadowType,
-+ &clipRect, gWidgetData[m_nScreen].gComboButtonWidget, "button",
- x+(buttonRect.Left() - pixmapRect.Left()),
- y+(buttonRect.Top() - pixmapRect.Top()),
- buttonRect.GetWidth(), buttonRect.GetHeight() );
-@@ -2518,9 +2532,9 @@
- 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 );
-+ gtk_set_orientation( gWidgetData[m_nScreen].gToolbarWidget, GTK_ORIENTATION_HORIZONTAL );
- else
-- gtk_toolbar_set_orientation( GTK_TOOLBAR(gWidgetData[m_nScreen].gToolbarWidget), GTK_ORIENTATION_VERTICAL );
-+ gtk_set_orientation( gWidgetData[m_nScreen].gToolbarWidget, GTK_ORIENTATION_VERTICAL );
- }
- // handle grip
- else if( nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT )
-@@ -3737,7 +3751,7 @@
- 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_set_style( gWidgetData[nScreen].gArrowWidget, NULL );
- gtk_widget_realize( gWidgetData[nScreen].gArrowWidget );
- }
- }
-@@ -3787,29 +3801,42 @@
- {
- if ( !gWidgetData[nScreen].gOptionMenuWidget )
- {
-- gWidgetData[nScreen].gOptionMenuWidget = gtk_option_menu_new();
-+ gWidgetData[nScreen].gOptionMenuWidget = gtk_combo_box_new();
- NWAddWidgetToCacheWindow( gWidgetData[nScreen].gOptionMenuWidget, nScreen );
- }
- }
-
- //-------------------------------------
-
-+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].gComboButtonWidget = 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].gComboEntryWidget = widget;
-+ }
-+ else
-+ return;
-+ gtk_widget_realize(widget);
-+}
-+
- static void NWEnsureGTKCombo( int nScreen )
- {
-- if ( !gWidgetData[nScreen].gComboWidget )
-- {
-- gWidgetData[nScreen].gComboWidget = gtk_combo_new();
-+ if ( !gWidgetData[nScreen].gComboWidget )
-+ {
-+ gWidgetData[nScreen].gComboWidget = gtk_combo_box_entry_new();
-
-- // #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);
-+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboWidget, nScreen );
-
-- 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 );
-- }
-+ gtk_container_forall(GTK_CONTAINER(gWidgetData[nScreen].gComboWidget),
-+ get_combo_box_entry_inner_widgets, GINT_TO_POINTER(nScreen) );
-+
-+ }
- }
-
- //-------------------------------------
-diff -ru vcl.orig/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
--- 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,24 @@
@@ -278,7 +139,6 @@ diff -ru vcl.orig/unx/gtk/window/gtkfram
if( bWasVisible )
Show( FALSE );
-diff -ru vcl.orig/unx/gtk/window/makefile.mk vcl/unx/gtk/window/makefile.mk
--- vcl.orig/unx/gtk/window/makefile.mk 2010-05-29 11:29:16.000000000 +0100
+++ vcl/unx/gtk/window/makefile.mk 2010-05-29 11:30:51.000000000 +0100
@@ -50,7 +50,7 @@
@@ -290,7 +150,6 @@ diff -ru vcl.orig/unx/gtk/window/makefil
.IF "$(ENABLE_DBUS)" != ""
CDEFS+=-DENABLE_DBUS
PKGCONFIG_MODULES+= dbus-glib-1
-diff -ru vcl.orig/util/makefile.mk vcl/util/makefile.mk
--- vcl.orig/util/makefile.mk 2010-05-29 11:28:58.000000000 +0100
+++ vcl/util/makefile.mk 2010-05-29 11:30:59.000000000 +0100
@@ -350,7 +350,7 @@
@@ -302,7 +161,6 @@ diff -ru vcl.orig/util/makefile.mk vcl/u
.IF "$(ENABLE_DBUS)" != ""
PKGCONFIG_MODULES+= dbus-glib-1
.ENDIF
-diff -ru extensions.orig/source/nsplugin/source/makefile.mk extensions/source/nsplugin/source/makefile.mk
--- extensions.orig/source/nsplugin/source/makefile.mk 2010-05-29 21:22:06.000000000 +0100
+++ extensions/source/nsplugin/source/makefile.mk 2010-05-29 21:23:13.000000000 +0100
@@ -52,7 +52,7 @@
@@ -314,7 +172,6 @@ diff -ru extensions.orig/source/nsplugin
.INCLUDE: pkg_config.mk
.ENDIF # "$(ENABLE_GTK)"==""
.ENDIF # "$(GUI)"=="UNX"
-diff -ru extensions.orig/source/plugin/util/makefile.pmk extensions/source/plugin/util/makefile.pmk
--- extensions.orig/source/plugin/util/makefile.pmk 2010-05-29 21:22:06.000000000 +0100
+++ extensions/source/plugin/util/makefile.pmk 2010-05-29 21:23:16.000000000 +0100
@@ -35,7 +35,7 @@
@@ -326,7 +183,6 @@ diff -ru extensions.orig/source/plugin/u
.ENDIF
.IF "$(GUIBASE)" == "aqua"
-diff -ru fpicker.orig/source/unx/gnome/makefile.mk fpicker/source/unx/gnome/makefile.mk
--- fpicker.orig/source/unx/gnome/makefile.mk 2010-05-29 21:22:49.000000000 +0100
+++ fpicker/source/unx/gnome/makefile.mk 2010-05-29 21:24:14.000000000 +0100
@@ -46,16 +46,16 @@
@@ -349,7 +205,6 @@ diff -ru fpicker.orig/source/unx/gnome/m
.ELSE
-diff -ru fpicker.orig/source/unx/gnome/SalGtkFilePicker.cxx fpicker/source/unx/gnome/SalGtkFilePicker.cxx
--- 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
@@ -1586,7 +1586,7 @@
@@ -361,7 +216,6 @@ diff -ru fpicker.orig/source/unx/gnome/S
}
-diff -ru libegg.orig/source/eggtrayicon.c libegg/source/eggtrayicon.c
--- 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 @@
@@ -446,7 +300,6 @@ diff -ru libegg.orig/source/eggtrayicon.
gtk_widget_set_app_paintable (widget, TRUE);
gtk_widget_set_double_buffered (widget, FALSE);
gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
-diff -ru libegg.orig/source/eggtrayicon-impl.h libegg/source/eggtrayicon-impl.h
--- 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 @@
@@ -458,7 +311,6 @@ diff -ru libegg.orig/source/eggtrayicon-
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
-diff -ru libegg.orig/source/makefile.mk libegg/source/makefile.mk
--- libegg.orig/source/makefile.mk 2010-05-29 21:27:29.000000000 +0100
+++ libegg/source/makefile.mk 2010-05-30 12:45:54.000000000 +0100
@@ -40,7 +40,7 @@
@@ -470,7 +322,6 @@ diff -ru libegg.orig/source/makefile.mk
.INCLUDE: pkg_config.mk
CFLAGS+=$(PKGCONFIG_CFLAGS)
-diff -ru scp2.orig/source/ooo/makefile.mk scp2/source/ooo/makefile.mk
--- scp2.orig/source/ooo/makefile.mk 2010-05-29 21:24:45.000000000 +0100
+++ scp2/source/ooo/makefile.mk 2010-05-29 21:26:42.000000000 +0100
@@ -63,9 +63,9 @@
@@ -485,7 +336,6 @@ diff -ru scp2.orig/source/ooo/makefile.m
.IF "$(GTK_TWO_FOUR)" != ""
SCPDEFS+=-DGTK_TWO_FOUR
.ENDIF
-diff -ru sfx2.orig/source/appl/makefile.mk sfx2/source/appl/makefile.mk
--- sfx2.orig/source/appl/makefile.mk 2010-05-29 21:22:29.000000000 +0100
+++ sfx2/source/appl/makefile.mk 2010-05-30 12:54:53.000000000 +0100
@@ -52,7 +52,7 @@
@@ -497,7 +347,6 @@ diff -ru sfx2.orig/source/appl/makefile.
.INCLUDE: pkg_config.mk
CFLAGS+=$(PKGCONFIG_CFLAGS)
CFLAGS+=-DENABLE_QUICKSTART_APPLET
-diff -ru sfx2.orig/source/appl/shutdowniconunx.cxx sfx2/source/appl/shutdowniconunx.cxx
--- 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
@@ -372,8 +372,12 @@
@@ -513,7 +362,6 @@ diff -ru sfx2.orig/source/appl/shutdowni
GtkWidget *pIconImage = gtk_image_new();
gtk_container_add( GTK_CONTAINER( pParent ), pIconImage );
-diff -ru sfx2.orig/util/makefile.mk sfx2/util/makefile.mk
--- sfx2.orig/util/makefile.mk 2010-05-29 21:22:29.000000000 +0100
+++ sfx2/util/makefile.mk 2010-05-30 12:54:56.000000000 +0100
@@ -140,7 +140,7 @@
@@ -554,7 +402,6 @@ diff -ru sfx2.orig/util/makefile.mk sfx2
BUILD_TYPE="$BUILD_TYPE GTK"
if test "x$enable_systray" = "xyes"; then
-diff -ru vcl.orig/unx/gtk/app/gtkdata.cxx vcl/unx/gtk/app/gtkdata.cxx
--- 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 @@
@@ -607,7 +454,6 @@ diff -ru vcl.orig/unx/gtk/app/gtkdata.cx
void GtkSalDisplay::initScreen( int nScreen ) const
{
if( nScreen < 0 || nScreen >= static_cast<int>(m_aScreens.size()) )
-diff -ru vcl.orig/unx/inc/plugins/gtk/gtkdata.hxx vcl/unx/inc/plugins/gtk/gtkdata.hxx
--- vcl.orig/unx/inc/plugins/gtk/gtkdata.hxx 2010-06-14 19:51:39.547798667 +0100
+++ vcl/unx/inc/plugins/gtk/gtkdata.hxx 2010-06-14 20:33:22.407799098 +0100
@@ -76,6 +76,8 @@
@@ -619,7 +465,6 @@ diff -ru vcl.orig/unx/inc/plugins/gtk/gt
static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event,
GdkEvent* event,
gpointer data );
-diff -ru vcl.orig/unx/inc/saldisp.hxx vcl/unx/inc/saldisp.hxx
--- 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 @@
@@ -647,7 +492,6 @@ diff -ru vcl.orig/unx/inc/saldisp.hxx vc
const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
srv_vendor_t GetServerVendor() const { return meServerVendor; }
void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
-diff -ru vcl.orig/unx/source/app/saldisp.cxx vcl/unx/source/app/saldisp.cxx
--- 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
@@ -62,9 +62,7 @@
@@ -734,7 +578,6 @@ diff -ru vcl.orig/unx/source/app/saldisp
void SalDisplay::registerFrame( SalFrame* pFrame )
{
m_aFrames.push_front( pFrame );
-diff -ru vcl.orig/unx/source/app/salsys.cxx vcl/unx/source/app/salsys.cxx
--- 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 @@
@@ -746,3 +589,907 @@ diff -ru vcl.orig/unx/source/app/salsys.
}
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
+@@ -127,7 +127,7 @@
+ const clipList& rClipList,
+ ControlState nState, const ImplControlValue& aValue,
+ SalControlHandle& rControlHandle, 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,7 +137,7 @@
+ const clipList& rClipList,
+ ControlState nState, const ImplControlValue& aValue,
+ SalControlHandle& rControlHandle, const OUString& rCaption );
+- BOOL NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
++ BOOL NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ const Rectangle& rControlRectangle,
+ const clipList& rClipList,
+ ControlState nState, const ImplControlValue& aValue,
+--- 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
+@@ -82,8 +82,14 @@
+ GtkWidget * gEditBoxWidget;
+ GtkWidget * gSpinButtonWidget;
+ GtkWidget * gNotebookWidget;
+- GtkWidget * gOptionMenuWidget;
+- GtkWidget * gComboWidget;
++ 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;
+@@ -118,8 +124,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 ),
+@@ -163,8 +175,8 @@
+ 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 NWEnsureGTKComboBoxEntry ( int nScreen );
++static void NWEnsureGTKComboBox ( int nScreen );
+ static void NWEnsureGTKScrolledWindow ( int nScreen );
+ static void NWEnsureGTKToolbar ( int nScreen );
+ static void NWEnsureGTKMenubar ( int nScreen );
+@@ -205,14 +217,11 @@
+ ControlState nState, const ImplControlValue& aValue, SalControlHandle& rControlHandle,
+ const OUString& rCaption );
+ //---
+-static Rectangle NWGetComboBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
++static Rectangle NWGetComboBoxEntryButtonRect ( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+ const ImplControlValue& aValue, SalControlHandle& rControlHandle, const OUString& rCaption );
+
+ //---
+-static Rectangle NWGetListBoxButtonRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
+- const ImplControlValue& aValue, SalControlHandle& rControlHandle, 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, SalControlHandle& rControlHandle, const OUString& rCaption );
+
+ static Rectangle NWGetToolbarRect( int nScreen,
+@@ -294,7 +303,6 @@
+ g_object_ref( m_pixmap );
+ }
+
+-
+ NWPixmapCache::NWPixmapCache( int nScreen )
+ {
+ m_idx = 0;
+@@ -304,25 +312,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 )
+ {
+ 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 &&
+@@ -350,11 +358,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;
+@@ -362,6 +370,7 @@
+ if( p != mCaches.end() )
+ mCaches.erase( p );
+ }
++
+ void NWPixmapCacheList::ThemeChanged( )
+ {
+ ::std::vector< NWPixmapCache* >::iterator p = mCaches.begin();
+@@ -827,7 +836,7 @@
+ ||(nPart==PART_BUTTON_DOWN)
+ ) )
+ {
+- returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
++ returnVal = NWPaintGTKComboBoxEntry( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ }
+ else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
+ {
+@@ -838,7 +847,7 @@
+ }
+ else if ( (nType==CTRL_LISTBOX) && ((nPart==PART_ENTIRE_CONTROL) || (nPart==PART_WINDOW)) )
+ {
+- returnVal = NWPaintGTKListBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
++ returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ }
+ else if ( (nType== CTRL_TOOLBAR) )
+ {
+@@ -996,7 +1005,7 @@
+ }
+ if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
+ {
+- rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
++ rNativeBoundingRegion = NWGetComboBoxEntryButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
+ aValue, rControlHandle, rCaption );
+ rNativeContentRegion = rNativeBoundingRegion;
+
+@@ -1013,7 +1022,7 @@
+ }
+ if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
+ {
+- rNativeBoundingRegion = NWGetListBoxButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
++ rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion.GetBoundRect(), nState,
+ aValue, rControlHandle, rCaption );
+ rNativeContentRegion = rNativeBoundingRegion;
+
+@@ -1874,7 +1883,7 @@
+ NWEnsureGTKButton( nScreen );
+ NWEnsureGTKEditBox( nScreen );
+ NWEnsureGTKSpinButton( nScreen );
+- NWEnsureGTKCombo( nScreen );
++ NWEnsureGTKComboBoxEntry( nScreen );
+ NWEnsureGTKScrolledWindow( nScreen );
+ NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+
+@@ -1887,14 +1896,13 @@
+ case CTRL_SPINBOX:
+ widget = gWidgetData[nScreen].gSpinButtonWidget;
+ break;
+-
+ case CTRL_MULTILINE_EDITBOX:
+ widget = gWidgetData[nScreen].gScrolledWindowWidget;
+ break;
++ case CTRL_LISTBOX:
+ case CTRL_COMBOBOX:
+- widget = GTK_COMBO(gWidgetData[nScreen].gComboWidget)->entry;
++ widget = gWidgetData[nScreen].gComboBoxEntry_EntryWidget;
+ break;
+-
+ default:
+ widget = gWidgetData[nScreen].gEditBoxWidget;
+ break;
+@@ -2112,7 +2120,9 @@
+
+ //-------------------------------------
+
+-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,
+@@ -2129,8 +2139,7 @@
+ GdkRectangle clipRect;
+
+ NWEnsureGTKButton( m_nScreen );
+- NWEnsureGTKArrow( m_nScreen );
+- NWEnsureGTKCombo( m_nScreen );
++ NWEnsureGTKComboBoxEntry( m_nScreen );
+ NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
+
+ // Find the overall bounding rect of the buttons's drawing area,
+@@ -2140,17 +2149,15 @@
+ 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].gComboBoxEntryWidget, nState, stateType );
+
+- buttonRect = NWGetComboBoxButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rControlHandle, rCaption );
++ buttonRect = NWGetComboBoxEntryButtonRect( m_nScreen, nType, PART_BUTTON_DOWN, pixmapRect, nState, aValue, rControlHandle, rCaption );
+ if( nPart == PART_BUTTON_DOWN )
+ buttonRect.Left() += 1;
+
+ 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),
+@@ -2173,14 +2180,14 @@
+ 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() );
+ }
+@@ -2188,9 +2195,125 @@
+ return( TRUE );
+ }
+
++BOOL GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable,
++ ControlType nType, ControlPart nPart,
++ const Rectangle& rControlRectangle,
++ const clipList& rClipList,
++ ControlState nState,
++ const ImplControlValue& aValue,
++ SalControlHandle& rControlHandle,
++ 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, rControlHandle, 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,
+@@ -2205,16 +2328,16 @@
+ gint nFocusWidth;
+ gint nFocusPad;
+
+- NWEnsureGTKArrow( nScreen );
++ NWEnsureGTKComboBoxEntry ( nScreen );
+
+ // Grab some button style attributes
+- gtk_widget_style_get( gWidgetData[nScreen].gDropdownWidget,
++ 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)
++ ((BTN_CHILD_SPACING + gWidgetData[nScreen].gComboBoxEntry_ButtonWidget->style->xthickness) * 2)
+ + (2 * (nFocusWidth+nFocusPad));
+ if( nPart == PART_BUTTON_DOWN )
+ {
+@@ -2224,13 +2347,76 @@
+ }
+ else if( nPart == PART_SUB_EDIT )
+ {
+- NWEnsureGTKCombo( nScreen );
++ gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboBoxEntryWidget)->border_width +
++ nFocusWidth +
++ nFocusPad;
++ 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();
++ aEditPos.X() += adjust_x;
++ aEditPos.Y() += adjust_y;
++ aButtonRect.SetPos( aEditPos );
++ }
++
++ return( aButtonRect );
++}
++
++static Rectangle NWGetComboBoxButtonRect( int nScreen,
++ ControlType,
++ ControlPart nPart,
++ Rectangle aAreaRect,
++ ControlState,
++ const ImplControlValue&,
++ SalControlHandle&,
++ 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 );
++
++ 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);
+
+- gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
++ 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].gComboWidget->style->ythickness;
+- adjust_x += gWidgetData[nScreen].gComboWidget->style->xthickness;
++ 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();
+@@ -2242,6 +2428,7 @@
+ return( aButtonRect );
+ }
+
++
+ //-------------------------------------
+
+
+@@ -2385,100 +2572,13 @@
+ return bSuccess;
+ }
+
+-//-------------------------------------
+-
+-BOOL GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable,
+- ControlType nType, ControlPart nPart,
+- const Rectangle& rControlRectangle,
+- const clipList& rClipList,
+- ControlState nState,
+- const ImplControlValue& aValue,
+- SalControlHandle& rControlHandle, 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, rControlHandle, 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(
+@@ -2518,9 +2618,9 @@
+ 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 )
+@@ -2999,118 +3099,6 @@
+ return bRet;
+ }
+
+-//----
+-
+-static Rectangle NWGetListBoxButtonRect( int nScreen,
+- ControlType,
+- ControlPart nPart,
+- Rectangle aAreaRect,
+- ControlState,
+- const ImplControlValue&,
+- SalControlHandle&,
+- 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&,
+- SalControlHandle&,
+- 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 );
+-}
+-
+ static Rectangle NWGetToolbarRect( int nScreen,
+ ControlType,
+ ControlPart nPart,
+@@ -3737,7 +3725,7 @@
+ 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_set_style( gWidgetData[nScreen].gArrowWidget, NULL );
+ gtk_widget_realize( gWidgetData[nScreen].gArrowWidget );
+ }
+ }
+@@ -3783,32 +3771,132 @@
+
+ //-------------------------------------
+
+-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 )
++ if (GTK_IS_ARROW(widget))
+ {
+- gWidgetData[nScreen].gOptionMenuWidget = gtk_option_menu_new();
+- NWAddWidgetToCacheWindow( gWidgetData[nScreen].gOptionMenuWidget, nScreen );
++ 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 );
+
+-static void NWEnsureGTKCombo( int 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)
+ {
+- if ( !gWidgetData[nScreen].gComboWidget )
++ 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)
+ {
+- gWidgetData[nScreen].gComboWidget = gtk_combo_new();
++ NWEnsureGTKArrow( nScreen );
++ gWidgetData[nScreen].gComboBoxEntry_ArrowWidget = gWidgetData[nScreen].gArrowWidget;
++ }
++ }
++}
+
+- // #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 get_combo_box_inner_widgets(GtkWidget *widget, gpointer client_data)
++{
++ 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);
++}
++
++static void NWEnsureGTKComboBox( int nScreen )
++{
++ if ( !gWidgetData[nScreen].gComboBoxWidget )
++ {
++ gWidgetData[nScreen].gComboBoxWidget = gtk_combo_box_new();
++
++ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gComboBoxWidget, nScreen );
+
+- 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 );
++ 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;
++ }
+ }
+ }
+
+@@ -3951,3 +4039,5 @@
+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
+ }
+ }
++
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
workspace.vcl113.patch:
inc/vcl/salgdi.hxx | 2 +-
source/gdi/outdev3.cxx | 19 +++++++++++++++++++
source/glyphs/gcach_ftyp.cxx | 3 +++
unx/headless/svpgdi.hxx | 2 +-
unx/headless/svppspgraphics.cxx | 2 +-
unx/headless/svppspgraphics.hxx | 2 +-
unx/headless/svptext.cxx | 9 ++++++---
unx/inc/pspgraphics.h | 2 +-
unx/inc/salgdi.h | 2 +-
unx/source/gdi/pspgraphics.cxx | 2 +-
unx/source/gdi/salgdi3.cxx | 13 ++++++++-----
11 files changed, 43 insertions(+), 15 deletions(-)
Index: workspace.vcl113.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/workspace.vcl113.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- workspace.vcl113.patch 21 Jun 2010 11:21:18 -0000 1.2
+++ workspace.vcl113.patch 21 Jun 2010 12:25:46 -0000 1.3
@@ -24,7 +24,7 @@ diff -ru vcl.orig/source/gdi/outdev3.cxx
// when device specific font substitution may have been performed for
// the originally selected font then make sure that a fallback to that
// font is performed first
-@@ -6632,7 +6636,23 @@
+@@ -6632,7 +6636,22 @@
}
#endif
@@ -41,7 +41,6 @@ diff -ru vcl.orig/source/gdi/outdev3.cxx
+ float fScale = nOriginalHeight/(float)nSubstituteHeight;
+ long nOrigHeight = aFontSelData.mnHeight;
+ aFontSelData.mnHeight *= fScale;
-+ ImplFontMetricData aSubstituteMetric(aFontSelData);
+ pFallbackFont->mnSetFontFlags = mpGraphics->SetFont( &aFontSelData, nFallbackLevel );
+ aFontSelData.mnHeight = nOrigHeight;
+ }
More information about the scm-commits
mailing list